Cancel order without talking to agent

Author Ellinor Niklasson

Last updated: June 17th, 2024 by Ellinor Niklasson

Customer scenario

Many customers want the convenience of managing their orders over the phone without speaking to an agent. This includes actions like cancelling orders or making changes.

Opportunity

Allowing customers to manage their orders through an automated system streamlines the process, providing quick and efficient service while freeing up agents to handle more complex inquiries.

Solution

  • Present the options available for the customer calling in, by a pre-recorded message.
  • Customer chooses an option and enters their order number
  • Perform the action in an external or internal system. 
  • Play another pre-recorded message to the customer, confirming that the action was successful or giving other feedback.

Click on the tabs below to get a step by step guide on how to Cancel order without talking to agent in your PBX:

Get started

Prerequisites

  • Advanced Nodes activated.
  • An API point to reach your customer database, e.g.
    www.yourcompany.com/order/manageOrder.
  • Access token to the API (if needed by your system).

Create new IVR or use existing

  • If this is your first IVR, please refer to the support page for info on how to set up an IVR with standard nodes: How to set up your PBX services.

  • The image to the right is an example of a complete IVR setup to cater for this use case. Use this as a reference to create your own IVR flow in the admin portal.

  • The following steps will go through the setup of the Advanced nodes marked with green in the IVR flow.

Delete

Enter order number

Add Save Keypad Input node

Choose an empty box in your IVR and click Advanced > Save keypad input to add the node. 


After choosing an option in the previous IVR node (in this example: “Update shipping address”, “Add an item to the order”, “Cancel order”), the customer will now be prompted to enter their order number using the keypad. 


An extra Save Keypad Input node will also be added in the next level, where the customer can enter their ZIP code to which they want to update their shipping address.

Variable name

Name of the variable where the digits will be saved, in this case we will call it orderNumber in the first level, and zipCode in the next node.

Sound that is played

Add a phrase asking the caller to enter their order number.

Minimum and maximum digits

Specifying how many digits a valid number must have can make it easier to know what type of number the customer should enter.

Delete

Manage the order

Add HTTP Request node

Choose an empty box in your IVR and click Advanced > HTTP-request to add the node.


Several different HTTP nodes will be added to this PBX. This is what they will do, from the left of the PBX:

  • Update shipping address (In this example the address can be updated if the new zip code is already in the system and corresponds to another company location).
  • Add the most common addon to the order.
  • Add the second most common addon to the order.
  • Cancel the order.

URL

Enter the URL address to the HTTP request.


Keep in mind that the request is sent from Telavox network which means that the system needs to allow requests made from the network 80.83.208.0/20.


What is a HTTP request?
HTTP works as a request-response protocol between a client and a system. What information you can receive from the system, and how to reach it, is specified in its API.


This example requires an API point which can accept a request containing an order number and a zip code and send back a response of whether the address could be changed or not. The system that the request is sent to could be your own, or the API of a supplier that you use.

Variable name

Choose what you would like to call the response from the HTTP request. The more accurate the description the easier it will be to understand in the next node, when we will use it.


The variable that is saved here can be accessed later in other Advanced nodes or in a Call Widget. A Call Widget can display information about a call to the agent answering it.


What will my response be?
What the response will be can differ, depending on the design of your API. In this example the response is a status code where 0 means success and other numbers are different types of errors.


JSON-Path

Choose this based on what format the response from the API will be in.


If the response from your system is already exactly what you want to save in the variable, such as “0” or “1” in this case, then no need to write a JSON-Path. 


But if the response is an object of information, where you need to extract the specific part needed for the variable, then enter the path to that part here.


Example of a JSON object:
{

    “customer”: {

        “name”: “John Doe”,

        “phoneNumber”: “+46706170786”,

      }

}

To save only the phone number in the variable, enter customer.phoneNumber as JSON-Path.

HTTP Method

Specify which method the API endpoint uses, either GET or POST.


POST is used in this example since information is posted to the system to update it. GET is used if no updates are made and the information is purely retrieved from the system to be displayed.

Request Content-type

This option will present itself when choosing POST. This is the format in which the following variables will be sent in the HTTP request. Check your API specification to find out what it should be.

Post variables

This option will also present itself when choosing POST. This is where the orderNumber and zipCode values from previous nodes are added to the HTTP request. The names “order” and “zip” are defined in the API endpoint in your system. 


Other examples of values to add to a request could be the article number of an item to add to the order, or a code which means to cancel the order, depending on which of the HTTP nodes it’s added to.

HTTP Headers

Here you get the option to input headers into the request if they are required by your system. This could be for authentication purposes for example. Another way to authenticate without using headers is to make sure the firewall of your service allows requests made from 80.83.208.0/20.


Once you have entered a Name and a Value, click the button to add this header to the request. You can add several headers.

Are there any limitations of what I can send in a header?
It’s not possible to send nested objects/JSON, only one plain text Name and Value per header.

We do not support OAuth which is an authentication method used in e.g. Microsoft Dynamics. It requires a token being sent back and forward which is not possible in Advanced Nodes.

Delete

Choose which pre-recorded message to play

Add Condition node

Choose an empty box in your IVR and click Advanced > Condition to add the node.


In this node we will check if the response from the HTTP request means that the changes made to the order were successful or not. One Condition node needs to be added for each HTTP node. The condition node will be followed by a Hang up node, which will play a pre-recorded message. Here are some examples of messages to play in the different condition nodes:

0: “The shipping address was successfully updated. Thank you for using our automated system. The call will now be ended.”
1:  “The new shipping address could not be found in your company profile and needs to be added manually. Please contact support for help!”
f: “The shipping address could not be updated due to a technical error. Please contact support for help.”

0: “Item XYZ was successfully added to your order. Thank you for using our automated system. The call will now be ended.”
f: “The item could not be added to your order due to a technical error. Please contact support for help.”

0: “Your order has successfully been cancelled! Thank you for using our automated system and have a lovely day!”
f: “The order could not be cancelled due to a technical error. Please contact support for help.”

Variable name

Enter the name of the variable that this node should check, in this example responseCode.


Conditions

There are several different types of conditions. Click on Read more to learn about them and choose the option that fits your needs.


In this example the response from the API is either “0” if the change of delivery address was a success, or “1” if it failed because no company location with that zip code was found. The request can also fail for other reasons, which will then be catched in the f-node. Here we choose EqualTo and set the values to 0 and 1.


EqualTo or Contains?
Choose EqualTo when the variable must match the value exactly. Contains is used when the value must be found in the variable as a part of it. E.g. +46123123123 contains +46.


What do I do if I need to add 100 different EqualTo conditions?
Each condition needs to be added manually, but instead of adding that many conditions there are some options to consider. 

  • If you find yourself needing to add 100 different conditions, you might want to create an API endpoint in your system and use the HTTP node instead. The endpoint would then receive the number and can return a corresponding response from your database, for example the number of the correct queue to send the call to.
  • If you have a number series that should all have the same outcome, e.g. number 1-5 should all lead to the external support queue, you can use GreaterThanOrEqual and LessThanOrEqual instead of EqualTo. Use two conditions-nodes instead of one. In the first one you choose GreaterThanOrEqual: 1. All numbers that match this condition will continue to the next condition-node where the condition will be LessThanOrEqualTo: 5. If a number passes this condition as well you know that they are within the range 1-5 and can send them to the external queue.

Delete