USSD APIs allow you to automate processes based on user interactions with your USSD application, as well as personalise and customise your application flows.
USSD API Functionalities
USSD API functionalities include:
USSD log notification
Web query
USSD Log Notification (Callback)
This feature allows you to receive a detailed record of a user's USSD session, including menu selections and data submissions, based on your USSD menu created using our simple flow builder. To configure your callback notification on your application, follow these steps:
Click on CHATBOTS.
Select USSD FLOWS.
Find the flow you want to configure and click on VIEW.
On the page that opens, click on SETTINGS and you will see the configuration option as shown below
For detailed information on the request payload, refer to the USSD Notification API documentation.
Web Query
The web query action is a chatbot flow action that allows you to query an external system and present a message to the end user or programmatically redirect them to a new menu that you can personalise using data from the query’s response.
To set up the web query, follow these steps:
On the Mteja app, click on CHATBOTS.
Select USSD FLOWS.
Choose an existing flow or create a new one.
In the Edit window, drag the WEB QUERY ACTION to your flow.
Configure the URL as shown in the image below.
Note: You may optionally add headers that you may need for authentication.
Note: The web query action is a terminal flow action hence you cannot add more actions to the flow after it.
For detailed information on the request payload and expected response(s), refer to the USSD Web Query Action API documentation.
When responding with a new flow, the custom data may be used in the new flow for personalisation. To do this, include the parameter in the flow question as shown below.