So, although we will have a live-chat option in Quriobot one day... Until that moment: How about the best of both worlds!


Meaning that you use Quriobot to start your Tawk.To widget if a user wants to talk to a live person and switch back once that conversation is over! 

Pretty cool, right? So here is the demo of Quriobot using Tawk.To widget as a fallback for the live chat:





The live demo is located here.


Step 0: In this explanation I already assume you to have a Quriobot running on your website.


Step 1: Include the Tawk.To installation code on your website:


 


Step 2: Add this code AFTER the widget code:


<script type="text/javascript">
Tawk_API.onLoad = function(){
Tawk_API.hideWidget();
};
Tawk_API.onChatEnded = function(){
setTimeout(function() {
Tawk_API.hideWidget();
document.getElementById("botbutton").classList.add('show');
quriobot.show_frame()
}, 1000)
};
</script>



Step 2:  We will make use of the Script Chat Text, Tawk.To Javascript API and Variables to pre-fill and open the widget:


function() {
quriobot.hide_frame();
setTimeout(function(){
document.getElementById("botbutton").classList.remove('show');
Tawk_API.showWidget();
Tawk_API.toggle();
}, 3000)
Tawk_API.setAttributes({
name: "{{name}}",
email: "{{email}}"
});
}


Note: we're using {{name}} and {{email}} Bot variables to indentify the user.

That's it! If you add this as a Response to an answer option for example, you will start the Tawk.To widget chat and hide Quriobot. Closing the Tawk.To chat will make Quriobot reappear!


Enjoy!!




Need more help or looking for inspiration? Join the Quriobot community!

Quriobot
Friendly & Fun
Interact & Convert