Bot Designer makes it easy to build an IVR (Interactive Voice Response) for your business with drag-and-drop components. With IVR, you can create a phone menu that’s easy to navigate by voice or keypress, and route users’ calls to the correct department in a snap.
Create Your Bot
We’ll start with a fresh bot in the Designer. Log into your Communication Studio account and click the blue plus button in the lower right, selecting “Add a blank bot”.
You can name your bot anything you like; here we’re calling ours “Sample IVR.” Once you have entered a name and description for your bot, click “Save”.
Create Your Flow
Once your bot has been created, click the blue plus button to add a new flow, and select “Add a blank flow.”
Give your new flow a name and description; we’re calling ours “Main IVR.” Once you’re done, click “Save Flow” in the bottom right corner.
You’ll notice that the flow canvas comes with an empty node already in place — that’s the Start node, where our first step will go. As you may already know, the first step in any flow must always be a gateway, which specifies the trigger(s) that will initiate the flow. In this case, our gateway step will be Wait for Call (Phone), which kicks off the flow when an incoming call is received.
Add Your Steps
Before we can add steps to the canvas, we will have to download the relevant step templates from the Library. In the sidebar, navigate to Templates, then click “Browse our templates in the Library” at the bottom.
In the subsequent window, scroll to the Phone section of the step templates list, and click “Download” under a template to add it to your flow. (You can collapse the other step sections for easier navigation, and you can also use the Search bar to refine the list.)
For this simple IVR, we will need the following Phone steps: Hang Up Call (Phone), Pick Up Call (Phone), Request Voice or Keypad Choice (Phone), Say Message (Phone), Transfer or Refer Call (Phone), and Wait for Call (Phone). We will also need the Go To a Step in Current Flow step from the Logic section of the templates list.
Once you have downloaded these steps, you can close the Library window. The steps will now be visible in the Templates list.
Configure Your Gateway
Now we can start adding steps to the canvas. First of all, as mentioned above, we will need the all-important gateway step — in this case, Wait for Call (Phone). Drag this step to the empty node on the canvas and the sidebar will show the step details for you to configure. Select a bot number to use for the IVR; this is the number your customers will call to access your system. Optionally, you can add a description to the step for added clarity and flow readability.
Pick Up Call and Gather User Input
Once the gateway is configured, we can start communicating with the user. We’ll start by dragging the Pick Up Call (Phone) step onto the canvas, connecting it to the previous step by dropping it onto the empty node below the gateway. We need this step for the IVR to answer the incoming call. Next, drag the Request Voice or Keypad Choice (Phone) step onto the canvas and add it to the next empty node. In this step, we will specify what we want the menu to say when the caller picks up. We’re going with “Hello, how can we direct your call? For sales, press 1 or say ‘sales’. For support, press 2 or say ‘support’,” but you can enter any message of your choosing, or select “Click to add audio” to play an audio file from a URL instead.
The Request Voice or Keypad Choice (Phone) step expects the user to press keys or say something after they hear the message. To collect this input, add options to the Choices section of the step UI.
Based on our initial message to the user, we have created two choices: press 1 or say “sales”, and press 2 or say “support. The number to the left of a choice represents the expected keypad press, and the word in the text box represents the word a caller can speak instead of using the keypad. Each choice you create will add another corresponding exit branch to the step, thus creating an empty node where you can specify next steps.
You’ll also notice two additional branches, one for “unrecognized”, and one for “no reply”. These allow you to specify what actions the flow should take if the user says or presses something other than the menu options, or if they fail to respond to the prompt.
Route Call Based on Caller Choice
Now that we have created options for our callers, we must determine how the flow will react to the different choices, and what should be done if the caller fails to respond as expected. We will do this by adding sequences of steps to each of the different branches created by Request Voice or Keypad Choice (Phone).
If the caller selects sales, we will route them to the sales department, using the Transfer or Refer Call (Phone) step. Before transferring the call, though, we should confirm their choice and let them know what’s happening, using the Say Message (Phone) step, which does not expect a user response.
Let’s keep it simple, and add the Say Message (Phone) step with the simple phrase “Now transferring to the sales team…” Use the “Text to speech settings” dropdown to see available voice options.
If the call is transferred successfully, the next step to execute will be the one beneath the “success” branch. If the call is not answered before the timeout is reached, or if the transfer fails for any other reason, the next step to execute will be the one beneath the “error” branch. Let’s add some steps here. We will say a simple error message in the case of a failure, and if the transfer is successful we will tell the flow to hang up the call and end the session.
Here we have used Say Message to notify the user of the failure, and Hang Up Call to end the call on the bot’s side in either case. Do not forget to include the Hang Up Call step — otherwise the session will stay active and you will be charged for the minutes.
Rinse and Repeat
One of the great tools available in the Canvas is the “Clone Tree” button.
Since the sequence of steps (the “tree”) we’ll use for the “support” branch is almost identical to that of the “sales” branch, we will use the Clone Tree button to save time. This button creates a copy of the selected step and any subordinate steps beneath it, along with their configurations.
To clone a step tree, select the top-level step of the tree you’d like to duplicate, and click the Clone Tree button.
This will create an exact replica of the step tree, which you can then drag around the canvas.
Drag the duplicated tree onto the empty node beneath the “support” branch of Request Voice or Keypad Choice.
Now you can go into each step in the tree and adjust the content/configuration. Change the messaging in “Now transferring” to “Now transferring to the support team…” instead of “…sales team”, and change the destination number and step title in the Transfer or Refer Call step. The “Sorry” and Hang Up Call steps can remain the same.
Handle Unexpected Input
Finally, now that we have specified what will happen if the caller successfully chooses a menu option, we must tell the flow what to do if the user fails to respond or if their response cannot be recognized.
First, we will handle unrecognized inputs, by adding steps to the “unrecognized” branch. Use the Say Message step to let the user know what happened. Here, we just put “Sorry, I didn’t understand your selection.”
After that, we could re-prompt the user a different way, transfer them to a call center, etc., but to keep it simple we will just send them back to the original menu, through use of Go to a Step in the Current Flow. This step allows you to jump from one node to any other non-empty node in the flow. Use the dropdown menu in the step UI to select the destination step; it should be Request Voice or Keypad Choice. The search box in the dropdown can help narrow the list of steps.
You may want to rename this Go To step for readability, perhaps something like “Go to main menu”.
Handle No Reply
If the caller fails to speak or press a selection after a certain amount of time, the Request Voice or Keypad Choice step will exit via the “no reply” branch. We could handle this in a variety of ways, but to keep our flow simple, we will just revert back to the main menu. Use the Go to step again to achieve this.
Activate and Test
Once all branches of the Request Voice of Keypad Choice step have been handled, your flow is complete! Click the arrow next to the “Save Flow” button at the bottom of the sidebar and select “Save and Activate” to save and publish the flow. Alternatively, you can just click “Save Flow”, then back out into view mode and click “Activate”.
Activation time will vary depending on the nature of the flow; in this case, the flow should activate within 15-30 seconds, at which point you will see a dialog letting you know the activation was a success.
Congratulations, you have created an IVR! You can now test your IVR by calling the bot number specified in the gateway step. Once you have interacted with the IVR, you can view your path through the flow by exiting Edit mode, clicking the Deployment tab, opening the Traffic menu, selecting a time period, and clicking “Show Traffic.”