User Input

User Input

The UserInput operation requests the network infrastructure to prompt the caller to enter a digit string via their DTMF keypad or equivalent.

The UserInput operation has two exits. If the caller abandons (i.e. hangs up) at any point in the operation, no further processing is performed and no exit is followed.

Otherwise, the exits followed are:

Config Parameters

The UserInput operation config attributes are as follows.

Parameter Type Description
main_announcement Announcement
Object
[Required] The main_announcement parameter is an Object using the shared announcement configuration structure as defined in the Flow Introduction documentation. This announcement is played as the prompt on the caller's first attempt to enter input.
reprompt_announcement Announcement
Object
[Required] The reprompt_announcement parameter is an Object using the shared announcement configuration structure as defined in the Flow Introduction documentation. This announcement is played as the prompt on the caller's second and subsequent attempts to enter input.
max_iterations Integer The maximum number of attempts that the caller may have to enter valid input.
(Default = 3)
min_digits Integer The minimum number of digits which constitutes a valid input.
This value must be within the range configured in the platform configuration, and must be <= max_digits.
(Default = 3)
max_digits Integer The maximum number of digits which constitutes valid input.
This value must be within the range configured in the platform configuration, and must be >= min_digits. (Default = 5)
end_character String Specifies the "End of Input" digit or handling.
If default, the system-default End-of-Input digit will be used.
If none, no End-of-Input digit will be used.
Otherwise the specified telephony digit will be used to indicate end of input.
(Default = default)
cancel_character String Specifies the "Cancel Input" digit or handling.
If default, the system-default Cancel digit will be used.
If none, no Cancel digit will be used.
Otherwise the specified telephony digit will be used to cancel input.
(Default = default)
target_buffer User Buffer [Required] The identifier for a writeable User Buffer configured in the platform configuration (e.g. User Buffer).
The caller's input will be written to this buffer.

Example Operation

Here is an example UserInput operation in JSON representation.

    {
        "id": 5,
        "type": "UserInput",
        "config": {
            "main_announcement": { "customer_name": "Main Customer", "entry": "Please Enter User Input" },
            "reprompt_announcement": { "customer_name": "Main Customer", "entry": "Invalid Input Please Try Again" },
            "min_digits": 9,
            "max_digits": 12,
            "end_character": "none",
            "cancel_character": "none",
            "target_buffer": "User Buffer"
        },
        "exits": [ 4, 17 ]
    }

In this example, valid input is between 9 and 12 digits.

If the caller enters a valid input, processing will continue via exit index 0 to the operation with ID 4.

If after three attempts (default max_iterations) the caller has failed to enter a valid input, processing will continue via exit index 1 to the operation with ID 17.

Exits

There are always exactly two exits for an UserInput operation.

Exit Index Name Description
1 Collected [Required] This exit is followed if the caller successfully entered a valid input, and is still connected.
1 Not Collected [Required] This exit is followed if the caller failed to enter a valid input after the maximum number of iterations, and is still connected.