This applet allows you to take numeric information from the user when they are pressing something on their keypads. The information gathered can be used for mobile number input, order id verification etc. along with the Pass-thru applet to process such information in real-time and proceed with an appropriate set of actions with the user on call.
You can choose to configure the gather applet parameters using the flow builder itself or control it dynamically through a URL. However, you'll need to configure the transitions (next applet) while building the flow irrespective.
1. Configure using flow builder
- Play a prompt to the caller to enter the input
- Specify Key Input behaviour
2. Configure parameters dynamically by providing a URL
In case you choose to configure the parameters dynamically using your application URL, you can set a ‘Primary URL’ for handling the requests. You can also set a ‘Fallback URL’ (optional) which will be contacted in case something goes wrong with your ‘Primary URL’.
If an application URL is set for gather applet, Exotel will make a GET request to the URL with the call details as URL-encoded HTTP query parameters.
The following are the parameters of the GET request. Note that only some of this list may be passed to your application - depending on what stage of the flow you have placed the gather applet.
This value will indicate the version of gather applet parameters against which your endpoint’s response will be validated.
Current Version: 1.0
Unique identifier of the call
In case of an outgoing call, it’ll be set to the number from which the call is made. In case of an incoming call, it’ll be set to the number from which the call is received
In case of an outgoing call, it’ll be set to the number being dialled out. In case of an incoming call, it’ll be set to the number where the call landed.
The status of the call depends on what stage it is at.
The direction of the call. Possible values: ‘incoming’ or ‘outbound-dial’
Timestamp when the call is created
Value in seconds from the time call is triggered to the second leg of the call till it is over (including conversation time). This value can be set to zero depending on the previous applet and if there’s no second leg in the call flow.
Timestamp when the call is started
1970-01-01 05:30:00 // Unix time (also known as POSIX time or epoch time)
Shows the number of the agent who was dialled to last
Flow id associated with the call
In case of an incoming call, it is the number of the caller. In the case of an outgoing call, it is the number of the first leg of the call.
In case of an incoming call, it is the ExoPhone into which the call came. In the case of an outgoing call, it is the number to which the call was made.
Current server time (format : yyyy-mm-dd, hh:mm:ss)
*These parameters will be passed if certain conditions are met as described below:
This will denote what happened with the second leg of the call if the previous applet was “connected”.
An array that will denote detailed information about each leg attempt if the previous applet was “connect”.
‘digits’ will be passed if there was a 'Gather' or ‘IVR’ applet before this applet and will be equal to the input digits that were entered. NOTE: This parameter comes with a double quote (") before and after the number. You'll have to trim() this parameter for double quotes (") to get the actual digits.
If the call was initiated via API, the value that was passed in CustomField in the API call will be set here.
|RecordingUrl||This will be populated if the previous applet was "voicemail". It will contain the URL of the voicemail recording. There could be a delay before the recording can be accessed depending on the length of the recording file.|
This is the response Exotel will expect to the GET request from your Gather Application URL. The response will decide what parameters will be set while executing gather during the call flow.
"text": "Hello Kovalan, please provide your order id",
"text": "It seems that you have not provided any input, please try again."
URL of the audio file or text which will be played out
"text": "Please enter your mobile number"
A maximum number of digits which are expected by the user to be entered, after which the gather should end successfully.
Input key after which the gather should end successfully.
Time period in seconds between each key press within which the user has to enter another input key (first input included)
Number of times menu has to be repeated if there is no input provided by the user
URL or text to be played out if menu is repeated i.e. in case repeat_menu > 0
"text": "Please enter your mobile number"
*Above set of parameters can also be controlled through the dashboard if one opts to configure the gather applet using the flow builder instead of Application URL.
When mandatory params are missing, URL is unresponsive (non-2xx) or type validation fails from both Primary and Fallback URL (if set), it will go to URL failure case.
- If optional parameters are not passed in response, it will be set to default.
If both finish_on_key and max_input_digits are passed, whichever criteria is met first will occur i.e. if finish_on_key is pressed or max_input_digits is reached as per user's input
Cases, where Fallback URL will be triggered, are:
Primary URL does not return HTTP 200 OK
Primary URL doesn’t return within the timeout period (5 seconds)
Primary URL returns invalid response:
Content-Type should be application/json
Mandatory parameters are present
audio_url / text should be http/https and returns 200 HTTP code
Authored-By: Sarthak Singhal, Product Manager, Exotel