This article should provide you with the steps and knowledge to create an IVR script with a limited loop or to add one to an existing IVR script.
We are starting with a new IVR script to provide an easier situation for describing the steps. In this case we are creating a script for a customer who has three phone queues. They have separate queues for sales, support and a main queue for all other types of calls. They want callers to have three chances to provide a queue choice. If the caller selects an option other than the two valid options (1 for sales, 2 for support) they will be sent to the main queue. If the caller does not enter a number within three seconds they are asked for a number two more times before being sent to the main queue.
Virtual Contact Center (VCC)
We recommend writing your initial loop script as a test script or copying an existing script and then updating the copy. The steps listed here are for using a new script, but you should be able to adapt them for use with an existing script.
- Log into the VCC configuration manager, go to the Scripts section and create a new inbound phone script. After saving the name you'll be presented with the script interface.
- To create a loop with a limited number of passes you'll need to add a variable to the script to keep track of the number of passes that are made. Click on the View Variables button in the script banner to add a new variable.
- My script is new and doesn't have any variables added yet. Your view may include more variables because they already exist in your environment.
- Click on the Add new link and sections for adding the Variable name and Data type will appear.
- Enter a variable name (it has to begin with an underscore _ ) and choose the Variable type to be number. In this example the name of my variable is _emptyCount.
- Click OK and then the X in the upper right hand corner of the pop up to close it and get back to your script. Then click on the MainIVR to bring up the add link to add a new object to your script.
- Choose to add a Set Variable object then fill in the information. Give the object a tag (We chose "Set empty count" because it indicates what the object does), choose the variable you created in the previous steps as the variable and then type a 0 (zero) into the first Value drop down then click the OK button.
- The script will look like this after adding the Set Variable object.
- Each time you add a new object the add will remain on the last object you accessed. You need to select the new object and then click the add link on that object to add one below it. We will only show this in the images below and then it is implied for all of the remaining steps. In this case click on the Set Variable object and then click on the add link on it.
- Choose to add a Label object next for our loop and give it an object tag and then click the OK button. We chose to use Top of loop because that's what it is.
- Our example script looks like this after adding the Label object.
- Next we're going to add a Say object to tell the caller what options they have. Click on the Label object, click on the resulting add link and then choose the Say object and fill in the details. We have used the phrase:
"Hello, please press one for sales or two for support."
but you can use something different if you please. Give the Say object a tag, choose the Say options you wish to use and then click on the OK button
- The sample script looks like this after adding the Say object.
- Click on the Say object, then click on the resulting add link and choose to add a Get Digit object. Then fill in an object tag and set the timeout if you don't want it to be the default three seconds.
- After adding the Get Digit object the sample script looks like this.
- We'll add the queue assignments next. Click on the 1 and then the subsequent add link and choose to add a Forward to Queue object. Option 1 sends the call to the sales queue so choose that queue when creating the object. We're adding it without any of the objects being set. You should consider setting up these options using the setting appropriate for your organization.
- When we're done adding the first Forward to Queue object the sample script looks like this. You should consider adding options for in queue, queue timeout and overload actions.
- When working on a script it's sometimes convenient to click the minus sign in the box next to the object to collapse the action tree for the option. This makes it easier to see the main points of the script while hiding the details of some of the objects. Here's what the script looks like when the Forward to Queue object is collapsed. We will be collapsing some objects in when presenting screen shots in the rest of this article.
- Next click on the 2, click on the subsequent add link and then add a Forward to Queue object to send the call to the support queue if the caller chooses option 2. The script will look like this after you have completed these steps
- Now we're going to take care of the empty action for the object. We start by clicking on empty, the resulting add link and then choose to add a Set Variable object. After typing in a tag for the object choose the Variable as your empty count variable. Then in the Value section choose your empty count variable in the first drop down box, the + operator in the operator box then type a 1 in the last box. This will increment your empty count variable by one.
- The empty action will look like this after adding the Set Variable object.
- Next click on the Set Variable object you just added, the subsequent add link and then choose to add a Test Variable object. Type in a tag for the object, choose your empty count variable, choose >= in the operator box and then type 3 in the last box. If you want to give you callers more than three chances use a larger number.
- The sample script looks like this after adding the Test Variable object.
- Now we need to send the caller to the main queue if the empty count was greater than or equal to 3. Click on the True action, click on the subsequent add link and then choose to add a Forward to Queue object. Then set the Forward to Queue object to send the caller to Main phone queue. Once again please set up the other Forward to Queue object options to be consistent your company's other queue options.
- With the Forward to Queue object actions collapsed the sample script now looks like this.
- Now we're going to add the False action which is a Go To object that sends the caller back to the top of the loop for the Say and another chance to enter their queue choice. Click on the False action, click on the subsequent add link and then choose to add a Go To object. Set the object to go to the top of loop label you used in your script.
- Then go back up to the Get Digit object, click on it and click the add link to add another Forward to Queue object to take care of any other actions other than 1, 2 or empty. The caller will be out of the Get Digit object in those cases and you'll want to send them to the Main queue. Add the object like the one you set up for the True action. When you're done the bottom of the sample script will look like this.
- When we're finished doing the above steps in our sample script the entire script looks like this.
- At this point in time you're ready to assign the script to a channel for testing. Test the script to make sure it's working the way you want it to. Then either repeat these steps a copy of a script you want to modify or use the script you modified by assigning it to the channel it's intended for.