# Plan block

Displays a list of related tasks under one title, so readers can follow a multi-step process — such as an AI agent working through a request.

| | |
|---|---|
| **Type** | `plan` |
| **Available in** | Messages, Modals, Home tab |
| **Compatible block elements** | [URL source element](https://workstation.repzo.com/docs/developers/block-kit/elements/url-source-element) |

## Usage

For a single step, use a [task card block](https://workstation.repzo.com/docs/developers/block-kit/blocks/task-card-block) on its own. Update the message as tasks progress to move them through their statuses.

## Fields

| Field | Type | Description | Required? |
|---|---|---|---|
| `type` | String | The type of block. For a plan block, `type` is always `plan`. | Required |
| `title` | String | Title of the plan, in plain text. | Required |
| `tasks` | Array of [Task card block](https://workstation.repzo.com/docs/developers/block-kit/blocks/task-card-block) | The tasks, in order. Each is a task card without `type`; each `task_id` should be unique within the plan. Maximum of 50 tasks. | Required |
| `block_id` | String | A unique identifier for the block. Maximum length is 255 characters. It must be unique within the message or view — a duplicate is replaced and reported as a warning. | Optional |

> **How Repzo Chat differs from Slack**
>
> - Slack shows plans in messages only. Repzo shows them in modals and the Home tab too.
> - A task's `status` may also be `pending` (an empty circle), which is the default when it's missing.

## Examples

### An agent preparing a renewal

```json
{
  "blocks": [
    {
      "type": "plan",
      "title": "Preparing the Al Noor Trading renewal",
      "tasks": [
        {
          "task_id": "usage",
          "title": "Checked seat usage",
          "status": "complete",
          "output": {
            "type": "rich_text",
            "elements": [
              {
                "type": "rich_text_section",
                "elements": [
                  {
                    "type": "text",
                    "text": "23 of 25 seats active in the last 30 days"
                  }
                ]
              }
            ]
          }
        },
        {
          "task_id": "invoices",
          "title": "Reviewed open invoices",
          "status": "complete",
          "output": {
            "type": "rich_text",
            "elements": [
              {
                "type": "rich_text_section",
                "elements": [
                  {
                    "type": "text",
                    "text": "No overdue invoices"
                  }
                ]
              }
            ]
          }
        },
        {
          "task_id": "quote",
          "title": "Drafting the renewal quote",
          "status": "in_progress",
          "details": {
            "type": "rich_text",
            "elements": [
              {
                "type": "rich_text_section",
                "elements": [
                  {
                    "type": "text",
                    "text": "Applying the 5% loyalty discount"
                  }
                ]
              }
            ]
          }
        },
        {
          "task_id": "send",
          "title": "Send the quote to the account owner",
          "status": "pending"
        }
      ]
    }
  ]
}
```

## Related

- [Blocks](https://workstation.repzo.com/docs/developers/block-kit/blocks)
- [Block Kit overview](https://workstation.repzo.com/docs/developers/block-kit)
