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 HubSpot live chat 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 HubSpot 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 HubSpot installation code on your website:


 


Step 2: Add this code BEFORE the widget code:


<script type="text/javascript">
window.hsConversationsSettings = {
  loadImmediately: false
};
</script>



Step 3:  We will make use of the Script Chat Text, HubSpot Conversations Javascript API:


function() {
    window.HubSpotConversations.on('conversationClosed', function() {
       window.HubSpotConversations.widget.remove(); 
       document.getElementById("botbutton").classList.add('show');
       quriobot.show_frame();
    });
    quriobot.hide_frame();
    setTimeout(function(){
        document.getElementById("botbutton").classList.remove('show');
        window.HubSpotConversations.widget.load({ widgetOpen: true });  
    }, 3000)
}


Note: HubSpot Conversations Javascript API doesn't seem to support setting an identity of the user ATM.

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


Enjoy!!




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

Quriobot
Friendly & Fun
Interact & Convert