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

# IVR Digit Input Node

Use this node to collect numeric input from callers, such as a phone number or the last four digits of a credit card. You can configure input conditions, success routing, timeout handling, and error handling.

## Configure the Node

### General Settings

In **General Settings**, configure the following:

<img src="https://mintcdn.com/koreai-ai-for-work-dev/Z6dnCk8OSS21ESL3/ai-for-service/flows/node-types/images/general-settings-ivr-digit.png?fit=max&auto=format&n=Z6dnCk8OSS21ESL3&q=85&s=ba2c62eda5c41185731b133e2e248909" alt="General Settings" width="363" height="386" data-path="ai-for-service/flows/node-types/images/general-settings-ivr-digit.png" />

* **Custom Name**: Enter a name to identify the node.
* **Your Message to User**: Select a message type under **Choose your message type**:

  * **Text to Speech**: Type or select a message to convert to speech. Click **+ Create New** to add a new prompt, or **+ Add Another** to define multiple messages (one is randomly selected at runtime).

    <img src="https://mintcdn.com/koreai-ai-for-work-dev/qFSL39UycgeH83Fj/ai-for-service/flows/node-types/images/text-to-speech-ivr-digit.png?fit=max&auto=format&n=qFSL39UycgeH83Fj&q=85&s=8c4495c308b72fcb5c36874e12cb37a1" alt="Text to Speech" width="328" height="450" data-path="ai-for-service/flows/node-types/images/text-to-speech-ivr-digit.png" />

  * **Audio File**: Type a message or click **+ Upload New** to upload an .mp3 or .wav file.

    <img src="https://mintcdn.com/koreai-ai-for-work-dev/y_m1Gv0LCU2NDHec/ai-for-service/flows/node-types/images/audio-file-ivr-digit.png?fit=max&auto=format&n=y_m1Gv0LCU2NDHec&q=85&s=ea181534e7824b51eda4032864387e3b" alt="Audio File" width="314" height="240" data-path="ai-for-service/flows/node-types/images/audio-file-ivr-digit.png" />

  * **Link**: Click **+ Create New** to add message text and an audio file URL (.mp3 or .wav). Click **+ Add Another** for additional URLs.

    <img src="https://mintcdn.com/koreai-ai-for-work-dev/Z6dnCk8OSS21ESL3/ai-for-service/flows/node-types/images/link-ivr-digit.png?fit=max&auto=format&n=Z6dnCk8OSS21ESL3&q=85&s=1e27aaa4edbc31f019af6f7d632209af" alt="Link" width="304" height="276" data-path="ai-for-service/flows/node-types/images/link-ivr-digit.png" />

### Condition

Click the **Condition** icon to define the criteria for accepting input:

* **Maximum length of digit**: Enter the maximum number of digits the caller can input.
* **Ending Keypress**: Enter the key that signals the end of input (for example, **#**).
* **On success**: Select a **Go to node** to route the flow when the condition is satisfied.

<img src="https://mintcdn.com/koreai-ai-for-work-dev/y_m1Gv0LCU2NDHec/ai-for-service/flows/node-types/images/condition.png?fit=max&auto=format&n=y_m1Gv0LCU2NDHec&q=85&s=3e8260763bdcfc76aab775dd3219cb05" alt="Condition" width="405" height="510" data-path="ai-for-service/flows/node-types/images/condition.png" />

### Timeout

Configure the timeout flow with the following fields:

1. **Timeout**: Enter the wait time in seconds before a timeout event occurs.
   * **Your Message to User**: Select a message type (Text to Speech, Link, or Audio) to play when a timeout occurs. See [General Settings](#general-settings) for details.
2. **Advanced Control**:
   * **Number of Tries**: Enter the maximum number of retries allowed.
   * **Action after Exceeding Retries**: Select the node to route to after retries are exhausted.

<img src="https://mintcdn.com/koreai-ai-for-work-dev/qFSL39UycgeH83Fj/ai-for-service/flows/node-types/images/timeout-ivr-digit.png?fit=max&auto=format&n=qFSL39UycgeH83Fj&q=85&s=b2dad873c9e7bf97337f2ffc48b4edfd" alt="Timeout" width="408" height="625" data-path="ai-for-service/flows/node-types/images/timeout-ivr-digit.png" />

### Wrong Input

Use this tab to configure the flow when a caller provides incorrect digit input.

1. **Your Message to User**: Select a message type (Text to Speech, Link, or Audio) to play. See [General Settings](#general-settings) for details.
2. **Advanced Control** > **Number of Tries**: Enter the maximum number of retries for correct input.
3. **Advanced Control** > **Action after Exceeding Retries**: Select the node to route to after retries are exhausted.

<img src="https://mintcdn.com/koreai-ai-for-work-dev/qFSL39UycgeH83Fj/ai-for-service/flows/node-types/images/wrong-input-ivr-digit.png?fit=max&auto=format&n=qFSL39UycgeH83Fj&q=85&s=da4a1b350f9f6404bc6da5a4c71789bb" alt="Wrong Input" width="411" height="537" data-path="ai-for-service/flows/node-types/images/wrong-input-ivr-digit.png" />

### Error Handling

Error handling is available under the **Wrong Input** tab. Use it to define how system errors are handled during a call.

* **Your Message to User**: Select a message type (Text to Speech, Link, or Audio) to play when a system error occurs. See [General Settings](#general-settings) for details.
* **Go to node**: Select the node for error handling. You can create a new node or select an existing one.

<img src="https://mintcdn.com/koreai-ai-for-work-dev/Z6dnCk8OSS21ESL3/ai-for-service/flows/node-types/images/error-handling-ivr-digit.png?fit=max&auto=format&n=Z6dnCk8OSS21ESL3&q=85&s=0eaa2491ace5382b5c7a06ed7f57e3d8" alt="Error Handling" width="369" height="400" data-path="ai-for-service/flows/node-types/images/error-handling-ivr-digit.png" />

### Store Digit Input

After the caller keys in their input, Contact Center AI stores it as a variable in a Script Task node. The context variable syntax is:

```
Context.steps.<< context_node_name >>
```

For example:

```
context.steps.IVRDigitInput
```

To store input from this node in a Script Task:

1. Add a **Script Task** node below the IVR Digit Input node.
2. In **General Settings** > **Define a Script**, add the step reference (for example, `steps.IVRDigitInput`).

<img src="https://mintcdn.com/koreai-ai-for-work-dev/Z6dnCk8OSS21ESL3/ai-for-service/flows/node-types/images/script-task-ivr-digit.png?fit=max&auto=format&n=Z6dnCk8OSS21ESL3&q=85&s=db62140e1e1064af0bdba07c080096a5" alt="Script Task" width="1000" height="453" data-path="ai-for-service/flows/node-types/images/script-task-ivr-digit.png" />
