Actions
Entry Action
Section titled “Entry Action”entry: <sentence>
This is used to define the entry point of a USSD application with a sentence as the title.
Example
entry: Welcome to ussd.cloud finish: coming soon!Finish Action
Section titled “Finish Action”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
entry: Welcome to ussd.cloud finish: coming soon!Prompt Action
Section titled “Prompt Action”prompt: <sentence> -> <variable>
The prompt action is mainly for accepting user input into a variable with a provided sentence as the question.
Example
entry: The Shoe shop prompt: How many shoes do you want? -> num finish: You've confirmed purchasing {num} shoesOption Action
Section titled “Option Action”<number>: <sentence>
This is used to define user selectable options. Popularly known as menus.
Example
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 availableList Action
Section titled “List Action”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
entry: Welcome to DigiBank@getBanks -> [banks] list: {banks} -> (id, bankName) finish: You picked {bankName}