## Overview

**Schedules** are reusable weekly templates that describe the **expected journey** of your operation
inside the Conversa Labs **Team Management** module. Each schedule has a **name**, a
**timezone** and an **active** flag. From a schedule you **generate planned shifts** over a date
range: the platform materializes the recurring weekly blocks into concrete, dated shifts.

Those **planned shifts** become the expected baseline — the "when the agent should be working" — that
**schedule adherence** compares against the live status timeline. In other words, the schedule
defines the plan, generation turns the plan into dated shifts, and adherence measures how closely the
real presence matched that plan.

> In this version, the Schedules screen manages the **template** (name, timezone, active) and triggers
> **shift generation**. The per-weekday recurrence block map is authored **via the API** for now (the
> model and the generation job already consume it). A visual weekly editor is a future iteration.

## Prerequisites

- The Team Management module is **optional** and must be **enabled for your account**. If you can't find the
  Team Management area, ask an administrator to turn it on.
- The **Schedules** tab lives in the Team Management **settings** and is available to **administrators** (and to
  custom roles granted the Team Management permissions).
- The **per-weekday recurrence blocks** (the repeating hours) are authored **via the API** in this
  version — the screen manages the template (name / timezone / active) and shift generation.

## Step by step

### Create a schedule

1. Open **Team Management** → **Settings** → **Schedules**.
2. Click **Add**.
3. Enter a **Name** (e.g. "Business hours Mon–Fri").
4. Choose a **Timezone** — shifts are generated in this timezone, so use the team's working timezone.
5. Leave **Active** on (or turn it off to keep the schedule as a draft).
6. Click **Save**.

### Generate shifts from a schedule

1. On the schedule row, click **Generate shifts** (calendar icon).
2. Pick a **start date** (from) and an **end date** (to) for the range.
3. Click **Generate shifts**. Generation runs in the background; planned shifts are materialized for
   the whole range from the schedule's recurring blocks.

### Edit, deactivate or delete

- Use the **pencil** to edit the name, timezone or active flag.
- Turn **Active** off to show the **INACTIVE** badge: the schedule is kept but no longer used as a
  reference.
- Use the **trash** to delete the schedule.

## Settings & options

| Field / action | What it does |
|---|---|
| **Name** | Identifies the schedule in the list. Required to save. |
| **Timezone** | The timezone used to generate shifts. Align it to the working timezone so adherence matches. |
| **Active** | Keeps the schedule in use. Off shows the **INACTIVE** badge (draft). |
| **Generate shifts** | Materializes planned shifts between a start date and an end date. |
| **Per-weekday recurrence blocks** | The weekly hour map, authored **via the API** in this version. |

## Monitored scope on generation

Shift generation materializes shifts **only for monitored agents**. If an agent assigned to a
template leaves monitoring, already-generated shifts are preserved — only future generations skip
them — and the schedules list shows an amber warning with how many of the template's agents are
outside monitoring.

## Use cases

- Model a standard weekday journey and generate a whole month of shifts at once.
- Keep a separate schedule for weekend coverage with a different set of blocks.
- Prepare the expected baseline that feeds each agent's **schedule adherence**.
- Park a deactivated schedule as a draft until you validate the hours before generating.

## Tips, limits and best practices

- Generation is **asynchronous** (it runs in the background) — shifts appear shortly after you confirm.
- The **Generate shifts** button only enables once **both dates** (start and end) are filled in.
- Generate **one range at a time** and avoid overlapping ranges to prevent duplicate planned shifts.
- Set the schedule's **timezone** to the team's working timezone — that's how adherence compares
  expected against actual correctly.
- The **adherence target** is configured in the **General** tab of the Team Management settings, not on the
  schedule.

## Troubleshooting

- **I don't see the Schedules tab** — the module isn't enabled for the account, or you aren't an
  administrator.
- **The Generate shifts button is disabled** — fill in both the start date and the end date.
- **I can't save the schedule** — the **Name** field is required.
- **Generated shifts don't affect adherence** — check that the per-weekday recurrence blocks were
  authored via the API, that the timezone is correct, and that agents are monitored with an expected
  journey set.

## See also

- **Team Management overview** — the big-picture view of the module.
- **Monitoring board** — the team's live status that adherence uses as the actual baseline.
- **Statuses & breaks** — the status catalog with timers and limits behind the timeline.
- **Queues** — group agents and inboxes with a distribution policy.
- **Monitored agents (enrollment)** — who appears on the board and the expected daily journey.