.chat.waitinghandler()
This event handler allows you to invoke a method that would display a customized message along with the chat widget waiting timer.
PARAMETERS
data: Waiting time.
waitingtime: Waiting time configured in your Website settings.
currenttime: Current waiting time in seconds.
RETURN VALUES
return ""; : Waiting timer will not be displayed in the chat widget.
return '<value>'; : Current waiting time in seconds.
Examples:
return 'Welcome! Thank you for visiting our site';
return '<b>Welcome! Thank you for visiting our site</b>';
return '<img src ='https://www.zoho.com/salesiq/img/Zilliumonline.png>';
Syntax
Copied$zoho.salesiq.chat.waitinghandler(function(data){});
"data" :
{
"waitingtime" : "<Configured waiting time>",
"currenttime" : "<Current waiting time>",
}
Example
Copied<script>
$zoho.salesiq.ready=function()
{
$zoho.salesiq.chat.waitinghandler(function(data)
{
if(data["waitingtime"]!=data["currenttime"]);
{
return "";
}
return'<iframewidth="250"height="250"src="https://player.vimeo.com/video/764850725?autopause=1&dnt=1&autoplay=1" frameborder="0" allowfullscreen>';
});
}
</script>