Showing results for 
Search instead for 
Did you mean: 

Reset Call.TimeInQueue value in Routing Script

John Farrell

Hi all,

i have a request that after 60 seconds the caller is to be offered the option to leave a voice by means of pressing 1.


If they do not press 1 the call goes back to being queued again.


The problem is the call.timeinqueue remains over 60 and just plays the option to leave a voicemail again.


I'm looking for a way to reset the call.timeinqueue to 0 so the call gets another 60 seconds beofre being offered the voicemail option again?






VIP Engager VIP Engager
VIP Engager

Is this UCCE or UCCX? Why would you want to reset the value and potentially skew reporting/monitoring and instead just loop the call to the treatment that you want within the script?

I don't think you can reset the time but as a workaround , you can assign a
flag either using a peripheral variable or ecc. Avoid or bypass the check
of time in queue if the flag is set.

Mark Swanson

There's no need to reset the call.timeinqueue. Regardless of the platform (i.e. CVP, IVR or UCCX)... the logic remains the same. There's probably a dozen ways to tackle this problem.

As someone already mentioned, you can FLAG the call after presenting the option to leave a voicemail.

Also, you can use the set variables (int) step to identify queue loops and/or if the voicemail option was presented. Then, you would insert a simple IF (Boolean) statement using the queueLoop (int) variable to redirect callers accordantly.

If your objective is to play the voicemail option every 60 seconds, then you would simply add a delay step (60 seconds). If your delay is less than 60 seconds, for example; 20 seconds. Then you would use the queue loop to increment the number of times the call was looped. In this example... once the queueLoop (int) reaches 3, then your IF statement would identify these call events and play the option to leave a voicemail. If so, your IF statement would look something like this; queueLoop >= 3


Edward Umansky

Two ways off the top of my head:


1) Arrange your script so that there is exactly 60s of music/audio playing prior to the VM option menu. Loop this logic. This is typically how its done.


2) Keep a counter in a call variable for how many times the option has played and check your queue time accordingly. For example if this is 3rd time playing menu then you play it if queue time is > (3 * 60) = 180 seconds.

Ed gave the correct answer. Control the loop. Check Call.TimeInQueue against an incremented value. Use an ECC variable to count the looping.


I am old school so always used value() and text() to convert back and forth between string variables (what is stored in an ECC variable is a string) and numbers; but ICM understands what you are doing and shortcuts are possible. But I try to be explicit.



Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: