Master Data Sync
To work offline, sync the master data.
Note
We recommend synchronizing once a day, at the beginning of the day, with stable internet.
To synchronize master data, specify a token, a list of stores, and a synchronization command.
Request parameters
DeepLinkConst.IC_CAMERA_LAUNCH_ACTION
string
Intent
launch IC Camera on the device. If both applications are installed, a dialog box will appear asking you to select the version of IC Camera.
DeepLinkConst.Parameters.TOKEN
string
DeepLinkConst.Parameters.IC_COMMAND
string
Control command.
DeepLinkConst.Parameters.LIST_CUSTOMER_ID
string[]
An array of strings with CUSTOMER_ID
store codes to synchronize data on these stores.
DeepLinkConst.Parameters.STRING_CUSTOMER_ID
string
Alternative version of the list with CUSTOMER_ID
codes of stores to synchronize data on these stores.
In this format, a string with CUSTOMER_ID
codes is passed, which are separated by a comma (",") without spaces. If both methods are given, the values from STRING_CUSTOMER_ID
will be used.
Request example
Intent launchIntent = new Intent(DeepLinkConst.IC_CAMERA_LAUNCH_ACTION);
launchIntent.putExtra(DeepLinkConst.Parameters.TOKEN, getDemoToken());
launchIntent.putExtra(DeepLinkConst.Parameters.IC_COMMAND, DeepLinkConst.Commands.IC_SYNC);
String[] listCustomerId = {"id1", "id2", "id3", "id4", "id5"}; // пример списка магазинов
launchIntent.putExtra(DeepLinkConst.Parameters.LIST_CUSTOMER_ID, listCustomerId);
startActivityForResult(launchIntent, ICDeepLink.DEFAULT_REQUEST_CODE);
Response example
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (data == null) {
return;
}
Log.d(TAG, "Result code: " + data.getIntExtra(DeepLinkConst.Parameters.RESULT_CODE, 0));
Log.d(TAG, "Result info: " + data.getStringExtra(DeepLinkConst.Parameters.RESULT_INFO));
Log.d(TAG, "list_customer_id: " + data.getStringExtra(DeepLinkConst.Parameters.LIST_CUSTOMER_ID));
}
Response definitions
DeepLinkConst.Parameters.RESULT_CODE
integer
Result code.
VISIT_VALID
(int: 1) - successful visit (new or opened). Completed with the button to close the visit.VISIT_ERR
(int: 2) - visit error. SeeRESULT_INFO
for details.SYNC_OK
(int: 3) - synchronization was successful.SYNC_ERR
(int: 4) - synchronization failed. SeeRESULT_INFO
for details.
DeepLinkConst.Parameters.RESULT_INFO
string
Description of the error or additional information.
DeepLinkConst.Parameters.LIST_CUSTOMER_ID
array
An array of strings with CUSTOMER_ID
codes of stores for which synchronization was performed.
After synchronization is complete, control will automatically return to the calling application.
If you have any questions or problems, contact support.