hi
@Carlos Camacho JimenezSorry for late response! Better late than never hopefully.
I couldn't find a way to do this in GC. But, as a workaround we could hide the web chat button on the web page by using html code which has the same effect.
I produced a simple version (I'm not a web dev and this become obvious :)) and it was improved by actual web dev guys for us.
Within the button html implemented on the website there is this segment of code which decides when or not to show the button based on getHours
x-show="londonDate.getHours() >= 8 && londonDate.getHours() < 22"
And londonDate is defined by the below script which is implemented into the web page separately.
<script>
const londonDate = new Date((new Date()).toLocaleString("en-US", {timeZone: "Europe/London"}));
</script>
</div>
Hope this is of some use
Mark
------------------------------
Mark Elliott
Lemon Business Solutions
------------------------------
Original Message:
Sent: 09-28-2021 05:39
From: Carlos Camacho Jimenez
Subject: Web Chat Widget V2 - Using html to make a schedule decision
hi @Mark Elliott,
Finally, did you get this?
I am in the same situation as you were, I see that schedules are only available for chat in version 1.0 and 1.1 and I don't know how to apply time schedules in version 2.
Thanks in advance.
Best regards.
------------------------------
Carlos Camacho Jimenez
Evolutio Cloud Enabler S.A.
------------------------------
Original Message:
Sent: 05-07-2021 05:34
From: Mark Elliott
Subject: Web Chat Widget V2 - Using html to make a schedule decision
This Javascript will give some level of indication as to what i am looking for, but gives popups where I basically want the chat button to either appear or not based on time of day.
var currentTime = new Date().getHours();
if (currentTime >= 8 && currentTime <= 22) {
window.alert("Our chat is currently open");
} else {
window.alert("Our chat is currently closed");
}
I've tried a few different ways of pasting the chat widget into this code but it doesn't seem to want to work for me.
------------------------------
Mark Elliott
Lemon Business Solutions