Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Latest commit

 

History

History
42 lines (27 loc) · 2.96 KB

03.Menus.md

File metadata and controls

42 lines (27 loc) · 2.96 KB

Home

Menus

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#.

Components of a menu

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

Create a menu

  1. Click on the Add menu button
  2. Fill the form with the menu details
  3. Click the Save button to add the menu to your session

Conclusion

Awesome. You've created your first menu within your session.


Back: Sessions Next Up: SMS Parsers