07-16-2020 12:45 PM
Hello All,
I was requested to have a caller not be marked as abandoned if the caller was in the queue for 15 seconds or less. The thought being that the Agents weren't even given the chane to answer the call before they hung up, or maybe they reached that queue by accident, etc...
So, at the start of the script I get the Current Date/Time and then set a int as the Epoch of that date variable. Then, just before the disconnect step at the end of the script, I get the date again and set another int as the Epoch. Below that is an if statement that compares the 2 epochs, and if it's <= 15, then I was Dequeuing the call. And then finally, after the if statement is the Terminate step.
After doing some testing, the correct true/false branches of the if statement are being selected based off the time I hang up.
However, when the Dequeue step is ran, I receive the error:
Failed to get the ICD Channel from the Contact.
Is this not the correct usage of Dequeue?
Thanks in Advance,
Matt
Solved! Go to Solution.
07-20-2020 09:44 AM
07-16-2020 04:13 PM
07-17-2020 07:58 AM
07-17-2020 08:21 AM
So I just swapped the Dequeue step for the Set Contact Info step.
In the Set Contact Info step, the only thing I clicked "Set" for was under the "Handled" attribute. However, the call is still getting marked as Abandoned. Am I missing something?
Set Contact Info Step:
Supervisor:
Thanks,
Matt
07-17-2020 03:04 PM
07-17-2020 03:39 PM - edited 07-17-2020 03:43 PM
Jon, I think they might even be catching the ContactInactiveException and performing this after the Contact is already terminated. If not, then that's the first problem.
However, something important to note is, there is only a small window of opportunity you get to affect the disposition after the Contact terminates, and before the records are written to the ContactCallDetail and ContactQueueDetail tables. The exact timing, I'm not too sure of, but my testing shows that it's less than 2 seconds.
One last thing to note, depending on where you look at the data, you will find a different result. For example, if you have a caller abandon in the queue and you attempt to flag it as handled by the Set Contact Info step, that record will be written as a disposition of 2 in the ContactCallDetail table, but not as a 2 in the ContactQueueDetail table; rather it will be a 4 = Handled by Script.
Now, if you look at the documentation for...and don't shoot me, I'm not promoting it, but CSD, it says:
"Calls Abandoned = Number of calls that were routed to the CSQ but were not answered by an agent because the caller hung up or was disconnected."
This means that the metric is only looking at ContactQueueDetail where disposition <> 2. That could be a 1 (Straight Abandoned), a 4 (Handled by Script) or a 5 (Handled by another CSQ). It's likely not looking at a 3 (Dequeued), because there's a whole new column in CSD for that category.
If you want to see how the reporting categorizes it, you can run the following command on the CLI of the UCCX:
run uccx sql db_cra select disposition from contactqueuedetail where sessionid = 72000339307
Replacing the sessionid with your own sessionid for the call you made.
To get your sessionid, there's a number of ways to do it, but if you're already on the CLI then you can run this command to get your most recent call:
run uccx sql db_cra select limit 1 startdatetime, sessionid, originatordn, applicationname from contactcalldetail where originatordn like '%6125551212' order by startdatetime desc
Replacing the originatordn with your own calling number.
07-20-2020 08:34 AM
Anthony, thanks for the reply.
I just called in twice and hung up after just a few seconds of being queued. Then, went to CUIC and ran the Contact Service Queue Activity by CSQ report. In that report, both of those calls are being shown as Dequeued.
Also, that's correct, the ContactInactiveException is being hit and that is what sends me to where I'm checking how long the caller was in the queue, and then marking as handled if it's under 15 seconds.
Below shows the script. I left out the bulk of the switch statement that's part of the Queued branch since it's just playing different prompts with each loop. Right after where I show it's "cut", that follows immediately after the Queued branch of the Select Resource step.
The resulting output from your SQL command was a 4.
Also, in case it's relevant, this script is being called from another Main Menu type script using Call subflow. We used call subflow so we could keep a running tally of total calls into the system, regardless of what Menu choice the caller selects.
Thanks Again,
Matt
07-20-2020 09:44 AM
07-20-2020 10:14 AM
07-20-2020 10:49 AM
07-20-2020 07:49 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide