Skip to main content

Start or open a visit

You can start or open a visit for viewing without prior synchronization. In this case, you will need an Internet connection at the point of sale. Information about the store will be loaded at the beginning of the visit.

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.IC_COMMAND string

Control command.


DeepLinkConst.Parameters.DEBUG boolean

Enable debug mode. Displays a log with the output of the main errors and calling parameters. Optional.


DeepLinkConst.Parameters.TOKEN string

Required. Calling application ID.

DeepLinkConst.Parameters.VISIT_ID string

Required. Visit ID. If ID:
  • found — visit will be opened;
  • not found — a new visit will be created;
  • empty, or "0" - an error will be returned.

DeepLinkConst.Parameters.AGENT_ID string

Required. Agent ID in UUID format. If the agent ID is not found, a new agent will be created.

DeepLinkConst.Parameters.CUSTOMER_ID string

Required. Store ID.

By CUSTOMER_ID a store is searched (store -> customer_id). If the store:

  • not found — an error will be returned, the visit cannot be started;
  • found — all store tasks will be added to the visit.

DeepLinkConst.Parameters.TASK_FILTER string

Task filter. Regular expression (description) for filtering tasks by name. If specified, the visit will display tasks that match the specified filter. Optional.


Request example

Intent launchIntent = new Intent(DeepLinkConst.IC_CAMERA_LAUNCH_ACTION);

launchIntent.putExtra(DeepLinkConst.Parameters.DEBUG, true);
launchIntent.putExtra(DeepLinkConst.Parameters.TOKEN, getDemoToken());
launchIntent.putExtra(DeepLinkConst.Parameters.VISIT_ID, getDemoVisit());
launchIntent.putExtra(DeepLinkConst.Parameters.AGENT_ID, getDemoAgent());
launchIntent.putExtra(DeepLinkConst.Parameters.CUSTOMER_ID, getDemoCustomerID());
launchIntent.putExtra(DeepLinkConst.Parameters.TASK_FILTER, "regex");

startActivityForResult(launchIntent, ICDeepLink.DEFAULT_REQUEST_CODE);

Response example

The results of the call are returned to the onActivityResult function.

@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, "Visit: " + data.getStringExtra(DeepLinkConst.Parameters.VISIT_ID));
Log.d(TAG, "Agent: " + data.getStringExtra(DeepLinkConst.Parameters.AGENT_ID));
Log.d(TAG, "Customer: " + data.getStringExtra(DeepLinkConst.Parameters.CUSTOMER_ID));
Log.d(TAG, "Images: " + data.getIntExtra(DeepLinkConst.Parameters.TOTAL_IMAGES, 0));
}

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. See RESULT_INFO for details.
  • SYNC_OK (int: 3) - synchronization was successful.
  • SYNC_ERR (int: 4) - synchronization failed. See RESULT_INFO for details.

DeepLinkConst.Parameters.RESULT_INFO string

Description of the error or additional information.


DeepLinkConst.Parameters.VISIT_ID string

Visit ID. Value as in input parameter.


DeepLinkConst.Parameters.AGENT_ID string

Agent ID. Value as in input parameter.


DeepLinkConst.Parameters.CUSTOMER_ID string

Store ID. Value as in input parameter.


DeepLinkConst.Parameters.TOTAL_IMAGES integer

The number of images in the visit.


If you have any questions or problems, contact support.