Bot Context and Visitor Fields - Zoho SalesIQ

Context variables

The bot context and visitors fields are used to store the information temporarily collected from the visitor until the conversation ends and use it across flows to make decisions and perform actions based on it.

Bot context

  1. The bot context is a variable that can be used to store/save the response from the visitor for a particular card. In the below reference, when the visitors provides the location details, it will be saved in the bot context variable (location.option).  And this variable can be used in other card to get respective value. 
  2. To save the visitor's response, click on the Save in bot context check box and provide the variable name. 


  • Type %  in the card's message text box/email content to avail all the bot context available in the bot.

Example

  • Let's take an e-commerce service where you need to send an order confirmation email once your visitors place an order via Zobot. Store the values required in a bot context on each block as shown in the below reference and use them on the send email card to send order confirmation emails to the visitors.

  • Here, the name from Name card, email from Email card, choice of product by Multiple options card, Date from the Calendar card, and location from the location card is collected and saved in the respective bot context to use in the Send email card. 

Output

  • This is the output (Order confirmation mail sent to the visitors) of the above configuration. 


Idea
Get the custom values that is set using the visitor.info() JS API using the "%visitor.custominfo.{key name}%" 

For the below visitor.info() JS API Script, 
  1. <script>
  2. $zoho.salesiq.ready=function()
  3. {
  4.    $zoho.salesiq.visitor.info({"Brand" : "Premium", "Branch": "California"});
  5. }
  6. </script>
The %visitor.custominfo.brand% will fetch and display the value Premium

Visitor fields

  1. If you want to capture additional information of a visitor other than name, email and phone, the visitor fields can be used. 
  2. The visitor fields is also a variable to save the response from the visitor for a particular card in SalesIQ. This information will be displayed in the operator's dashboard. 

  1. This information can also be pushed to Zoho CRM or Desk (both default and custom fields are supported). 
  2. To save and push the visitor's response, click on Save in visitor fields check box and provide the variable name. 
Alert
To push the visitor's response to Zoho CRM, the visitor field name should be the same as the API name. Similarly, to push the visitor's response to Zoho Desk, the visitor field name should be the same as the label name.

Example 

  1. In the e-commerce business, leads will be created along with their interested or prefered choices of products.

  1. In the below reference, when the visitors selects the prefered mobile choice, it will be saved in the visitor fields variable (interested_products) and gets pushed to the CRM field. 

  1. The CRM field name and the visitor fields name must be same for this action. Both the default and custom fields for any layouts are applicable for this action. 


Output
  1. The lead will be created in CRM along with the interested products.


Dynamic text 

The dynamic text are pre-defined values & information that is already available in the bot. These texts can be used to enrich the resposes and do API tasks using plugs

Example

  1. Initially, the value "visitor.name" is available, but the value will be empty as the bot doesn't know the visitor's name.
  2. So with the name card, we're getting name from the visitor and then using again to provide enriched response. 


Notes
Type %  in the card's message text box/email content to avail all the dynamic variables in the bot.

List of dynamic text that you can use:

Dynamic Text Format What it represents Use in welcome card Use in consequent cards
%visitor.name% Name of the visitor on the website.
%visitor.id% Reference ID for the visitor on the website.  
%visitor.email% Email Address of the visitor on the website.
%visitor.phone% The contact number of the visitor.
%visitor.department% Name of the department to which the visitor has initiated the chat.
%visitor.question% The question raised by the visitor while initiating the chat.  
%visitor.ip% The IP address of the visitor visiting the website.
%attender.name% Name of the operator attending the chat.
%visitor.pagetitle% Title of the page from where the visitor has initiated the chat.
%visitor.pageurl% URL of the page from where the visitor has initiated the chat.
%visitor.referrer% Source from where the visitor is referred from.
%visitor.state% State/Province of the visitor.
%visitor.city% City of the visitor.
%visitor.country% Country of the visitor accessing the website.
%visitor.timezone% Time zone of the visitor accessing the website.
%visitor.latitude% Latitude of the visitor.  
%visitor.longitude% Longitude of the visitor.  
%visitor.operating.system% The operating system used by the visitor.
%visitor.browser% The browser used by the visitor.
%visitor.browser.version% The version of the browser used by the visitor.  
%web.embed.name% The web embed where the visitor has initiated the chat.
%platform% The platform used by the visitors in their system.  
%screen.resolution% Screen resolution of the visitor's system.  
%search.engine% The search engine used by the visitor to reach the website.  
%search.query% Search Query (Keyword)used by the visitor to reach the website.  
%attender.email% The email address of the attendee who attends the chat.
%smart.timenow% The time period in the sequence of the day (Eg. Morning, Evening).
%company.name% Company name mentioned in Clearbit.
%company.type% Company type mentioned in Clearbit.
%company.sector% Company sector mentioned in Clearbit.
%company.location% Company location mentioned in Clearbit.
%company.website% Company website mentioned in Clearbit.
%company.employeecount% Company's employee count mentioned in Clearbit.
%company.annualrevenue% Company's annual revenue mentioned in Clearbit.
%company.marketcapital% Company's market capital mentioned in Clearbit.
%company.fundraised% Company fund details present in Clearbit.
%company.twitterfollowers% Your company's Twitter followers from Clearbit.
%company.facebooklikes% The likes you got on Facebook registered in Clearbit.
%company.industrytype% The industry type your company belongs to.