--- title: "Create an IVR Script Limited Loop in 8x8 Contact Center" slug: "create-an-ivr-script-limited-loop-in-8x8-contact-center" updated: 2026-05-17T16:39:47Z published: 2026-05-21T21:25:58Z canonical: "help.8x8.com/create-an-ivr-script-limited-loop-in-8x8-contact-center" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.8x8.com/llms.txt > Use this file to discover all available pages before exploring further. # Create an IVR Script Limited Loop in 8x8 Contact Center ## Objective Create an IVR script with a limited loop. ## Applies To - 8x8 Contact Center - Configuration Manager for Contact Center - IVR Script ## Procedure > [!NOTE] > Note > > The example below is a scenario where there 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. 1. Log in to Configuration Manager for Contact Center. 2. Select **Scripts**. 3. Select **Add new phone script**. 4. Select **Inbound phone** as the script type. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055519577.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 5. Enter a **Script Name** and click **Save**. 6. Select **View Variables**. 7. Select **Add new**. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055527210.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 8. Enter a **Variable Name** (it has to begin with an underscore _ ). 9. Under *Data Type***,** select **Number**. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055865001.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D)​​​​​​​ 10. Select **OK**. 11. Close the window and click **MainIVR**. 12. Select **add**. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055542842.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 13. Select **Set Variable**. 14. Fill in **Object tag** (the example has "Set empty count because it indicates what the object does"). 15. For *Variable* select the **variable name from step 8**. 16. Set **Value** to 0. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055551026.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 17. Select **OK**. 18. The script will look like this after adding the Set Variable object. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055558244.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 19. Select **Set Variable** > **add**. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055566725.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 20. For *IVR object* select **Label**. 21. Fill in **Object tag** (the example has "Top of loop"). ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055574427.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 22. Select **OK**. 23. The example script looks like this after adding the Label object. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055583232.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 24. Select **Label** > **add**. 25. For *IVR object* select **Say**. 26. Fill in **Object Tag**. The example has "Hello, please press one for sales or two for support." ​​​​​​![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055660881.png?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 27. Select **OK**. 28. The sample script looks like this after adding the Say object. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055680997.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 29. Select **Say** > **Add**. 30. For *IVR object* select **Get Digit**. 31. Fill in **Object Tag**. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055695300.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 32. After adding the Get Digit object the sample script looks like this. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055711505.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 33. Select **1** > **add**. 34. For *IVR object* select **Forward to Queue**. 35. Fill in **Object Tag**. 36. Set *Queue name* to where **Option 1 should send the call**. In this example, Option 1 is for the Sales Queue. ​​​​​​​![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055969104.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 37. Select **OK**. 38. Select **2** > **add**. 39. For *IVR object* select **Forward to Queue**. 40. Fill in **Object Tag**. 41. Set *Queue name* to where **Option 2 should send the call**. In this example, Option 2 is for Support. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055987800.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 42. Select **OK**. 43. Select **empty**. 44. Select **Add**. 45. For *IVR object* select **Set Variable**. 46. Fill in **Object Tag**. 47. Set *Variable* to the **empty count variable**. 48. For *Value* set it the variable from step 46, + the operator in the operator box then type a 1 in the last box. This will increment the empty count variable by one. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055735358.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 49. Select **OK**. 50. The empty action will look like this after adding the Set Variable object. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055743108.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 51. Under *empty* click **Set Variable** > **Add**. 52. For *IVR object* select **Test Variable**. 53. Fill in **Object Tag**. 54. Set *Variable* to the **empty count variable**. 55. For *Value* set it the **empty count variable**. 56. Select **>=** for the operator in the operator box. 57. Select **3 in the last box**. If you want to give you callers more than three chances use a larger number. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055750684.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 58. The sample script looks like this after adding the Test Variable object. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055758141.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 59. Under the *Test Variable* click **True** > **add**. 60. For *IVR object* select **Forward to Queue**. 61. Fill in **Object Tag**. 62. Set *Queue name* to **Main Line**. 63. Select **OK**. 64. Under *Test Variable* click **False** > **add**. 65. For *IVR object* select **Go To**. 66. Fill in **Object Tag**. 67. Set *Destination* to **Top of loop**. ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055765684.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 68. Select **OK**. 69. If further actions are needed, return to **Get Digit** and add **Forward to Queue for all other actions**. 70. Once complete, the script should look something like this: ![](https://cdn.us.document360.io/e3a59e39-abd3-4423-964c-0a4008dc5673/Images/Documentation/image1723055776009.jpg?sv=2026-02-06&spr=https&st=2026-11-03T22%3A40%3A33Z&se=2026-11-03T23%3A40%3A33Z&sr=c&sp=r&sig=Sca3WYl9HCwHcWiXHkviTfEoRkG3cj4RxT34hAizayE%3D) 71. 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. > [!NOTE] > Note > > If using the set variable to compare an inbound call number with anonymous... then your variable 'anonymous' has to have a lower case 'a' as it's case sensitive.