Custom Triggers
Use the EVENT_CUSTOMTRIGGER event to handle the "Invoke JS API" trigger action when trigger criteria matches.
Steps to use:
- Subscribe to the EVENT_CUSTOMTRIGGER event using the ZohoSalesIQ.addEventListener API.
- Select "Invoke JS API" as the resultant action for a trigger rule.
- Invoke the ZohoSalesIQ.performCustomAction API to send a trigger at a point of interest.
- Handle data received in the event(triggerName, visitorInformation) to perform a custom action.
Parameters:
triggerName: Name of the custom trigger set in trigger criteria.
visitorInformation: Object containing visitor information.
Visitor Information:
Attribute | Description | Datatype |
name | Name of the visitor | String |
The email address of the visitor | String | |
phone | The contact number of the visitor | String |
os | Operating system used by the visitor. | String |
countryCode | Country code of the visitor. | String |
ip | The IP address of the visitor | String |
region | Region of the visitor (APAC/CANADA/EMEA/NA/SA). | String |
city | City(Location) of the visitor. | String |
state | State(Location) of the visitor | String |
numberOfChats | Number of previously closed chats had by the visitor | Number |
numberOfVisits | The number of times the visitor has used the app. | Number |
noOfDaysVisited | Number of days the visitor has used the app | Number |
totalTimeSpent | The total time duration that the visitor had spent on your site(in milliseconds). | Number |
firstVisitTime | The first time (Unix time) that the visitor visited your site. | Number |
lastVisitTime | The last time (Unix time) that the visitor visited your site. | Number |
Example
Copied
Example Trigger Response
Copied