Using both Quriobot and Rocketbots Web widget

So, although we have a live chat option in Quriobot you can use the best of both worlds!

Meaning that you use Quriobot to start your Rocketbot Web 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 Rocketbots Web Widget as a fallback for the live chat:

The live demo is located here

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

Step 1: Include the Rocketbots Widget installation code on your website:

<!-- This site is converting visitors into subscribers and customers with Rocketbots - https://rocketbots.io -->
<script id="rocketbots__widget" src="https://rocketbots.oss-cn-hongkong.aliyuncs.com/webchat/widget/widget.js?cId=ID"></script>
<!-- https://rocketbots.io/ -->

Add this script AFTER the widget script:

<script>
botmanChatWidgetClose = function(){
    if (typeof botmanChatWidget !== 'object') {
         return setTimeout(botmanChatWidgetClose, 100)
    }
    botmanChatWidget.close();
    document.getElementById('rocketbots__widget__root').style.display = 'none';
};
botmanChatWidgetOpen = function(){
    document.getElementById('rocketbots__widget__root').style.display = '';
    botmanChatWidget.open();
}
botmanChatWidgetClose()
</script>

Step 2:  We will make use of the Script Chat Text, Botman widget JS API which is used by the Rocketbots :

function() {
  setTimeout(function(){
    quriobot.hide()
    botmanChatWidgetOpen()
  }, 1000)
}

That’s it! If you add this as a response to an answer option, for example, you will open the Rocketbots Widget chat and hide Quriobot.

Enjoy!

Edit this page

Tags
See also