> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-agentplatform-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Inbuilt tool - ivr_menu

<Badge icon="arrow-left" color="gray">[Back to Inbuilt tools](/agent-platform/inbuilt-tools/index#available-tools)</Badge>

The `ivr_menu` tool plays a prompt, waits for a single keypad press, and maps the pressed key to a step or intent.

## When to use

Use `ivr_menu` when callers choose from a numbered menu, such as "Press 1 for billing, 2 for support." For multi-digit entries such as account numbers, use [ivr\_digit\_input](/agent-platform/inbuilt-tools/ivr-digit-input).

`ivr_menu` is available on pipeline voice agents through the Kore Voice Gateway. For how DTMF works, see [DTMF support in Artemis voice agents](/agent-platform/dtmf-support).

## Declare the tool

```yaml theme={null}
TOOLS:
  ivr_menu(
      prompt: string,
      dtmfMappings: object[],
      noInputConfig: object,
      noMatchConfig: object,
      bargeIn?: boolean,
      language?: string
  ) -> {digit: string, matched: boolean, mappedIntent: string, branch: string}
```

## Parameters

| Parameter | Required | Description |
| - | - | - |
| `prompt` | Yes | Message played to the caller. |
| `dtmfMappings` | Yes | 1 to 12 mappings. Each mapping is `{key, nextStep, intent?}`, where `key` is a single character. |
| `noInputConfig` | Yes | What to do when the caller presses nothing: `timeout` (1–120 seconds), `maxRetries` (0–10), and `message`. |
| `noMatchConfig` | Yes | What to do when the key is not in the menu: `maxRetries` (0–10) and `message`. |
| `bargeIn` | No | Lets the caller press a key while the prompt is playing. |
| `language` | No | Language code for text-to-speech. |

## Returns

| Field | Description |
| - | - |
| `digit` | The key the caller pressed. |
| `matched` | Whether the key matched a mapping. |
| `mappedIntent` | The `intent` of the matched mapping, if set. |
| `branch` | `match`, `noInput`, or `noMatch`. |

## Example

```yaml theme={null}
FLOW:
  main_menu:
    CALL:
      ivr_menu(
        prompt: "Press 1 for billing, 2 for support, or 0 for an agent.",
        dtmfMappings: [
          {key: "1", nextStep: "billing", intent: "billing"},
          {key: "2", nextStep: "support", intent: "support"},
          {key: "0", nextStep: "escalate", intent: "agent"}
        ],
        noInputConfig: {timeout: 8, maxRetries: 2, message: "I didn't get that. Please choose an option."},
        noMatchConfig: {maxRetries: 2, message: "That isn't a valid option."}
      )
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.