Simple IVR

Simple IVR is a bot template available in the Library that demonstrates a sample voice architecture. Use this template to build a responsive IVR that can route your callers to different departments based on their choices and the date/time.

Getting Started: Download Bot

After logging into Communication Studio, you’ll be taken to the Bot Designer homepage, where all your bots (if you’ve created any) are listed. Click the blue plus button in the lower right corner, then select “Download from Library.”

Screen Shot 2018-04-26 at 12.14.17 PM

A window will open showing the available bot templates. Click the Download button beneath “Simple IVR,” wait for the confirmation, and hit “Go to bot.”

Screen Shot 2018-04-26 at 1.13.26 PM.png

Alternatively, you can close the window and open the new bot from your Designer homepage.

Edit your flow

The sample use case demonstrated in this template is fairly simple, so there is only one flow in the bot.

Screen Shot 2018-04-26 at 1.14.16 PM.png

Click on this flow to open it up in view-only mode. Now you can see the tree of steps that make up the flow logic.

Screen Shot 2018-04-26 at 1.14.42 PM.png

Click the Edit button in the lower right corner to open the flow in edit mode and start configuring the steps.

Screen Shot 2018-04-26 at 1.15.08 PM.png

Next, we will go through and configure each step in the flow.

Voice Gateway

As you may recall from other tutorials, every flow in the Designer must start with a gateway step. This step will set the conditions for when and how the flow will be triggered, as well as setting any necessary flow configurations and merge fields for the channel in question.

In this case, since we are creating an IVR, we are using the Phone/Voice gateway step, called Wait for Call (Phone). This step will set the flow to be triggered by an incoming phone call.

When you select this first step, you’ll notice its bright red color. This indicates that there is a required piece of configuration missing, which must be provided before the step will function properly. In this case, we must select a bot phone number to receive the incoming calls.

Screen Shot 2018-04-26 at 1.22.36 PM.png

Select a bot number from the Flow number(s) dropdown; the Wait for Call (Phone) step will then turn blue, indicating that the required configuration has been provided.

Screen Shot 2018-04-26 at 1.23.45 PM.png

(If you have multiple bot phone numbers available in your account, you can set your IVR to answer on some or all of them, instead of just one.)

Pick Up Call

The next step, Pick Up Call (Phone), doesn’t require any additional configuration. (There is a voice recognition setting, which you could use if you wanted to identify callers and match them to their data based on vocal patterns.)

Screen Shot 2018-04-26 at 1.28.01 PM.png

Set Global Commands

This step, Process Global Voice or Keypad Command (Phone), allows a flow designer to set various commands that will react to the caller regardless of where they are in the flow. This means the caller can interrupt menus and prompts at any time. For example, you could set a global voice command like “operator” that will transfer the user to an agent if they say “operator” at any point during their journey through the IVR.

In this simple flow, no global commands were created, so the step has only its default branches of “no commands” and “hang up.” The step under the “hang up” branch will execute if the user hangs up at any point during the call. Otherwise, the flow will continue to sequentially execute its steps as usual. If you create a new global command, a corresponding exit branch will appear on the canvas, where you can add steps.

Screen Shot 2018-04-26 at 1.35.00 PM.png

Prompt User for Input

Once we answer the call and set up our global commands, we can finally start interacting with the user. This step, Request Voice or Keypad Choice (Phone), allows you to create a prompt or menu whose choices are linked to keypad numbers and/or voice commands. In this case, we are asking for the caller’s choice of department so we can route the call accordingly.

Screen Shot 2018-04-26 at 1.39.18 PM.png

Each menu choice is associated with a number that the caller can press or speak to make their selection. You could replace “one” or “two” with other words if you wanted to. (For example, you could change “one” to “sales”, then adjust the speech section to replace “say or press 1” with “say ‘sales’ or press 1.”)

Screen Shot 2018-04-26 at 1.49.20 PM

Each choice, when created, adds its own exit branch to the step, which you can use to handle the different selections with different sets of steps.

Screen Shot 2018-04-26 at 2.01.07 PM.png

Request Voice or Keypad Choice also automatically creates exit branches for “unrecognized” or “no reply”, in case the user makes an unsupported selection or fails to respond.

Screen Shot 2018-04-26 at 2.11.45 PM.png

For this example, we are simply using a Hang up call (Phone) step under each of these branches. (This step doesn’t require any configuration, just ends the ongoing call.) However, it is best practice to give the caller another chance to hear the menu again or be directed elsewhere. This can actually be accomplished from within the Request Voice or Keypad Choice step, in the Re-prompts and timeouts section, before the step even exits via one of the error branches.

Click the Re-prompts and timeouts dropdown in the step UI. Here you can set the length of time you will wait for a response and create custom re-prompt messaging with the option for multiple differing messages. In this case, there is only one re-prompt configured, which will play after 5 seconds. If this second prompt doesn’t get a reply within another 5 seconds, the step will exit down the “no reply” path.

Screen Shot 2018-04-26 at 2.37.25 PM

Feel free to change the timeout length or add additional re-prompts here if you wish.

Direct call based on time of day

Next, we will look at the steps taken if the caller presses or says “1”, which in this flow should transfer them to the sales department. However, if the call takes place outside of business hours, we will need to handle that accordingly, with other transfers and/or custom messaging.

Click on the step labeled “Routing for Sales.” This step uses the Time-Based Routing template, which allows you to direct the flow based on date, day of week, and/or hour of day at the time of the call. Here, three branches have already been created: “Working hours”, “Christmas”, and “New Year.”

Screen Shot 2018-04-26 at 2.44.54 PM.png

Note the field for timezone, and use the search bar to find your local region/city. Regardless of the caller’s location, this step will route the flow logic based on the current time in the selected timezone.

Now, let’s take a look at each of the time routing conditions, starting with “Working hours.”

Screen Shot 2018-04-26 at 2.53.20 PM

Since we need to know the time of day, “Specific Time” is selected, instead of “All Day (24 Hours).” All weekdays have also been selected, so the times we choose will apply Monday through Friday but not on Saturday or Sunday. Lastly, we have two time segments: 9AM-12PM, and 1PM-9PM. These are the hours this (fake) sales department should be available to take calls. If the current time falls within these parameters at the time of the call, the time routing step will exit via this branch.

Move on to “Christmas.”

Screen Shot 2018-04-26 at 3.00.39 PM

Since Christmas takes place on a specific date, and the department will be closed all day on that date, “All Day” is selected, then a start and end date are chosen. In this case, we only need to check December 25th, so the start and end date are the same.

“New Year” is much the same as “Christmas”, checking for a specific date.

Screen Shot 2018-04-26 at 3.02.42 PM.png

If you’d like to try creating your own set of time constraints to match on, go ahead and click “Add new exit”. If you’d like to rearrange or remove exits, hover over the name of an exit and use the buttons that appear on either side.

Screen Shot 2018-04-26 at 3.04.32 PM

Lastly, the “else” branch will take effect if none of the above time conditions are met – e.g. if the current time is outside working hours and not Christmas or New Year’s Day.

If Working Hours: Transfer to Sales

If the caller reaches this bot during the working hours described in “Routing for Sales”, the next step to execute will be the one under the “Working hours” branch.

This is the Transfer or Refer Call (Phone) step, which transfers the call to the number you specify in Phone number to transfer to. Enter a valid phone number here, preferably one that will actually pick up – so you can test the transfer functionality when you activate the flow. When entering the phone number, be sure to include “+” and the country code.

Screen Shot 2018-04-26 at 3.11.28 PM

The Transfer timeout is how long you’d like to wait for an answer on the other side (going to voicemail counts as an answer) before exiting via the “error” branch. You can leave this at 20 seconds for now. Finally, come up with a caller ID for the final field. This will show up on the other end when the call gets transferred, so you can tell the “sales department” where this call came from and/or who is calling, instead of just showing the bot number.

Screen Shot 2018-04-26 at 3.18.17 PM.png

Again, to keep this flow simple, we will hang up the call with Hang Up Call (Phone) regardless of whether the transfer was successful or not.

If Christmas: Route to Voicemail

If an end user calls on Christmas, we will first acknowledge the holiday before moving on to record a voicemail. Since we want to say something to the caller then move on in the flow without waiting for a response, we use the Say Message (Phone) step.

Screen Shot 2018-04-26 at 3.55.16 PM.png

After speaking this brief message, Go To a Step in Current Flow is used to jump over to the first step in the “else” branch (which we will cover a little later in this tutorial).

Screen Shot 2018-04-26 at 3.59.54 PM

If New Year’s: Route to Voicemail

Similarly to Christmas, on New Year’s Day we will greet the user before jumping them over to the “else” branch to leave a voicemail.

Screen Shot 2018-04-26 at 4.02.12 PM

Screen Shot 2018-04-26 at 4.02.58 PM

If None of the Above: Record Voicemail

If the caller has reached our bot outside of normal business hours, we want to give them the option to leave a voicemail. We then want to make sure the voicemail is seen by a team member, so we will transcribe it and send it via email. This is also what will happen on Christmas or New Year’s, after the specific holiday message plays.

Click on the step labeled “no sales.” This step uses the Request Voice Recording (Phone) template from the Library, which speaks a message to the user before taking a voice recording and uploading it to our servers. The return data is a URL that points to that file.

Here, we are simply letting the user know that no one is available and prompting them to leave a voicemail. The step will know to end the recording when the user presses the pound key, and the resulting URL will be saved under the merge field {messageUrlSales}.

Screen Shot 2018-04-26 at 4.13.40 PM.png

Next, we will transcribe the voice recording into text so we can include that in our email to the sales team. The Transcribe Audio step does just that, taking {messageUrlSales} (remember, that’s our URL pointing to the audio file) and returning plain text under the merge field {transcriptTextSales}.

Screen Shot 2018-04-27 at 1.25.42 PM

Now that we have the text of the message, as well as the URL pointing to the audio file, we can send an email to the sales team.

Screen Shot 2018-04-27 at 1.30.33 PM.png

Choose your email provider and enter your email address and login password in the User Email and Password fields. This will allow the bot to access the send capabilities of your email server.

Screen Shot 2018-04-27 at 1.32.58 PM.png

Once you enter your email address, it will auto-populate into the Email field of the From section. This is what the recipient will see as the sender of the message. Choose a sender display name and enter a valid To address.

Screen Shot 2018-04-27 at 1.36.14 PM.png

In the Content section, you can set the subject and body of your email, and add any attachments. Both the subject and the body can accept merge fields for dynamic content. If you know HTML, you can turn on the “Use HTML in email content” toggle and build a custom template.

Screen Shot 2018-04-27 at 1.39.28 PM.png

Let’s take a closer look at the body of the email. Hover your mouse over the Your Message field and click the Screen Shot 2018-04-17 at 11.43.25 AMbutton to open it in a larger window.

Screen Shot 2018-04-27 at 1.43.27 PM

This field has been switched from plain text/merge field mode to code mode, which makes it a little more confusing to look at, but all you need to know is that ${this.get(‘someMergeField’)} represents {someMergeField}, and new merge fields can be inserted automatically if you click the {x} button. Also, the basic JavaScript || (‘or’) symbol allows us to replace the transcript text with an error message if the transcript step failed.

Screen Shot 2018-04-27 at 1.51.41 PM.png

Feel free to add additional content to the body of the email, and click the X in the upper right corner when you are done.

Hang up

Finally, once the email has been sent, we will hang up the call.

Screen Shot 2018-04-27 at 1.54.25 PM.png

Great! We’ve finished the Sales leg of the flow. Go ahead and save your changes, then we’ll move on to the Marketing leg.

Marketing: Route call based on date/time

If, after the initial prompt, the caller selects ‘2’ for marketing, we must check the date and time against open hours, just like for the sales department. The only difference in the configuration of Time-Based Routing here is that “Working hours” ends at 8PM, not 9PM. Again, we have the same four exit branches: “Working hours”, “Christmas”, “New Year”, and “else.”

Screen Shot 2018-04-27 at 2.00.23 PM

If working hours: Transfer call

If the call comes in during working hours, we must transfer the caller to the “marketing department”. Once again, the Transfer of Refer Call (Phone) step is used. Configure the missing fields just as we did in the Sales branch, with different info for the different department.

Screen Shot 2018-04-27 at 2.04.24 PM.png

Regardless of the success of the transfer, we will then hang up the call.

If Holiday: Greet, then voicemail

The “Christmas” and “New Year” branches are exactly the same here as they were in the Sales branch.

If off hours: Record voicemail

The “else” branch is almost exactly the same as well, just with slightly different messaging. Go through these steps and adjust the messaging as you see fit, and configure the email step just as you did before.

Screen Shot 2018-04-27 at 2.10.12 PM.png

Screen Shot 2018-04-27 at 2.11.58 PM.png

Once you finish that, you’re done configuring the flow!

Activate and Test

Click the arrow next to the Save Flow button in the lower right corner and select “Save & Activate.” This will save your changes and activate the flow trigger(s).

Screen Shot 2018-04-27 at 2.16.43 PM

After anywhere from a few seconds to a minute or two, you’ll get an activation notification.

Screen Shot 2018-04-17 at 1.34.20 PM

Now you can call the bot number and test it out!

View Traffic

Once you’ve interacted with your IVR, you’ll be able to view your path through the flow. If you’re still in edit mode, exit back out to view-only mode, then open the Deployment tab in the sidebar. Click the Traffic dropdown and select a period of time which will include your last interaction with the flow, then use the Show traffic button to visualize the activity for that time period.

Screen Shot 2018-04-30 at 2.39.49 PM.png

Screen Shot 2018-04-30 at 2.41.00 PM

If you’ve interacted with the flow multiple times, or if multiple end users have called the IVR, you’ll be able to see the paths taken with corresponding percentages of total traffic.  A thicker path indicates a greater percentage of traffic.

Screen Shot 2018-04-30 at 2.43.27 PM.png

 

Advertisements