Bot Trigger Handler

The trigger handler is a piece of SalesIQ script that is used to invoke a custom action/message by the bot when the visitors visit your site. The trigger will be executed only when the rule set in the trigger condition section matches the visitor's criteria.

Example: This handler works like a salesman in a cloth store. Once a customer enters the store, a salesman walks up, greets you, and asks, what do you need or provides the customer with suggestions about the service they offer. The trigger handler works in the same way. 

The list of attributes passed when this handler is triggered are:

InputsTypeDescription
visitorMapDetails of the website visitor
requestMapDetails of the request

Trigger Handler in Zoho SalesIQ - Bot

To embed the trigger handler script:

  • Navigate to Settings > Bot > Zobot, click Add.
  • Enter the name, choose the platform - SalesIQ Scripts and then choose the brand. 
  • The SalesIQ scripts bot builder will appear.
  • Then, choose the Trigger Handler in the drop-down.
  • And then draft the script in the Trigger handler section, click Save and Publish.

Where to set up the trigger handler rule?

The trigger handler will be executed only if you have set a trigger rule in the 'Choose bot audience' section while configuring the bot and the website visitor matches the set criteria. You can either use the default criteria or customize it based on your website needs. Learn More.

Note: 

Triggers would not work in the following cases,

Sample Output

Sample Code:

Copiedresponse = Map();
response.put("action","reply");
response.put("replies",{"Hello there!! Welcome to Joy Therapy","How can I help you today?"});
response.put("suggestions",{"Book Therapy","Reschedule Therapy","Check the status of Therapy"});
return response;

In this example, the bot assists the visitors by providing suggestions. Here, the trigger handler will be invoked when the visitor visits the website.