Load the mapping data from the job.
Optional
callback: ((mappedData) => void)The callback is triggered once the mapping is loaded. The callback result will be passed a BatchMappingElement array.
Load the currently stored batch data. The method can load only the info of the batch data (aka the headers) or the full data.
If you request only the info, the method will return a BatchLoadInfoResponse object. Otherwise we will load the full data as a BatchLoadFullResponse object (note, this can be potentially quite large).
Note: the format of the data set is controlled by the batch plugin applied against the product.
You can control via the separate parameter getPreviouslyLoaded if you want to load the data from the server or return the previously loaded data. Note: this will only work if you request the info only.
Boolean flag to control if only the info object or the full data set should be loaded.
The callback is triggered once the data is loaded. The callback result will be passed a BatchLoadInfoResponse or BatchLoadFullResponse object, depending on the infoOnly flag.
Optional
getPreviouslyLoaded: booleanBoolean flag to control if the data should be loaded from the server or the previously loaded data should be returned. This will only work if you request the info only.
Loads a preview of the batch data for the first numRecords records. Note that we will not return more as the Infigo Settings value of BatchNumPreviewRecords, no matter the parameter value. But we can return less. However the system will generate at least 1 record.
The call will load then the first n records. This is controlled by the batch plugin and for some types it may be not actual data. The CSV plugin will return the first n rows.
Then the data will be mapped and a mapped result will be returned
The maximum number of records to load. Note that we will not return more as the Infigo Settings value of BatchNumPreviewRecords, no matter the parameter value. But we can return less.
The callback with the mapped data object. The keys are the mapping keys (or variable items), and the values the already mapped values.
Saves the batch data. The batch data format is controlled by the batch plugin applied against the product.
E.g. for the CSV batch plugin, the data is a string of comma separated values following the CSV specification.
This call will also update the pricing.
The data to save in the correct format based on the batch plugin applied against the product.
Optional
callback: ((shortInfo) => void)The function will be triggered when the save operation is complete. The callback result will be passed a BatchSaveResult object.
Saves the defined mapping against the job. The mapping is important to control how the batch data will be used. You can use the Editor's UI helper to generate a mapping dialog easily.
The mapping object is a dictionary where the key is the mapping key (or variable item) and the value is the BatchMappingElement object.
Optional
callback: ((result) => void)The callback is triggered once the mapping is saved.
Generated using TypeDoc
The Batch interface holds methods used for the batch operation of MegaEdit. Note that in order for this to work, a batch plugin has to be configured against the product in admin. The batch plugin will then control the format and functionality of the batch operation.