With the help of Zadarma API and Webhooks, you can make a multilevel voice menu and create your own robot secretary or auto informer with a link to your database. Who might need it and how to do it, we are describing in this blog post.
Who might need it
First of all, robot secretary or auto informer is an online-store privilege (regardless of the number of clients). With the help of an auto informer you can free up operators’ work hours hence decreasing company’s operation expenses. Even the small members of e-commerce community with one agent (who, obviously, works from 9 to 5 pm) with the help of phone informer can answer most popular questions and track the order.
Example: a client calls your store
- A voice menu greets him: Good afternoon, this is ### store, if you want to track your order press 1; if you want to know working hours of pickup point press 2; if you want to know the addresses of stores in your city press 3; if you have a different question related to purchasing or delivery, stay on the line and you will be connected to an agent.
- A client presses 1
- IVR asks to enter 6 digits of the order number in tone mode
- Client enters the order number
- IVR sends a request, receives up-to-date information from your database and send an answer in a template form. For example, “Your order is the pickup center number 3. You can pick it up daily between 9 am and 6 pm”.
This popular and seemingly difficult case can be realized with the help of Webhooks Zadarma.
To realize this task you will only need 2 methods:
- NOTIFY_START — the beginning of an incoming call to PBX
- NOTIFY_IVR — caller’s response to a specified action
You can find method descriptions in API Zadarma, the list includes:
- Play file;
- Play popular phrase;
- Play digits;
- Play number (in accordance with rules of complex numbers);
- Request the caller to enter digits.
Simple explanation: after the call and voice greeting the client enters a digit in tone mode and is moved to the second level of IVR, which asks for the order number. After digits are entered the system sends a request to your databes and comes back with a pre-recorded voice notification. You can create up to 100 template notifications to send clients in response to their requests. Or with the help of our standard digits playing system the answer can be played as a number (in this case you do not need to create template answers).
What do you need to do?
4 easy steps:
Step 1. Enable free Cloud Zadarma PBX (the initial setup is done with an intuitive wizard and IVR can be set up later).
Step 2. Connect a virtual number (as always, you can choose from over 90 countries around the world). You can also connect one of your own numbers (from a different service provider) as an additional external line.
Step 3. In personal account in “Incoming calls and IVR” create a required number of IVR. You can upload your files or just type in the text of the menu and the system will translate it to voice (there are 16 languages available and several voices for each language).
Step 4. Write a simple code depending on the task (here you will, of course, need some programming skills). Examples of code are in the next section.
Implementation examplesOn Github there is an PHP example for the implementation of three easy tasks:
- Voice menu plays last 3 digits of the incoming call number;
- In tone mode the caller enters their date of birth and the system says how many days there are until caller’s birthday;
- Endless IVR (voice menu, in which caller can go a step forward and backwards)
Another example of a popular task:
After voice greeting the caller enters via DTMF their identification number, the system sends a request to the database and replies back by saying the balance and says goodbye using one of the pre-recorded templates.
We are constantly improving our API interface, as well as updating functionality of different Webhook methods. You can direct your suggestions in the comments section or email them to firstname.lastname@example.org.