A script can be added to the website to control when the different chats appear 


This is example coding for Podium and Schedule Engine

 

The days/times are configured for when the SE chat will appear


Day 0 is Sunday, etc. 

In this example Day 1 - Monday, SE Chat will appear before 07:00 and after 18:00.

In the bottom section that controls the Podium Chat, insert the Podium API key.  

The SE chat will appear for the times listed and all other times the Podium chat will appear


<script>

    var hour_of_day = new Date().getHours();

    var day_of_week = new Date().getDay();

    if (day_of_week == 0 || 

        day_of_week == 1 && hour_of_day <= 7 || 

        day_of_week == 1 && hour_of_day >= 18 || 

        day_of_week == 2 && hour_of_day <= 7 || 

        day_of_week == 2 && hour_of_day >= 18 || 

        day_of_week == 3 && hour_of_day <= 7 || 

        day_of_week == 3 && hour_of_day >= 18 || 

        day_of_week == 4 && hour_of_day <= 7 || 

        day_of_week == 4 && hour_of_day >= 18 || 

        day_of_week == 5 && hour_of_day <= 7 || 

        day_of_week == 5 && hour_of_day >= 18 || 

        day_of_week == 6) {

            WebChat.loadChat({ apiKey: 'insertchatkey', primaryAccentColor: '#888888', autoOpen: true, autoOpenMobile: false, mobileHeightPercentage: 75, autoOpenExpiration: 1, title: 'Hi and welcome to Company Name, what can I help you with today?', initialMessage:  [] });

    }

    else {

      var script = document.createElement('script');

      script.src = "https://connect.podium.com/widget.js#API_TOKEN=podiumtoken";

      script.id = 'podium-widget';

      script.type = 'text/javascript';

      script.setAttribute('data-api-token', "podiumtoken");

      document.getElementsByTagName('body')[0].appendChild(script);        

    }

</script>