The following is a description of functions to manage custom tables data
SQL mode
Asynchrounous batch custom data updates
- createCustomDataRowSet
- addDataToCustomDataRowsSetFromFile
- startBatchCustomTableUpdate
- getBatchStatusInfo
- fetchBatchCustomDataUpdateReport
Asynchrounous batch custom data updates
createCustomDataRowSet
Opens a RowSet on the server to contain data that have to be uploaded/updated.
Return values: String
addDataToCustomDataRowsSetFromFile
Adds data to the rowset reading a file - that can be a .CSV file (or other format) - according to the settings specified in FileOptions (field separator, lines, file format, ...).
By default the file must be in CSV format with these parameters:
- windows-1252 - as encoding
- double quotes - as text qualifier
- , - as field separator
- CRLF (sequence of two bytes \r\n) - as rows separator
These settings can be overridden with the parameter "fileOptions" in FileOptions
Parameter | Type | Description |
---|---|---|
idRowSet | String | |
data | Byte[] | File to import |
fileOptions | FileOptions | |
options | List of <Option> |
Return values: Void
startBatchCustomTableUpdate
Starts a batch operation (in the background) to update custom table data.
This operation returns an id useful to get the operation status with getBatchStatusInfo.
Inside the MNCustomDataBatchStartOptions structure you have to set the table to be used
Parameter | Type | Description |
---|---|---|
idRowSet | String | |
options | MNCustomDataBatchStartOptions | |
advancedOptions | List of <Option> | Available options: Boolean lookupContactColumn: use data provided in a column of the file as a contact's primary key value, the column value will be substituted with the idcontact of the contact if a match is found, otherwise a 'contactnotfound' result will be returned of the record; Boolean lookupContactIdDatabase: define the database in which perform the lookup of the column primary key; Boolean keepSourceData: keep a copy of the source data, for debug purposes only, defaults to 'false'; |
Return values: String
fetchBatchCustomDataUpdateReport
Returns a page of results of a batch operation.
Parameter | Type | Description |
---|---|---|
idRowSet | String | Use the reportRowsSetId returned by getBatchStatusInfo API |
fromIndex | int | |
toIndex | int |
Return values: List of MNCustomDataMergeOperation