IVR
, TEXT
(SMS and USSD), and RICH_MESSAGING
modes. These blocks may make use of the Expression Specification for generating output. Higher levels may make use of embedded Layer 3 primitives to describe more advanced functionality.MobilePrimitives
MobilePrimitives.Message
IVR
, TEXT
, RICH_MESSAGING
, OFFLINE
IVR
mode, and text for the TEXT
mode.config
prompt
(resource)SMS
(SMS): Sends prompt
as an SMS to the contact.USSD
(USSD): Displays prompt
as the next USSD prompt to the user. (Note on USSD session management: If there are following blocks in the flow, the user has an opportunity to reply with anything to proceed. If there are no following blocks, the contact is prompted to dismiss the session.)IVR
: Plays prompt
to the contact.RICH_MESSAGING
: Display prompt
within the conversation with the contact. Optionally, platforms may attach the audio from the prompt
resource (if provided) so that the contact can choose to play it.OFFLINE
: Display prompt
within the session with the contact.MobilePrimitives.SelectOneResponse
IVR
, TEXT
, RICH_MESSAGING
, OFFLINE
config
prompt
(resource)question_prompt
(resource, optional)choices
to present the choices on each supported mode. For the IVR
mode, they must also provide digit_prompts
.choices
(array of choices)choices
has the following elements:name
(string)block.value
) when a contact selects this choice, e.g. "chocolate" or "Somewhat Agree".test
(expression)prompt
(resource)config
:IVR
: digit_prompts
(array of resources)choices
, with content such as "Press 1", "Press 2", "Press 3". This is required when using question_prompt
to present choices individually.exits
.TEXT
(SMS): Send an SMS with the prompt text, according to the prompt configuration in config
above, and wait to capture a response. (Lack a response after the flow's configured timeout
, or an invalid response: proceed through the default exit.)TEXT
(USSD): Display a USSD menu prompt with the prompt text, according to the prompt configuration in config
above, then wait to capture the menu response. (Dismissal of the session, timeout, or invalid response: proceed through the default exit.)IVR
: Play the prompt, according to the prompt configuration in config
above, then wait to capture the DTMF response. (Timeout or invalid response: proceed through the default exit.)question_prompt
is provided, prompt
is ignored, and the prompt presented to the contact is generated as follows:<question_prompt>
<choices["chocolate"]>
<digit_prompts[0]>
<choices["vanilla"]>
<digit_prompts[1]>
<choices["strawberry"]>
<digit_prompts[2]>
RICH_MESSAGING
: Display the prompt text according to the prompt configuration in config
above. Platforms may wait to capture a text response, or display rich menu items for each choice and wait to capture a menu choice. (If displaying menu items, platforms should display only question_prompt
.) (Timeout or invalid response: proceed through the default exit.)OFFLINE
: Display the prompt text according to question_prompt
, and a menu of items for all choices
. Wait to capture a menu selection.name
of the selected choice to the output variable corresponding to the name
of the block.MobilePrimitives.SelectManyResponses
IVR
, TEXT
, RICH_MESSAGING
, OFFLINE
config
prompt
(resource)question_prompt
(resource, optional)choices
to present the choices on each supported mode. For the IVR
mode, they must also provide digit_prompts
.choices
(array of choices)minimum_choices
(integer, optional)maximum_choices
(integer, optional)choices
).choices
has the following elements:name
(string)block.value
) when a contact selects this choice, e.g. "chocolate" or "Somewhat Agree".test
(expression)prompt
(resource)exits
.TEXT
(SMS): Send an SMS with the prompt text, according to the prompt configuration in config
above, and wait to capture multiple responses. (Lack of the right number of responses after the flow's configured timeout
, or an invalid response: proceed through the default exit.)TEXT
(USSD): Display a USSD menu prompt with the prompt text, according to the prompt configuration in config
above, then wait to capture text describing multiple choices. (Dismissal of the session, timeout, or invalid response: proceed through the default exit.)IVR
: Play the prompt, according to the prompt configuration in config
above, then wait to capture multiple DTMF responses. Implementations may choose to optimize the user experience for additional guidance on answering multiple options. (Timeout or invalid response: proceed through the default exit.)question_prompt
is provided, prompt
is ignored, and the prompt presented to the contact is generated as follows:<question_prompt>
<choices["chocolate"]>
<digit_prompts[0]>
<choices["vanilla"]>
<digit_prompts[1]>
<choices["strawberry"]>
<digit_prompts[2]>
RICH_MESSAGING
: Display the prompt text according to the prompt configuration in config
above. Platforms may wait to capture a text response, or display rich menu items for each choice and wait to capture a menu choice. (If displaying menu items, platforms should display only question_prompt
.) (Timeout or invalid response: proceed through the default exit.)OFFLINE
: Display the prompt text according to question_prompt
, and a menu of items for all choices
. Wait to receive a menu confirmation.name
s of the selected choices to the output variable corresponding to the name
of the block.MobilePrimitives.NumericResponse
IVR
, TEXT
, RICH_MESSAGING
, OFFLINE
config
prompt
(resource)validation_minimum
(number, optional)validation_maximum
(number, optional)config
:IVR
: max_digits
(number)exits
.TEXT
(SMS): Send an SMS with the prompt text, according to the prompt configuration in config
above, and wait to capture a response. (Lack a response after the flow's configured timeout
, or an invalid response: proceed through the default exit.)TEXT
(USSD): Display a USSD menu prompt with the prompt text, according to the prompt configuration in config
above, then wait to capture the menu response. (Dismissal of the session, timeout, or invalid response: proceed through the default exit.)IVR
: Play the prompt, according to the prompt configuration in config
above, then wait to capture the DTMF response. (Timeout or invalid response: proceed through the default exit.)RICH_MESSAGING
: Display the prompt text according to the prompt configuration in config
above. Platforms may wait to capture a text response, or display a numeric entry widget and wait to capture a response. (Timeout or invalid response: proceed through the default exit.)OFFLINE
: Display the prompt text according to the prompt configuration in config
above, and display a numeric entry widget. Wait to capture a response.name
of the block.MobilePrimitives.OpenResponse
IVR
, TEXT
, RICH_MESSAGING
, OFFLINE
config
prompt
(resource)config
:IVR
: max_duration_seconds
(number)TEXT
: max_response_characters
(number, optional)exits
.TEXT
(SMS): Send an SMS with the prompt text, according to the prompt configuration in config
above, and wait to capture a response. (Invalid/empty response: proceed through the default exit.)TEXT
(USSD): Display a USSD menu prompt with the prompt text, according to the prompt configuration in config
above, then wait to capture the menu response. (Invalid/empty response: proceed through the default exit.)IVR
: Play the prompt, according to the prompt configuration in config
above, then record the user's response. (Timeout with nothing recorded: proceed through the default exit.)RICH_MESSAGING
: Display the prompt text according to the prompt configuration in config
above, and wait to capture a text response or an upload (audio, video) from the contact. (Invalid/empty response: proceed through the default exit.)OFFLINE
: Display the prompt text according to the prompt configuration in config
above, and display a text entry widget. Wait to capture a response.TEXT
, OFFLINE
, and RICH_MESSAGING
modes that capture a text response, this block writes the text received to the output variable corresponding to the name
of the block. For responses captured as media (IVR
, RICH_MESSAGING
) the ID or URL of the recording is written.