Trigger Handler

Bot Trigger Handler

The trigger handler is a piece of SalesIQ script which 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 intelligent trigger matches the visitor's criteria. The list of attributes passed when this handler is triggered are:

InputsTypeDescription
visitorMapDetails of the website visitor

Trigger Handler in Zoho SalesIQ - Bot

To embed the trigger handler script:

  • Navigate to Settings > Bots, click Add Bot.
  • Enter the name, description, choose website, departments and then select SalesIQ Script.
  • Then, choose the Trigger Handler in the drop-down.
  • And then draft the script in the Trigger handler section, click Save and Publish.

Sample Syntax For Bot Trigger Handler

In this example, we have used a travel website called Zylker travels. And the bot acts as a travel assistant and guides the visitors visiting the website. Here, the trigger handler will be invoked when the visitor visits the website.

response = Map();
response.put("action","reply");
response.put("replies",{{"text": "Hi, this is Zyt."},{"text":" Can you please choose a price range for the travel plan?"}});
response.put("input",{"type":"range-slider","values":{"500","1000","1500","2000"}});
return response;

Where to set up the trigger handler rule?

The trigger handler will be executed only if you have set the trigger rule in the 'Choose visitor type' while creating the bot and the website visitor matches the set criteria.

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohosalesiq.com