Guide
Scheduled office hours define when your team is considered in office in Aysali Bot. The weekly timetable drives offline messaging, chat visibility, chatbot availability, welcome/follow-up timing, registration rules, and more.
Configure the schedule under Settings → General → Scheduled office hours. Set Timezone in the same section so hours are evaluated correctly.
What office hours control
| Feature | Setting location | Behavior |
|---|---|---|
| Offline message | Settings → Messages → Offline message | Sent outside office hours (and optionally when all agents are offline) |
| Hide chat widget | Settings → Chat → Hide chat outside of office hours | Widget disabled and hidden outside the timetable |
| Chatbot / AI | Settings → Chatbot → Disable during office hours (dialogflow-timetable) | Chatbot active only outside office hours when enabled |
| Welcome message | Disable outside of office hours | Welcome message skipped outside hours |
| Follow-up message | Disable outside of office hours | Follow-up skipped outside hours |
| Registration | Settings → Users → Disable registration during office hours | Registration form shown only outside office hours |
Rich [timetable] shortcode | Offline message / messages | Displays the weekly schedule to visitors |
The office_hours flag is exposed to the chat widget (CHAT_SETTINGS.office_hours) so front-end logic can react in real time.
Weekly timetable
Each day has two time ranges (start → end, and start → end). You can use one range per day by filling only the first pair.
- •
Open the timetable
Go to Settings → General → Scheduled office hours.
- •
Set each day
Click a time cell to open the picker. Choose start and end times, or Closed for non-working periods.
- •
Set timezone
Select Timezone below the timetable (offset + IANA zone, for example
3|Asia/Riyadh). - •
Save
Save settings and test from the chat widget at a time inside and outside your schedule.
Timetable rules
- Single range per day — use the first start/end pair only. Example:
10:00 AM→5:00 PM, then leave the second pair as Closed → Closed. Do not split one range across both pairs (for example10:00 AM→ empty and empty →5:00 PM). - No empty cells — never leave a slot blank. Use Closed instead.
- Whole day off — set all four cells for that day to Closed.
How times are interpreted
- Stored values use 24-hour
HH:MMinternally (for example10:00,17:00). - Evaluation uses your Timezone setting (
timetable-utc: UTC offset and zone name). The timetable hours apply in that timezone, not the visitor’s local time. sb_office_hours()compares the current moment against each day’s ranges using that offset.
Display format in the admin UI
Time labels in the picker (12-hour am/pm vs 24-hour) follow the browser language/locale of the admin user. Underlying stored values remain consistent regardless of display format.
Timezone
Settings → General → Timezone (timetable-utc) must match where your business operates.
- If unset on first save, the admin UI may default to the browser’s offset and zone.
- After changing timezone, review the timetable — the same clock times still apply in the newly selected zone.
Chatbot and office hours
When Settings → Chatbot → Disable during office hours is enabled:
- Inside office hours → chatbot/Dialogflow automation is off (agents expected online).
- Outside office hours → chatbot is on (unless human takeover or other rules block it).
This mirrors the classic “bot after hours, humans during the day” setup.