Skip to content

Actions

entry: <sentence>

This is used to define the entry point of a USSD application with a sentence as the title.
Example

source.ussd
entry: Welcome to ussd.cloud
finish: coming soon!

finish: <sentence>

The finish action is used to end a flow with some sentence. Every flow has an end and that’s the purpose of this action. To end flows.
Example

source.ussd
entry: Welcome to ussd.cloud
finish: coming soon!

prompt: <sentence> -> <variable>

The prompt action is mainly for accepting user input into a variable with a provided sentence as the question.
Example

source.ussd
entry: The Shoe shop
prompt: How many shoes do you want? -> num
finish: You've confirmed purchasing {num} shoes

<number>: <sentence>

This is used to define user selectable options. Popularly known as menus.
Example

source.ussd
entry: Welcome to DigiBank
1: Buy a book
finish: We're out of stock.
2: Buy some shoes
prompt: What brand of shoe do you want? -> brand
finish: We'll get you {brand} shoe.
3: Buy a bag
finish: we have no bags available

list: {variable} -> (<id>, <view>) without title

list: <sentence> | {variable} -> (<id>, <view>) with title

The list action is used in conjunction with an effect to provide a list of selectable user options coming from an API or external logic somewhere.

Example: getting a list of shoes from an API and then listing it with a list action

source.ussd
entry: Welcome to DigiBank
@getBanks -> [banks]
list: {banks} -> (id, bankName)
finish: You picked {bankName}