Gorgias logo
Gorgias logo

All articles

Set custom business hoursUpdated 2 months ago

This suggestion isn't an official feature of our Chat widget, so our support for it is limited - we recommend that it be implemented by someone with a technical background.


The following method can be used to set custom business hours for your Chat:

1<script>
2 var initGorgiasChatPromise = (window.GorgiasChat) ? window.GorgiasChat.init() : new Promise(function (resolve) { window.addEventListener('gorgias-widget-loaded', function () { resolve();})});
3
4 initGorgiasChatPromise.then(function () {
5 // Edit business hours on the go, if `Hide chat outside of business hours` is enabled, the chat will automatically appear or disappear.
6 GorgiasChat.setCustomBusinessHours({
7 // Using a timezone from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
8 // Day 1 represents Monday, Day 7 represents Sunday
9 timezone: "Australia/Sydney",
10 businessHours: [
11 { days: [1, 2, 3], fromTime: "08:15", toTime: "17:50" },
12 { days: [4, 5], fromTime: "08:15", toTime: "12:00" }
13 ]
14 })
15 });
16</script>
Was this article helpful?
Yes
No