Skip to main content

Business calendar

Business calendars describe when the contact center is open: weekly working hours in a timezone, public holidays and your own closures. One calendar can be shared by inbound and outbound:

  • Inbound Studio flows ask whether a calendar is open right now and route the caller accordingly.
  • Outbound dialer campaigns use a calendar for their calling hours: a lead is only contacted when the calendar is open and the lead's own calling window is open. See Outbound Dialer.

Who can use it​

Supervisors and admins (users with the Flex supervisor or admin role) get a Calendars item in the side navigation once the feature is enabled. Agents don't see it.

The list shows each calendar's name, handle, timezone and holiday countries, with a badge showing whether it is open now. New calendar creates one. Each calendar has four tabs.

Calendar tab​

A month view with each day's hours. Holidays are violet, the calendar's own events blue, and disabled entries are struck through. Click a day to add an event, or an event to edit it.

Event types:

TypeEffect
ClosedClosed all day.
Custom hoursOpen only in the time ranges you set.
Close earlyCloses at the time you set.

Holidays tab​

Holidays are imported from the open-source date-holidays library (holiday data CC-BY-3.0).

  • Auto-import, countries (up to five) and holiday types (public, bank, school, optional, observance).
  • Holiday eves: a holiday that starts after noon makes that day an eve. Choose how eves are handled: close early at a set time (in 15-minute steps; if the holiday starts earlier, the center closes when it starts), closed all day, or regular hours.
  • Save settings and Import now, with the time and any error of the last import.
  • The imported holidays for this year and next, each with an on/off switch. Tags mark eves, holidays you edited, and holidays that no longer appear in the source.

Holidays are imported when a calendar is created with auto-import on, when the countries, holiday settings or timezone change, and automatically on the 1st of every month (for this year and next).

Editing an imported holiday marks it as edited, so later imports leave it alone; it can be reset to the imported values. Deleting an imported holiday disables it. Holiday names are shown in the interface language (English or Hebrew).

Settings tab​

  • Name and description.
  • Handle: the identifier Studio uses, 2 to 48 characters of lower-case letters, digits and - (holidays is reserved).
  • Timezone.
  • Weekly hours. New calendars start with Sunday to Thursday 08:00 to 20:00 and Friday 08:00 to 13:00; change them to your own.
  • Archive hides the calendar without deleting it.

Studio tab​

Shows what to paste into a Studio Run Function widget, plus a Check now button that shows whether the calendar is open at this moment.

  • Function: /features/business-hours/studio/check-calendar in the Floor Walker functions service in your Twilio account.
  • Parameter: calendar set to the calendar's handle.
  • Split on {{widgets.check_hours.parsed.open}} (with your widget's name in place of check_hours).

The function always answers successfully. If the Floor Walker service can't be reached or the calendar doesn't exist, it returns open: true by default, so callers are routed rather than dropped.

The response also contains reason (open, outside_hours, holiday, closed_event or close_early), the current event, today's opening hours and the next opening and closing times, which you can use in messages.

Which rule wins on a date​

Rules are applied in this order: imported holiday, then calendar event, then (for the dialer) a campaign's own exception. At the same level, the most restrictive rule wins: closed, then close early, then custom hours.

The Calendars screen, the Studio function and the dialer apply the same rules, so they always agree.

Setup​

  1. Enable the feature in the Flex configuration: custom_data.features.business_calendar.enabled: true (it is off by default). See Configuration.
  2. For Studio, use the Floor Walker functions service that the installation added to your Twilio account (see the Studio tab). Nothing else needs setting up.
  3. For the dialer, nothing extra is needed. The dialer refreshes each linked calendar every minute and keeps working with the last known schedule if the calendar service can't be reached.

In a dialer campaign, the calendar is chosen in the Calling hours settings, which also preview the next 30 days of holidays and closures. A running campaign held back by its calendar shows "Closed by calendar".