API
Deeplink

Android

To work with Eyrene Deeplink on Android:





To call the Eyrene app, create an Intent and call DeepLinkActivity with startActivityForResult.

Java



To work with the app offline, sync master data.

Note

We recommend syncing data once at the beginning of the day, with stable internet



Request parameters



DeepLinkConst.IC_CAMERA_LAUNCH_ACTION string

The intent of launch Eyrene on the device.



DeepLinkConst.Parameters.TOKEN string

Required. Calling application ID.



DeepLinkConst.Parameters.IC_COMMAND string

Control command.



DeepLinkConst.Parameters.LIST_CUSTOMER_ID string[]

An array of strings with CUSTOMER_ID store codes to sync data on these stores.



DeepLinkConst.Parameters.STRING_CUSTOMER_ID string

An alternative options list with CUSTOMER_ID store codes to sync data for these stores. In this format, a string with CUSTOMER_ID codes is passed, which is separated by a comma (",") without spaces.

If both methods are specified, then the values ​​from STRING_CUSTOMER_ID will be used.



Request example

Java


Response example

Java


Response parameters



DeepLinkConst.Parameters.RESULT_CODE integer

Result code.

  • VISIT_VALID (int: 1) - successful visit (new or open). Completed with the button to close the visit.
  • VISIT_ERR (int: 2) - visit error. Detailed information in RESULT_INFO.
  • SYNC_OK (int: 3) - Synchronization completed successfully.
  • SYNC_ERR (int: 4) - Synchronization failed. Detailed information in RESULT_INFO.


DeepLinkConst.Parameters.RESULT_INFO string

Error description or additional information.



DeepLinkConst.Parameters.LIST_CUSTOMER_ID array

An array of strings with CUSTOMER_ID codes of stores for which sync is performed.



After the sync is completed, the control will automatically return to the calling app.





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

The intent of launch Eyrene on the device.



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 — a 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. The store is searched for by CUSTOMER_ID (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. A regular expression (description) for filtering tasks by name. If specified, the visit will display tasks that match the specified filter. Optional.



Request example

Java


Response example

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

Java


Response parameters



DeepLinkConst.Parameters.RESULT_CODE integer

Result code.

  • VISIT_VALID (int: 1) - successful visit (new or open). Completed with the button to close the visit.
  • VISIT_ERR (int: 2) - visit error. Detailed information in RESULT_INFO.
  • SYNC_OK (int: 3) - Synchronization completed successfully.
  • SYNC_ERR (int: 4) - Synchronization failed. Detailed information in RESULT_INFO.


DeepLinkConst.Parameters.RESULT_INFO string

Error description 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.




The OpenLastVisit command finds the ID of the last visit started in the store and opens it.

Request parameters



DeepLinkConst.IC_CAMERA_LAUNCH_ACTION string

The intent of launch Eyrene on the device.



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.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. The store is searched for by CUSTOMER_ID (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.


Request example

Java


Response example

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

Java


Response parameters



DeepLinkConst.Parameters.RESULT_CODE integer

Result code.

  • VISIT_VALID (int: 1) - successful visit (new or open). Completed with the button to close the visit.
  • VISIT_ERR (int: 2) - visit error. Detailed information in RESULT_INFO.
  • SYNC_OK (int: 3) - Synchronization completed successfully.
  • SYNC_ERR (int: 4) - Synchronization failed. Detailed information in RESULT_INFO.


DeepLinkConst.Parameters.RESULT_INFO string

Error description 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.




Constants used in the Android Deeplink

The entire list of constants that are used in the Android Eyrene Deeplink API is described here.

Parameter List

Java


Description

DeepLinkConst



DeepLinkConst.IC_CAMERA_LAUNCH_ACTION string

The intent for launching Eyrene on the device.



DeepLinkConst.IC_CAMERA_3_PACKAGEDeepLinkConst.IC_CAMERA_3_ACTIVITY string

Components to run the Eyrene application.



Parameters



DeepLinkConst.Parameters.TOKEN string

The token of the calling application.



 DeepLinkConst.Parameters.AGENT_ID string

Agent ID in UUID format.



DeepLinkConst.Parameters.VISIT_ID string

Visit ID



DeepLinkConst.Parameters.CUSTOMER_ID string

Store ID. The store is searched for by CUSTOMER_ID (store -> customer_id)



DeepLinkConst.Parameters.LIST_CUSTOMER_ID string[]

An array of strings with CUSTOMER_ID codes of stores for which sync is performed.



DeepLinkConst.Parameters.STRING_CUSTOMER_ID array

An alternative list option with CUSTOMER_ID store codes to synchronize data for these stores. In this format, a string with CUSTOMER_ID codes is passed, which is separated by a comma (",") without spaces. If both methods are specified in the command, then the values ​​from STRING_CUSTOMER_ID will be used.



DeepLinkConst.Parameters.TASK_FILTER string

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



DeepLinkConst.Parameters.READONLY boolean

Задает режим открытия визита только для чтения. В этом режиме задачи доступны только для просмотра.



DeepLinkConst.Parameters.TOTAL_IMAGES integer

The number of images in the visit.



DeepLinkConst.Parameters.DEBUG boolean

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



DeepLinkConst.Parameters.VERSION_API integer

The version of the built-in API in the app.



DeepLinkConst.Parameters.VERSION_APP integer

Application version code.



DeepLinkConst.Parameters.IS_NEW_VISIT boolean

A flag indicating a newly created visit.



ResultCode



DeepLinkConst.Parameters.RESULT_CODE integer

Result code.

  • VISIT_VALID (int: 1) - successful visit (new or open). Completed with the button to close the visit.
  • VISIT_ERR (int: 2) - visit error. Detailed information in RESULT_INFO.
  • SYNC_OK (int: 3) - Synchronization completed successfully.
  • SYNC_ERR (int: 4) - Synchronization failed. Detailed information in RESULT_INFO.


DeepLinkConst.Parameters.RESULT_INFO string

Error description or additional information.



Commands



DeepLinkConst.Parameters.IC_COMMAND string

Control command. Supported commands:

Possible errors

If while Eyrene is running:

  • if theapplication was closed by the system or by the user using the "Running Tasks / Delete Eyrene" button, VISIT_ERR will be returned as a result.
  • a failure occurred - depending on the type of failure, either VISIT_ERR or Intent data returns null.



Updated 03 Mar 2023
Did this page help you?