> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/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/obfXwZeC6EncVIoC/ai-for-service/flows/node-types/images/general-settings-ivr-digit.png?fit=max&auto=format&n=obfXwZeC6EncVIoC&q=85&s=3180d351b496aee193fb40689e754854" 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/Ns2xqLlABkt12FiY/ai-for-service/flows/node-types/images/text-to-speech-ivr-digit.png?fit=max&auto=format&n=Ns2xqLlABkt12FiY&q=85&s=8971408eb56af01f94e4d479fc5d68f0" 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/WQeI2XsPNoZFdu0g/ai-for-service/flows/node-types/images/audio-file-ivr-digit.png?fit=max&auto=format&n=WQeI2XsPNoZFdu0g&q=85&s=3b14863241baa4741d95ade468aefe0b" 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/obfXwZeC6EncVIoC/ai-for-service/flows/node-types/images/link-ivr-digit.png?fit=max&auto=format&n=obfXwZeC6EncVIoC&q=85&s=757a8a4b8412575dc1a93bdc90927211" 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/WQeI2XsPNoZFdu0g/ai-for-service/flows/node-types/images/condition.png?fit=max&auto=format&n=WQeI2XsPNoZFdu0g&q=85&s=f1b3a31b85fc1e8825acedc5b80dccc2" 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/Ns2xqLlABkt12FiY/ai-for-service/flows/node-types/images/timeout-ivr-digit.png?fit=max&auto=format&n=Ns2xqLlABkt12FiY&q=85&s=62ebe5b6cd543feb683e710b50774e33" 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/Ns2xqLlABkt12FiY/ai-for-service/flows/node-types/images/wrong-input-ivr-digit.png?fit=max&auto=format&n=Ns2xqLlABkt12FiY&q=85&s=ea09a37265b6a9ea8a0a7f012d90a1b8" 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/obfXwZeC6EncVIoC/ai-for-service/flows/node-types/images/error-handling-ivr-digit.png?fit=max&auto=format&n=obfXwZeC6EncVIoC&q=85&s=f605168900d2ba60214e908769c6c148" 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/obfXwZeC6EncVIoC/ai-for-service/flows/node-types/images/script-task-ivr-digit.png?fit=max&auto=format&n=obfXwZeC6EncVIoC&q=85&s=61e169020f8b360f9bf9eb0851225d42" alt="Script Task" width="1000" height="453" data-path="ai-for-service/flows/node-types/images/script-task-ivr-digit.png" />
