Quriobot is super cool, but sometimes you want to support live-chat on your website for your visitors. Quriobot already supports easy switching to most of the common social direct messaging for live chat support. But on your website is still on our Roadmap. With this solution you can easily setup to have Live chat during certain hours of the day and your fully automated Quriobot for all other moments.



The only thing you need to do is add the following code to your website HTML (within the <body> element):

<!DOCTYPE HTML>
<html>
    <head></head>
  <body>
    <!-- Example script code for time based switch starts here -->
    <script type="text/javascript">
      const date = new Date();
      const day = date.getDay();
      const hour = date.getHours();
      const minute = date.getMinutes();
      console.log(hour);
      console.log(minute);

      if (day >= 1 && day <= 5 && hour >= 8 && hour <= 15) {
      
        <!--
          your live chat solution widget code goes here 
        -->
      
      } else if (day >= 1 && day <= 5 && hour == 16 && minute <= 30) {
      
        <!--
          your live chat solution widget code goes here 
        -->
      
      } else {
      
        <!-- 
          your Quriobot URL (copy-paste that from the embed code) should be inserted on the script.src line below 
        -->
        
        let script = document.createElement('script');
        script.src = "https://quriobot.com/qb/widgetXXXXXXXX/XXXXXXXXX";
        document.getElementsByTagName('body')[0].appendChild(script);
      }
    </script>
    <!-- Example script code for time based switch ends here -->
  </body>
</html>

In the example snippet above the live chat will load on Monday to Friday, 09:00 - 17:30



Note: some live chat agents even support switching between Quriobot and live chat. For example, LiveAgent


Credits go to Jamie Barrett for first coming up with and sharing this solution!



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

Quriobot
Friendly & Fun
Interact & Convert