A menu is simply a step within a session. When interacting with a USSD service, each prompt that comes up is what we call the menu. An example is shown below. This is the first menu from the Vodafone Ghana mobile money menu when you dial *110#.
A menu consists of five (5) components which are described below:
Component | Description | Example |
---|---|---|
Type |
Indicates the type of menu. This can be one of the following: 1. Value - Menu requires an input which you specify in your dashboard 2. Variable - Menu requires an input which will be supplied atr runtime in your Android app 3. PIN - Menu requires a PIN. The SDK will ask the user to enter his/her PIN at runtime. 4. Button - Menu only requires a button to be pressed. You specify the text of the button to be pressed. 5. Choice - SDK will halt and wait for user to interact with underlying USSD dialog. |
|
Label |
A short name for this menu | Main menu |
Keywords |
An optional comma-separated list of keywords to look out for in the menu text. If this is specified, all keywords must all be present in the menu else the SDK will terminate with a MENU_CONTENT_MISMATCH error. |
Send, withdraw, airtime, data, financial, account |
Input |
Indicates the text the SDK should enter for this menu, or the text of the button which the SDK should press. This only applies to Value and Button type menus. | Send, Cancel |
Variable Key |
In v4, the variables parameter has been changed from an array to an object. If this menu's type is Variable, variableKey is the key in the SDK's variables parameter |
|
Branch Id |
The id of the optional branch of this menu. If specified, the SDK will redirect to the branch if validation fails for this menu | |
Resume Index |
In v4, menus now support branching out of the session. If you want the the SDK to merge back into the menu, resume index is the index of the menu to merge into |
- Click on the Add menu button
- Fill the form with the menu details
- Click the Save button to add the menu to your session
Awesome. You've created your first menu within your session.
Back: Sessions Next Up: SMS Parsers