Skip to main content
VCC: Creating an IVR Script Loop to Limit Caller Option Offers
8x8 Support

VCC: Creating an IVR Script Loop to Limit Caller Option Offers

Objective

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.

Applies To

Virtual Contact Center (VCC)

Procedure

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.

  1. 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.

    Loop 02.jpg
     
  2. 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.

    Loop 03.jpg
     
  3. 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.

    Loop 04.jpg
     
  4. Click on the Add new link and sections for adding the Variable name and Data type will appear.

    Loop 05.jpg
     
  5. 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.

    Loop 06.jpg
     
  6. 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.

    Loop 07.jpg
     
  7. 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.

    Loop 08.jpg
     
  8. The script will look like this after adding the Set Variable object.

    Loop 09.jpg
     
  9. 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.

    Loop 10.0.jpg
     
  10. 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.

    Loop 10.1.jpg
     
  11. Our example script looks like this after adding the Label object.

    Loop 10.2.jpg
     
  12. 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

    Loop 11.jpg
     
  13. The sample script looks like this after adding the Say object.

    Loop 12.jpg
     
  14. 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.

    Loop 13.jpg
     
  15. After adding the Get Digit object the sample script looks like this.

    Loop 14.jpg
     
  16. 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.

    Loop 15.jpg
     
  17. 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.

    Loop 16.jpg
     
  18. 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.

    Loop 17.jpg
     
  19. 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

    Loop 18.jpg
     
  20. 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.

    Loop 19.jpg
     
  21. The empty action will look like this after adding the Set Variable object.

    Loop 20.jpg
     
  22. 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.

    Loop 21.jpg
     
  23. The sample script looks like this after adding the Test Variable object.

    Loop 22.jpg
     
  24. 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.

    Loop 23.jpg
     
  25. With the Forward to Queue object actions collapsed the sample script now looks like this.

    Loop 24.jpg
     
  26. 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.

    Loop 25.jpg
     
  27. 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.

    Loop 26.jpg
     
  28. When we're finished doing the above steps in our sample script the entire script looks like this.

    Loop 27.jpg
     
  29. 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.