# Schedules Builder

The Schedules Builder provides the tools to create **Availability Schedules**. These can be referenced by the [Scheduler Web Control](../../web-controls/scheduler-web-control) to define the windows of time in which the Scheduler can be used to make appointments. The Availability Schedules are made by combining **Time Slots**, which are themselves also defined in the Schedules Builder.

Changes made in the Schedules Builder differ from changes made in most other Builders in that they do not only effect the app being immediately edited, they will be applied to all apps stored in their [Organization](../../administration/airkit-organizations). Take particular care when using the Schedules Builder to edit existing Availability Schedules or Time Slots, as the app being edited might not be the only one impacted by your changes.

Like most Builders, the layout of the Schedules Builder maps comfortably onto the general structure of the Studio: to the immediate right of the Builder Bar is the Tree, to the right of which is the Stage, to the right of which is the Inspector:&#x20;

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-f516c9fa8dc6a56b9edd0a203666158beb5f4780%2Fschedules-builder-v180-0.png?alt=media)

## Tree

The Tree is where you'll find an expandable and collapsible breakdown of Availability Schedules and Time Slots. Branching of this Tree consists of:

* Availability Schedules
  * All available Availability Schedules, both custom and pre-made
* Time Slots
  * All available Time Slots, both custom and pre-made

New Availability Schedules or Time Slots can be added in the same way: by clicking on the '+' icon to the right of the relevant branch in the Tree. Likewise, both Availability Schedules and Time Slots can be deleted by clicking the trash icon to their immediate right:

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-01fb9b612c234f682459bf3c96d9a661ad020cf9%2Fschedules-builder-v180-1?alt=media).gif)

### Availability Schedules

Availability Schedules define the windows in which appointments can be scheduled. They are made by combining the requirements of arbitrarily many Time Slots, see below.

Out of the box, Airkit comes with several Availability Schedules (as well as their component Time Slots) pre-configured. These correspond to regional [TCPA regulations](../../security-and-compliance/tcpa); utilizing them streamlines the process of creating TCPA-compliant apps.

### Time Slots

Time Slots define simple patterns of one-off or reoccurring blocks of time. A Time Slot might be, for instance, _every day from 8AM to 9PM PST_.

Time Slots are the component parts of Availability Schedules, and the blocks of time they describe are necessarily more simple. Consider that first example of a Time Slot: _every day from 8AM to 9PM PST_. This includes major holidays, and there is no easy way to define a Time Slot so that the repeating block of time does not appear on major holidays. _Every day from 8AM to 9PM PST except for on multiple arbitrary dates_ does not count as a simple pattern.

More complex patterns, such as _every day from 8AM to 9PM PST except for on multiple arbitrary dates including major holidays_ are best built out as Availability Schedules. When defining Availability Schedules, a Time Slot like _every first day of the year_ can be subtracted from a Time Slot like _every day from 8AM to 9PM PST_, resulting in the more complex Availability Schedule _every day from 8AM to 9PM PST except the first day of the year_. Because Availability Schedules can be constructed out of arbitrarily many Time Slots, there is no limit to how intricate Availability Schedules can become.

Out of the box, Airkit comes with several Time Slots pre-configured. These correspond to regional [TCPA regulations](../../security-and-compliance/tcpa); utilizing them streamlines the process of creating TCPA-compliant apps.

## Stage

The Stage displays a visual representation of the Availability Schedule or Time Slot being accessed in the Tree. This display can take two forms: a calendar, or a chart of timestamps. The Calendar Display will open by default upon selecting an Availability Schedule or Time Slot from the Tree, but you can toggle between the two displays at any time by clicking on the 'Calendar' and 'Chart' icons on the upper left of the stage:

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-01fb9b612c234f682459bf3c96d9a661ad020cf9%2Fschedules-builder-v180-2?alt=media).gif)

### Calendar Display

The Calendar Display shows what the selected Availability Schedule or Time Slot would look like if presented as events on a weekly calendar, the timezone of which corresponds to the timezone associated with the Availability Schedule or Time Slot. (Note that, depending on the size of the Stage and the web browser more generally, there will not always be room to display the full week, in which case the view can be modified by side scrolling.) You can confirm the timezone of the calendar you are viewing by noting what timezone is marked after "Viewing as" in the upper left of the Stage:&#x20;

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-9086fd4209dc97faa71ec7c3067d0053a1768f9d%2Fschedules-builder-v180-3.png?alt=media)

For instance, here is what the Calendar Display shows when viewing the Availability Schedule _TCPA - GA - America/New\_York_ (one of the many Availability Schedules that comes out of the box) on September 23rd, 2021. Note that in compliance with the relevant TCPA regulations, no availability is displayed on Sunday:

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-f100552d3a4f796ed6338a7b3e33f83fd0aa3755%2Fschedules-builder-v180-4.png?alt=media)

By default, the Calendar Display will set the showcased weekly calendar to the current date and will even mark the current time. (Note, in the above example, that there is a red line marking 14:15 PST: that's the time the screenshot was taken.) If you want to view past or future weeks, use the arrows on the upper right of the Stage. The '<' icon shifts the weekly calendar to the week before the one being displayed; the '>' icon to the week after:

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-01fb9b612c234f682459bf3c96d9a661ad020cf9%2Fschedules-builder-v180-5?alt=media).gif)

Visualizing how the weekly calendar displays multiple weeks is particularly important when you want to confirm that an Availability Schedule exhibits the desired behavior on holidays.

### Chart Display

The Chart Display shows all Availability Schedules or Time Slots within a given range of times. Unlike the Calendar Display, all dates and times featured in the Chart Display are always in UTC, and you can confirm that this is the timezone you are viewing by noting the timezone is marked after "Viewing as" in the upper left of the Stage:

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-0d4ba7bb567e7d9183fc9e723343d90f83d6a2b5%2Fschedules-builder-v180-6.png?alt=media)

By default, this range of times will reflect the range of times show by the Calendar Display upon switching views. For instance, here is what the Chart Display initially shows when viewing the Availability Slot _TCPA - GA - America/New\_York_ on September 23rd, 2021, assuming the Calendar Display still set to the present week:

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-a3f3644e41debbaada353f45999aae75af6da2f8%2Fschedules-builder-v180-7.png?alt=media)

To change the range of dates viewed in the Chart Display, select the desired dates and times from the dropdown menus above the chart:

![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-01fb9b612c234f682459bf3c96d9a661ad020cf9%2Fschedules-builder-v180-8?alt=media).gif)

## Inspector

The Inspector is where you can examine and modify selected Availability Schedules or Time Slots. The appearance and functionality of the Inspector differs depending on which of the two is being inspected.

### Availability Schedules

When examining Availability Schedules, the Inspector displays three expandable and collapsible sections: **Description**, **Date and Time Settings**, and **Time Slots**.&#x20;

* **Description** - Write, access, and edit a description of the selected Availability Schedule; this is recommended to make the intended use cases more explicit. The _Description_ section is also where you can access and edit a key to associate with the selected Availability Schedule; this key is a shorthand identifier that can be used refer to the Availability Schedule in an [Airscript](https://github.com/airkit/airkit-docs/blob/master/docs/v18-0/what-is-airscript.md?) expression.
* **Date and Time Settings** -  Select the reference timezone of the selected Availability Schedule.
* **Time Slots** - Define how and which Time Slots define the Availability Schedule. For more on how to define Time Slots, see the section below.

### Time Slots

When examining Time Slots, the Inspector displays four expandable and collapsible sections: **Description**, **Date and Time Settings**, **Recurrence**, and **Time Slots**.&#x20;

* **Description** - Write, access, and edit a description of the selected Time Slot; this is recommended to make the intended use cases more explicit.&#x20;
* **Date and Time Settings** - Select the reference timezone of the selected Time Slot.
* **Recurrence** - Define blocks of time as described by simple patterns, such as what time they begin, how long they are, and when they begin repeating (if they do).
* **Capacity** -  Set the number of appointments that can be made to an individual block of time before it is no longer available to schedule further appointments.
