# Scheduler overview

> Booking pages the AI offers in chat and on calls: the form comes first so the lead is saved before anyone picks a time, then availability, hosts, rules and reminders.

The scheduler turns "call us to book" into a link — and into something the AI can *do*. Define an event (a consult, an estimate visit, a table), and it becomes a public booking page the AI offers in chat, texts after a call, or pins in the widget as a two-step booking card.

## Setting up an event

1. **Create the event** — Scheduler → **New event**: name, duration, availability windows, and the details to collect.
2. **Share it or embed it** — Send the `/scheduler/:key` link as it is, or drop the snippet on your own site — any button marked `data-bookbag-scheduler` opens it as a modal, and a `data-bookbag-scheduler-inline` div renders it in the page.
3. **Pin it in chat** — The website widget can carry the event as a pinned booking card: pick a time, leave your details, done — without leaving the thread.

> **A LINK AND AN EMBED, SAME URL:** Point a browser at `/scheduler/:key` and you get a real page you can paste into an email signature or a DM. The embed script and any API client asking the same URL get the page's JSON instead, so there is only one key to know. `?format=json` and `?format=html` force either.

## The form comes first

By default the form is step one and the calendar is step two, and the lead is **saved on submit** — before anyone picks a time. Someone who fills it in and then drops off is still a name, an email and a phone number you can call, which is the whole point. Turn that off with *Save the lead before showing times* if you want the calendar first.

## What you can configure

| Area | What it covers |
| --- | --- |
| Availability | Per-weekday open hours with copy-to-open-days, timezone, duration, least notice, days off, and a cap on bookings per day. |
| Questions | The fields on step one: text, textarea, number, email, phone, select (with options) and consent, each required or optional, full or half width. |
| Hosts | More than one and it goes round the team. Each host can bind to its own calendar. |
| Rules | A rule on any answer can end it before the times are ever shown, with the sentence you write — an unqualified lead never sees a calendar. |
| Reminders | Email or SMS, before the call and after a miss, with `{{name}}`, `{{when}}`, `{{title}}` and `{{host}}` filled in. |
| Calendar | The named calendar the booking lands on — see [calendars](/docs/scheduler/calendars). |

## How the AI uses it

- **In chat** — the booking [tool](/docs/ai/tools) offers real slots and books one mid-conversation.
- **On calls** — the receptionist books during the call and the confirmation text carries the details.
- **In workflows** — "missed call → SMS with the booking link" is two steps in the [editor](/docs/workflows/recipes).

## What a booking creates

A booking is a lead: it lands as a [contact](/docs/crm/contacts) and a card on the board with [attribution](/docs/crm/attribution), so the *card moved to Booked* trigger can start the [reminder cadence](/docs/workflows/recipes) — the one that cuts no-shows 30–50%.

> **ONE EVENT PER INTENT:** "New patient visit" and "cleaning" want different durations and questions. Separate events keep the AI's offer precise and the calendar readable.
