Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Dynamic Position in Queue

In the ICM scripting, how to identify the position in Queue of a caller dynamically, if none of the agents are available in the skill group and call is waiting at the IVR.

For Example:

  1. A Caller calls, and prompts that your Position in queue is "x" and your Estimated Wait time is "x".
  2. Call will be on hold for certain amount of time, then again the position of queue is examined (whether it has decreased or not). How to do this ?

We have ICM 7.1.4 and IP IVR 4.5.2


Re: Dynamic Position in Queue

Unfortunately, there's no way to do this with the out of the box software. ICM does not give you access to position in queue information. When the call first arrives in queue, you can read back position by just counting the number of calls currently in queue, but you won't be able to update that later on.

Re: Dynamic Position in Queue

As a rule of thumb I always try to dissuade my customers from doing this type of queue treatment as it can be inconsistent with sudden fluctuations of traffic.  For example, you tell the caller their wait time is going to be 5 minutes and they are 4th in queue, but then two calls RONA and a "gold" member calls, making me now the 7th person in queue and perhaps doubling his wait time.  If you really need to have this, I would suggest just an estimated wait time and giving a very wide range, < 5, < 10, < 15, etc.


New Member

Re: Dynamic Position in Queue

I have been trying find a way to do this same thing and believe I may have figured it out now.  Here's what I am doing in the ICM script:

  • Just after the Queue to Skill Group node - I use a Set Variable - SkillGroup.CCM.20922.Lab_Training.RouterQueueCallsTodayand put that value into PeripheralVariable6 (you can use whichever open PV you have)
  • Then, I set another variable just after this one - day() and put that value into PeripheralVariable7 (this is to keep track of the day for any calls that cross over midnight)

  • Now, I use our regular scripting flow to set a value into PV10 and then Run Ext Script to play the all agents are currently busy message from an IVR script - this is where the loop begins for what the caller hears until they are answered

  • Just after the prompt is played I do an If node - Call.PeripheralVariable7!=day() (so if the day has changed, I'll bypass giving the position in queue status)
  • If the day is the same, I then continue to another Set Variable - SkillGroup.CCM.20922.Lab_Training.RouterCallsQNow-(SkillGroup.CCM.20922.Lab_Training.RouterQueueCallsToday-Call.PeripheralVariable6) and put that value into PeripheralVariable8

This basically calculates the difference between the total number of calls that have queued to this moment (since midnight) and the total number that had queued when the call was first queued and subtracts that difference away from the current number of call in Queue now.

PV8= Calls in Q now - (total calls queued today - total calls queued today at the beginning of this session)

  • Then, I take this value in PV8 and send it to a Run Ext Script.

PV8 = Get Enterprise Call Info (--Triggering Contact--, --CallPeripheralVariable8--, --All-)

Set queue = "gen\number\"+PV8+".wav"

Play Prompt (--Triggering Contact--, P[100.wav])  -  a prompt that says "your current position in queue is..."

Play Prompt (--Triggering Contact--, SP[queue])

  • Then after it returns to the ICM script, I have it run another Ext Script for the music on hold period.

  • Finally, it connects back up to the start of this loop to tell them all agents are busy again and starts the process all over.

Hopefully, you'll find this useful and easy enough to follow.  Thanks to everyone out there who shares info.  It's been extremely helpful to me.


Re: Dynamic Position in Queue


I don't know for sure that your solution will work because I have not tested it, but it is clever and interesting. Points awarded.



Re: Dynamic Position in Queue

Clever but it is still missing the key feature that prevents these kind of calculations from working: abandoned calls. With this calculation you are assuming that none of the calls that queued since you entered queue abandoned. In order to count abandons correctly, you would need to know whether someone in front of you abandoned, or someone behind. Unfortunately, there is no way that I have found to tease that out of the data.

Another way to do a similar calculation that suffers the same issue: Take the number of calls queued when the caller first went into queue, and subtract the number that had been answered since then.

New Member

Re: Dynamic Position in Queue

Thanks Ed.  Good point.  I believe what I came up with would

cover the the calls abandoning in front of me but would not after me.  Another thought I might consider then is to count the

CallsAbandQToday at the beginning and then keep comparing as this loops and then no longer give the position in queue status if the abandons change.  I know this doesn't solve the problem but would at least it would give their position until an abandon occurs.  If you ever find a way to properly calculate this, please let me know.

Re: Dynamic Position in Queue

Yeah that's a good idea, if you don't have a lot of abandons it would be accurate most of the time. Basically your calculation is compact way of calculating: (initial queue position) - (calls answered) - (calls abandoned) - (other calls exiting queue). That can actually give you an answer <= 0 if enough calls queue and abandon behind the caller. I'll post it here if I ever find a way to calculate calls abandoned in front of the caller instead of total.

Re: Dynamic Position in Queue

Ed - Did you get any solution (including the calls that got abandoned infront of the caller) to this dyanmic queue position in UCCE/CVP? Can any one provide what the correct formula to be used in ICM?

New Member

Thanks for this wonderful

Thanks for this wonderful information.

I have a requirement to play out these numbers in different languages via IP IVR V10.  How can i do this ?

Does this require any kind of extra licensing with ICM or IP IVR ?  Does this also put extra load to the system if this is done for several hundred ICM scripts.

CreatePlease login to create content