Client Actions

Some functions can be defined in the client inside the $zoho.salesiq.clientactions object. This will be invoked when the corresponding bot widget's CTA button is clicked. Learn More.

PARAMETERS

name - Name of the CTA button specified in the bot code

element_id - ID of the image that the carousel is focused on while clicking the CTA button

 

Syntax:


				<script>
$zoho.salesiq.ready=function()
{
   $zoho.salesiq.clientactions = 
{
   $clientaction_name :function({"name":$name, "element_id":$elementId})
   {
	// Code to open the popup
   }
 }
}
</script>			

Example:

The following is an example that defines the client_action openBookingForm in the object. When the book button is clicked, this function will be invoked which in turns opens up the booking form.


				<script>
$zoho.salesiq.ready=function()
{
     $zoho.salesiq.clientactions = {
     "openBookingForm" :function(details)
      {
	  var actionName = details.name;
	  var selectedElement = details.element_id;
          
          // show Booking Form Code here
       }
}
}
</script>