I have a script on IPCC server that currently forwards calls to a specific number.
I want to modify the script such that if someone calls that number if the person
waits for more than 30 seconds unanswered it transfers to another number where there are
available agents to take it.
IPCC version 3.5.3
This is how you do it:
At the start of the waiting area, which I think you are referring to the Queued branch of the Select Resource Step, place this step:
startDateTime = new java.util.Date()
startTime = startDateTime.getTime()
nowDateTime = new java.util.Date()
nowTime = nowDateTime.getTime()
timeDiff = (nowTime - startTime) / 1000
if (timeDiff >= 30)
/* Do nothing */
There is a trade off with checking very often, and missing the caller when the time is 29 seconds, and not checking again for another 30 seconds.
You certainly could not achieve this with your delay of 60 seconds in there. Because the shortest time interval you could achieve would be 60 seconds. And that's not counting the other steps that are in there either.
It looks like you already have a Delay step, why not just queue it to the other queue after that point (you can queue to multiple queues at once).
You're going about it the wrong way. Yes, that'll work. But it is unnecessarily complex when you have the Get Reporting Statistic Step available to you.
Reporting Object = "CSQ IPCC Express"
Field = "Current Wait Duration" (this is how long you've been queued)
Row Identifier = CSQ Name or string variable with CSQ name
Result Statistic = Integer to return variable to.
Use that step to get how long you've been in queue, and test against that.
As I said, you're already using a delay step, if you want to queue it to another CSQ after 30 seconds you don't need additional programming logic.
Keep it simple.
Unfortunately this doesn't apply to the OP. 3.5 Doesn't have a Current Wait Duration field (the reporting object is also named differently as I recall) as an available report, so for you, I recommend you reduce your 60 second delay to 30 and then do your additional logic then, it's pointless to try and determine how long they've been in queue when you explicitly control the queue logic as you do.
Tanner & everyone
Thank you for your reply.
I went ahead and reduced the Delay time to 30seconds.
Right after DELAY 30 SEC i have CALL UNHOLD (CONTACT: TRIGGRING CONTACT)
What logic should i put on there to queue the call to another number.
My first thought is to put a call rediect. would that fix the problem.
I will attach the file i have edited.