Route Calls Based on Order ID
A food delivery company is offering its services to several restaurants in town. Customer orders food using their website and receives an order ID number. Later, customer makes a call to the Voice number to add something to their order, to check if the food is on the way or maybe they wish to cancel the order. IVR (Interactive Voice Response) menu answers this call and prompts the customer to enter their order number. This number is then cross–checked with the food delivery platform and based on the result, the call is transferred to the allocated restaurant phone number.
This way the food delivery company will use a single Voice number for call forwarding to different restaurants and customers will be delighted since there is only one phone number to be dialed regardless of the restaurant and the food they ordered.
This use case shows you how to create an automated inbound IVR (Interactive Voice Response) that will forward customers’ calls to an allocated restaurant phone number based on the order ID.
Process Workflow
In this scenario, end user calls the Voice number that the client has leased from Infobip and enters the order tracking number using their mobile phone.
This number should be automatically checked and confirmed by the client's backend systems. We expect to receive the phone number of the restaurant so we can forward the call to them.
IMPLEMENTATION STEPS
Steps over Web Interface
-
Log in to the Infobip web interface. After leasing a Voice number from Infobip, you can create your Flow.
-
Navigate to the Communicate module, click CREATE FLOW and select Start from Scratch.
-
Select Inbound call and click START BUILDING.
-
Select the Voice number that will be used for inbound calls.
NOTE
The Voice number will only be available if you have purchased one before. If there is no Voice number available on the drop-down list, you need to purchase one.
-
Select the element you want your IVR to start with. Inbound IVR usually starts with Play.
-
Inside the Play side panel, select the audio source: Text-to-Speech to enter the message you would like to convert to speech, or Audio File to use a pre-recorded audio file from your computer or URL location.
- In this step, you will collect the order ID from your end user. To collect user input, select Collect and fill in the required parameters.
- To get the information which restaurant phone number the call should be forwarded to, you have to send the entered order ID to your backend using the Call API element.
Fill in the values in the Call API side panel:-
HTTP(S) URL of your backend
-
Method to be used. In this example it should be POST.
-
Key - value to be used for authorization.
-
Key - value for the body of the request.
-
Variable to be received in the response - in this case PhoneNumber.
This value will be used as an input to which number the call should be forwarded.
-
- Use the Forward call element to initiate a call towards the restaurant (you will have received the phone number from the previous response).
- Your entire flow should look like this:
- The final step is to click VALIDATE and then LAUNCH NOW in the next screen that opens.
Every time your end user makes a call to this Voice number, the IVR system will answer the call and play the IVR scenario explained above.
Navigate to our Flow documentation to find out more on how to set up and Send Voice over Flow.