Quriobot integration

Quick Navigation

As we currently do not have a native chatbot function in LiveAgent, there is an option to have a 3rd party chatbot integration with software called Quriobot. You can create an intuitive chatbot with which your customers will be interacting and define an option in Quriobot that will start a live chat and cancel the chatbot. Once the live chat ends, a visitor can start the chatbot again.

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 configuration, navigate to both the "Online button" section and "Offline button" section (if applicable), and insert the following code into the HTML fields.

<span></span>

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

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

<!-- Start of LiveAgent integration script: Chat button: Chatbot -->
<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.defer=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,
'https://mycompany.ladesk.com/scripts/track.js',
function(e){ chatButton = LiveAgent.createButton('BUTTON_ID', e);
chatButton.oldOnCloseFunction_ = chatButton.onCloseFunction_;
chatButton.onCloseFunction_ = function() 
{
chatButton.oldOnCloseFunction_(); 
quriobot.show();
}
});
</script>
<!-- End of LiveAgent integration script --> 

Quriobot part

Login to your Quriobot account, navigate to the 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 configuration, navigate to the Bot settings > Advanced initialization section, activate the "Advance initialization options", and insert the following code into the given field.

{
   onInit: function() {
     if (LiveAgent.instance.hasOpenedWidget()) {
       window.quriobot.hide()
     }
   },
   onLoad: function() {
     if (LiveAgent.instance.hasOpenedWidget()) {
       window.quriobot.hide()
     }
   }
}

Next, navigate to the "Channels" tab, click on the "Live chat" option, enable the developer mode at the top, switch the type of the live chat channel to Custom, and add the following script to the script field at the bottom of this section.

function() {
   chatButton.onClick();
   setTimeout(function() {
   quriobot.hide();
   }, 0)
}

It is possible to add more functions to the script to pass data from Quriobot messages to LiveAgent contact or ticket fields. Check the Quirobot guide for more details.

As the last step set up one of Quriobot's responses to start the live chat. For that, navigate to the Bot responses section in the Edit your bot tab and select "Live chat" as the next step of one of the bot responses.

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

×