# Calls (/docs/agents/scheduling/calls)

> For the complete documentation index, see [llms.txt](https://docs.tandemcx.ai/llms.txt). Any page on this site can be fetched as Markdown by appending `.md` to its URL.

<Callout type="info">
    **This page is being rolled out.** If **Scheduling** isn't in your sidebar, it isn't enabled for
    your organization yet. Contact support.
</Callout>

## How Tandem calls

A calendar can have Tandem call the customer when their callback is due. Tandem runs one of your
published workflows, and the workflow places the call with a **Convert to Voice** node. The
workflow decides what happens on the call, and what happens when nobody answers.

## Set it up

1. Build a workflow whose first node is **Convert to Voice**. Set **To Number** to
   `$(booking_phone)` and pick a **From Number**, the caller ID the customer sees.
2. Publish the workflow.
3. Open the calendar under **Scheduling → Calendars** and go to the **Call** tab.
4. Turn on **Calls enabled**, pick the workflow under **Workflow**, and click **Save**.

**Workflow** lists published workflows only. With **Calls enabled** on and no workflow
picked, the field says `Pick a workflow for Tandem to run.` and **Save** stays off. Saving fails
with `That workflow no longer exists` if the workflow was deleted, and with
`Publish the workflow before Tandem can run it` if it isn't published.

If the workflow is unpublished later, the **Call** tab says `This workflow isn't published`, and
calls fail until you publish it again or pick another.

Tandem reads the setting when each callback comes due, so it covers callbacks booked before you
turned it on. Turn **Calls enabled** off and save to stop calling.

## Number customers see

The **Call** tab has a **Caller Number** section with **Number customers see**. It lists your
organization's phone numbers. The help text reads `Shown to customers as the number we'll call
from. Set this to the caller ID your call workflow uses.` Customers see it on their confirmation
and callback pages as `The call comes from {number}.` Clear the field to hide the line.

The setting is display only. The number Tandem dials from is the **From Number** on your
workflow's **Convert to Voice** node, so keep the two the same. If the number is deleted after you
pick it, the line is left out.

## Variables

Each run starts with these variables. Use them anywhere a workflow takes `$(name)`. A field the
customer didn't fill in is empty text, so a reference to it never fails.

| Variable             | Value                                                                  |
| -------------------- | ---------------------------------------------------------------------- |
| `booking_name`       | The customer's full name                                               |
| `booking_phone`      | Their phone number in E.164 format, such as `+15551234567`. Dial this. |
| `booking_email`      | Their email address, or empty                                          |
| `booking_reason`     | The reason they picked, or empty                                       |
| `booking_notes`      | Their notes, or empty                                                  |
| `booking_start`      | The booked time in UTC, such as `2026-10-08T14:30:00Z`                 |
| `booking_timezone`   | The customer's time zone, such as `America/New_York`                   |
| `booking_kind`       | `scheduled` for a picked time, `asap` for **As soon as possible**      |
| `booking_id`         | The booking's id                                                       |
| `booking_manage_url` | The customer's link to reschedule or cancel                            |

For an **As soon as possible** callback, `booking_start` is when the customer booked.

## Example

A workflow that hands the call to a voice agent:

1. **Convert to Voice** with **To Number** `$(booking_phone)` and a **From Number**.
2. On `default`, which **Convert to Voice** takes once the call is placed, an **AI Voice Agent**
   node. Under **Pass to agent**, add `booking_name` with the value `$(booking_name)` and
   `booking_reason` with the value `$(booking_reason)`. The agent reads them as
   `{{vars.booking_name}}` and `{{vars.booking_reason}}` in its prompt.

### Handling voicemail and no answer

**Convert to Voice** can also tell who answered, with **Detect Human or Answering Machine**. This
setting may not be available on every account yet. If your **Convert to Voice** node shows it,
turn it on and route its four exits:

- **`humanDetected`:** the **AI Voice Agent** node above.
- **`machineDetected`:** a **Play Message** node that leaves a voicemail.
- **`noAnswer`:** a **Send SMS** node to `$(booking_phone)` that says you tried to call and
  includes `$(booking_manage_url)`.
- **`detectionFailed`:** the call was answered but Tandem couldn't tell by whom. Send it to the
  **AI Voice Agent** node too, so every answered call reaches the agent.

## When Tandem calls

- **A picked time:** at the booked start.
- **As soon as possible:** at once.
- **A moved callback:** at its new time.
- **A cancelled callback:** never.

Tandem runs the workflow once per booked time. It does not call again when nobody answers; put
that handling in the workflow. Tandem does not check the time of day before calling: the booked
time fell inside the calendar's hours when it was booked.

If Tandem can't start the call within 15 minutes of the booked start, it doesn't call. For
**As soon as possible**, the limit is the end of the callback length.

## Call status

Once Tandem has acted on a callback, its sidebar on **Scheduling → Bookings** has a **Call**
section with one of these statuses. A reason follows the status where there is one.

| Status              | What it means                                                                                                                                                                                                                                      |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Call started        | Tandem started the workflow. Whether the customer answered is in the run.                                                                                                                                                                          |
| Not called          | Tandem didn't run the workflow: `calls were turned off for this calendar`, or `it was too late to call` (see [When Tandem calls](#when-tandem-calls)).                                                                                             |
| Call failed         | The workflow could not start. `the workflow was deleted or unpublished` is the usual reason.                                                                                                                                                       |
| Call status unknown | Tandem sent the request but could not confirm the workflow started, usually with the reason `Tandem lost track of the request; check Call Logs`. The call may have gone out: check **Insights → Call Logs** before you call the customer yourself. |

For **Call started** and **Call status unknown**, **View conversation** under the status opens the run in Call Logs.
