Quriobot integration

Quick navigation

As we do not have a native chatbot function in LiveAgent the only option to get a chat bot is use a 3rd party solution. This article described how you can utilize a chatbot from Quriobot. You can create an intuitive chatbot that will be interacting with your customers all the time, however you might want to define an option in Quriobot that will start a live chat and cancel the chatbot. Once the live chat ends, it can trigger the chatbot again. This guide will describe the Quriobot integration with LiveAgent step by step from both sides to create a simple chatbot that can open LiveAgent's live chat window.

 

Quriobot part

Create a new Quriobot account here, do not forget to confirm it from your email. Then, in the Quriobot's panel, navigate to Dashboard and create a new bot.

 

Name your chatbot, choose the plain "Start from scratch" template, and proceed further by clicking on the "Next" button.

 

In the bot's settings, enable the developer's mode to use scripts in the bot's settings. For now, in the edit section, leave all the bot's messages and options as they are by default, navigate straight to Bot responses, and edit the "Yes" answer option. Change its type to "Script" and insert the following code below. Do not forget to save the bot.

 function() {
  chatButton.onClick();
  quriobot.hide_frame();
  document.getElementById("botbutton").classList.remove('show');
} 

 

After you'll save the bot, navigate to the "Channels" tab, click on the "Embed code - Embed the bot on your website" option, copy the bot's script, and paste it on your website before the </head> tag as instructions say.

 

LiveAgent part

In your LiveAgent panel, navigate to Configuration > Chat > Chat buttons, and create a new button of "Custom > own HTML code" type. In the chat button's settings, navigate to both the "Online button" section and "Offline button" section (in case you are not displaying an offline button when no agents are online there is no "Offline button" section), and insert the following code into the HTML fields.

<span></span>

 

Save your chat button, take the following code from below the next image, and integrate it on your website before the </body> tag.

Do not forget to replace "XXXXX.ladesk.com" for the real domain name of your LiveAgent account and also to replace "AAAAAAAA" for the real ID of your chat button. You can find the ID of your chat button in its settings in the "Integration" section.

<script type="text/javascript">
var chatButton;
(function(d, src, c) 
{ 
  var t = d.scripts[d.scripts.length - 1], s = d.createElement('script');
  s.id = 'la_x2s6df8d';
  s.async = true;
  s.src = src;
  s.onload = s.onreadystatechange = function()
  {
    var rs = this.readyState;
    if(rs && (rs != 'complete') && (rs != 'loaded'))
    {
      return;
    }
    c(this);
  };
  t.parentElement.insertBefore(s, t.nextSibling);
})
(document, 'XXXXX.ladesk.com', function(e) 
{
  chatButton = LiveAgent.createButton('AAAAAAAA', e); 
  
  chatButton.oldOnCloseFunction_ = chatButton.onCloseFunction_;
  chatButton.onCloseFunction_ = function() 
  {
     chatButton.oldOnCloseFunction_(); 
     quriobot.show_frame();
  }
});
</script> 

 

That's it. Your page is now integrated with Quriobot's chatbot that is able to open LiveAgent's chat window.

×