> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oration.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# IVR Menu

> Interactive keypad menu with branching

The **IVR Menu** node creates a classic telephone menu — "Press 1 for Sales, Press 2 for Support" — with configurable DTMF options, retries, and barge-in.

## Behavior

* Plays a prompt (TTS or audio file) listing the menu options
* Listens for DTMF key presses
* Routes to the matching option's output handle
* On invalid input, plays a retry message and re-prompts
* On timeout, follows the timeout path
* Output handles are **dynamic** — one per configured DTMF option, plus `Timeout` and `Invalid`

## Configuration

### Prompt

| Parameter         | Type   | Default                      | Options       | Description                                                 |
| ----------------- | ------ | ---------------------------- | ------------- | ----------------------------------------------------------- |
| `promptSource`    | enum   | `"tts"`                      | `tts`, `file` | Source of the audio prompt                                  |
| `prompt`          | string | `"Please select an option."` | —             | TTS text for the prompt (used when `promptSource` is `tts`) |
| `promptAudioFile` | string | `""`                         | —             | Audio file URL (used when `promptSource` is `file`)         |

### Timing & retries

| Parameter           | Type   | Default                                  | Range | Description                     |
| ------------------- | ------ | ---------------------------------------- | ----- | ------------------------------- |
| `timeout`           | number | `5`                                      | 1–30  | Seconds to wait for input       |
| `interDigitTimeout` | number | `3`                                      | 1–10  | Seconds between key presses     |
| `retries`           | number | `3`                                      | 1–5   | Retry attempts on invalid input |
| `retryMessage`      | string | `"Invalid selection. Please try again."` | —     | Message played on invalid input |
| `timeoutMessage`    | string | `"We did not receive your input."`       | —     | Message played on timeout       |

### Interaction

| Parameter         | Type    | Default | Description                                                    |
| ----------------- | ------- | ------- | -------------------------------------------------------------- |
| `bargeIn`         | boolean | `true`  | Allow caller to press a key before the prompt finishes playing |
| `confirmInput`    | boolean | `false` | Require the caller to confirm their selection                  |
| `enableStarPound` | boolean | `true`  | Enable `*` and `#` as valid menu keys                          |

### Menu options

Each option in the `options` array:

| Field        | Type   | Description                                                        |
| ------------ | ------ | ------------------------------------------------------------------ |
| `key`        | string | DTMF key (`0`–`9`, `*`, `#`)                                       |
| `label`      | string | Display label                                                      |
| `action`     | enum   | Action type: `goto` (go to node), `transfer`, `variable`, `hangup` |
| `targetNode` | string | ID of the target node (for `goto` action)                          |
| `event`      | string | Event name (auto-generated as `DTMF.{key}`)                        |

## Output handles

Output handles are dynamic based on configured menu options:

| Handle      | Description                                                     |
| ----------- | --------------------------------------------------------------- |
| **\[Key]**  | Caller pressed the corresponding DTMF key (e.g., `1`, `0`, `*`) |
| **Timeout** | No input received within timeout                                |
| **Invalid** | All retry attempts exhausted                                    |

## Use cases

<AccordionGroup>
  <Accordion title="Department routing">
    Configure options for key `1` (Sales), `2` (Support), `3` (Billing), `0` (Operator). Connect each output to the appropriate Transfer node.
  </Accordion>

  <Accordion title="Language selection">
    "Press 1 for English, Press 2 for Spanish." Route to different TTS nodes or AI Agents configured for each language.
  </Accordion>

  <Accordion title="Nested menus">
    Chain IVR Menu nodes: Main menu → Sub-menu. Use `*` as a "return to previous menu" key by connecting it back to the parent menu node.
  </Accordion>
</AccordionGroup>
