# Confirmation dialog object

Adds a confirmation step to an interactive element: before the action reaches your app, the reader sees a dialog and must confirm it.

| | |
|---|---|
| **Used in** | [Button element](https://workstation.repzo.com/docs/developers/block-kit/elements/button-element), [Checkboxes element](https://workstation.repzo.com/docs/developers/block-kit/elements/checkboxes-element), [Date picker element](https://workstation.repzo.com/docs/developers/block-kit/elements/date-picker-element), [Datetime picker element](https://workstation.repzo.com/docs/developers/block-kit/elements/datetime-picker-element), [Multi-select menu element](https://workstation.repzo.com/docs/developers/block-kit/elements/multi-select-menu-element), [Overflow menu element](https://workstation.repzo.com/docs/developers/block-kit/elements/overflow-menu-element), [Radio button group element](https://workstation.repzo.com/docs/developers/block-kit/elements/radio-button-group-element), [Select menu element](https://workstation.repzo.com/docs/developers/block-kit/elements/select-menu-element), [Time picker element](https://workstation.repzo.com/docs/developers/block-kit/elements/time-picker-element), [Workflow button element](https://workstation.repzo.com/docs/developers/block-kit/elements/workflow-button-element) |

## Usage

Set it as the element's `confirm` field. If the reader cancels, nothing is sent to your app and a select, date, checkbox or radio choice goes back to what it was.

## Fields

| Field | Type | Description | Required? |
|---|---|---|---|
| `title` | [Text object](https://workstation.repzo.com/docs/developers/block-kit/objects/text-object) | A `plain_text` text object that defines the dialog's title. Maximum length for this field is 100 characters. | Required |
| `text` | [Text object](https://workstation.repzo.com/docs/developers/block-kit/objects/text-object) | A `plain_text` text object that defines the explanatory text that appears in the dialog. Maximum length for the `text` in this field is 300 characters. | Required |
| `confirm` | [Text object](https://workstation.repzo.com/docs/developers/block-kit/objects/text-object) | A `plain_text` text object that defines the text of the button that confirms the action. Maximum length for the `text` in this field is 30 characters. | Required |
| `deny` | [Text object](https://workstation.repzo.com/docs/developers/block-kit/objects/text-object) | A `plain_text` text object that defines the text of the button that cancels the action. Maximum length for the `text` in this field is 30 characters. | Required |
| `style` | String | The colour scheme of the confirm button: `primary` (the default) or `danger`, which makes it red. Use `danger` for destructive actions. | Optional |

> **How Repzo Chat differs from Slack**
>
> - Each text field falls back to a default label when missing — "Are you sure?", "Confirm" and "Cancel" — so a partial object still shows a working dialog. Slack requires all four.
> - `mrkdwn` text is accepted and shown as plain text, with the formatting marks removed.
> - Works the same in messages, modals and the Home tab, on the web and in the mobile app.

## Examples

### A button that asks before it acts

```json
{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*Price offer PO-1187* for Cedar Retail Group is ready to send."
      },
      "accessory": {
        "type": "button",
        "text": {
          "type": "plain_text",
          "text": "Send to customer"
        },
        "style": "primary",
        "action_id": "send_offer",
        "value": "PO-1187",
        "confirm": {
          "title": {
            "type": "plain_text",
            "text": "Send this price offer?"
          },
          "text": {
            "type": "plain_text",
            "text": "Cedar Retail Group's buyer will get the offer by email right away."
          },
          "confirm": {
            "type": "plain_text",
            "text": "Send offer"
          },
          "deny": {
            "type": "plain_text",
            "text": "Not yet"
          }
        }
      }
    }
  ]
}
```

### A destructive choice in an overflow menu

```json
{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "Task: *Call back Atlas Engineering about the delivery date*"
      },
      "accessory": {
        "type": "overflow",
        "action_id": "task_menu",
        "options": [
          {
            "text": {
              "type": "plain_text",
              "text": "Mark as done"
            },
            "value": "done"
          },
          {
            "text": {
              "type": "plain_text",
              "text": "Delete task"
            },
            "value": "delete"
          }
        ],
        "confirm": {
          "title": {
            "type": "plain_text",
            "text": "Are you sure?"
          },
          "text": {
            "type": "plain_text",
            "text": "This can't be undone from chat."
          },
          "confirm": {
            "type": "plain_text",
            "text": "Yes, go ahead"
          },
          "deny": {
            "type": "plain_text",
            "text": "Cancel"
          },
          "style": "danger"
        }
      }
    }
  ]
}
```

## Related

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