How to use an API to create Cloud IVR apps
By using an API to create and manage Cloud IVR apps, you get total flexibility in defining the customer journey, directly from your code. In this article, we will explain how you can get started using and API to create Cloud IVR services.
There are many questions you can start asking yourself as a business, when you move from having a static Voice response service - to having a dynamic one that can be changed automatically from your own software and business logic. Where should callers to be forwarded to if they press 1 in the menu? What information should be played to callers before they are connected to customer service? Under what conditions should you ask callers to leave a message instead of connecting them to someone's mobile? By using an API to adjust the flow and logic of a Cloud IVR, you can let your business logic define the IVR - instead of vice versa.
Get started with the API Before you can start working with the API you need to take these steps;
- Create a free account Sign up for a free Sonetel account.
- See API documentation The Cloud IVR API is part of the wider communications API provided by Sonetel.
- Create token Whatever you want to do with the API, you will need a token for authentication. You get the token by using your account credentials (email and password).
Creating the Cloud IVR apps In most cases the Cloud IVR API may be more useful for changing the configuration of your existing apps, rather than for creating them. It may therefore be easier for you to create the apps via the web app - which is explained here. But in case you want to create new apps as well, here are the steps;
- Create app You can create the app using this POST command. Use the token (see prior section) for authentication.
- Update the audio recording Find the IDs of the default prompts that are defined automatically with each new voice app. Create new custom prompts, to be played if callers press a certain digit in a menu. Update these with your recordings.
Update the Cloud IVR configuration Change the settings of an existing Cloud IVR app as follows.
- Change the settings You can see the current settings and then change forwarding settings and actions when callers make selections with this command.
- Change the recordings Find the IDs of the default prompts that are defined automatically with each new voice app. Create new custom prompts, to be played if callers press a certain digit in a menu. Update these with your recordings.
Photo by ThisisEngineering RAEng and Kevin Ku on Unsplash