How to calculate expected wait time in ICM scripting?

Unanswered Question
Nov 11th, 2009

when all agents will be busy, we want to play the expected wait time to the calls in a queue. How can we calculate the expected wait time?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Sergey Tregubov Thu, 11/12/2009 - 01:46

it's calculated by the system,

you can generate this value, create prompt and play the prompt

kre8or2007 Thu, 11/12/2009 - 11:21

I've tried many things, but I've finally settled with using the value in "RouterLongestCallQ" for the skill group.

anwar-ahmed Fri, 11/13/2009 - 13:17


I have ICM 7.5 enterprise system and would like to implement this estimate wait time. Can you please explain in details.

Thanks in advance

kre8or2007 Mon, 11/16/2009 - 14:04

The way mine is set up, I set a peripheral variable with the value of RouterLongestCallQ, and when announcing wait time, I have a string of if nodes (example: if peripheral variable 1 < 60, play EWT1min prompt; the not leg points to the next if node, if peripheral variable 1 < 120, play EWT2min prompt, etc.

Ritesh Desai Tue, 04/26/2016 - 20:33

Hey folks,

Thanks for this question raised. Am also looking to deploy EWT logic at client site. I have requirement to announce EWT value to caller. As per the above I have worked on same.

Set PV1=(SkillGroup.XXXX.RouterCallsQNow+1)  Then If PV1 =<10 Then Play (How to play EWT seconds)

can I play using Play element and selecting Data and defining formula for it.


Ritesh Desai

bill.king Wed, 04/27/2016 - 06:52

I think you have the values backwards? Just do an IF to look at SkillGroup.XXXX.RouterCallsQNow > 10 or whatever you want the threshold to be to play EWT, then set whatever you decide is going to be your EWT value in PV1 in minutes, and then do a play Media of whatever is in PV1.

Ritesh Desai Thu, 04/28/2016 - 20:11

Bill king,

RouterCallsQNow returns output of queue call in seconds OR count of queue call? I think as per grammar its caller count in queue. Which parameter to multiply with to get queue call in seconds.

Thanks. Can we play audio using Play element? Audio path is defined in Set Variables node to fetch from sys/app libraries bbut dint worked. I tried playing audio after configuring Network VRU Script for ''PM'' and it played. I have to announce dynamic EWT like "your EWT is XX"

My doubt is EWT data stored under PV1 will get played using PLAY element (ICM Queue Palatte)? 


Ritesh Desai

Ritesh Desai Sat, 04/30/2016 - 05:26

Hey folks,

((CallsQNow + 1) * AHTto5) / Max ((Ready,(talkingIN+talkingOUT+talkingOTHR),100) using these formula am getting value in, 1.xxxx else 1.xxxxx. 

I want to round-off the decimals to nearest value. Because I cannot announce decimals to customers.


Ritesh Desai.

Chintan Gajjar Sat, 04/30/2016 - 07:17

you can use trunc(n) to truncate the decimal to integer.

e.g trunc(19.55) = 19.

and i think you can use LoggedOn value from skill instead of (talkinIN+talkingOUT+talkingOTHR) for better calculation.




Ritesh Desai Sun, 05/01/2016 - 23:02


Thanks for suggestion for using "trunc()" function. I tried with "left()" function and it worked for me.

I used function left(PV1) and it gives output of single integer.

By using trunc(PV1) value will return pre-dot values?

Eg: If PV1 returns 1.1234 then using trunc(1.1234) will give output of 1. correct?


Ritesh Desai.

Chintan Gajjar Mon, 05/02/2016 - 00:18

I see one problem in using left(), it fails to give you correct result when you have integer part more then 10.

e.g. left(10.56) =1 and not 10.

the trunc() is similar standard truncate function you would have seen while working with any programming language. it truncates the decimal value to nearest possible integer value. and use of it is recommended.

Ritesh Desai Tue, 05/10/2016 - 21:42


using this formula


I have 1 agent available in Test_123 skillgroup. ICM is not calculating goes to next node and finally disconnects.


RItesh Desai.



This Discussion