04-16-2020 07:17 AM
Hello,
I have a request from the customer.
If the caller hangs up within 15 seconds of entering the queue, they don't want to count this as an Abandoned Call on a Report Data. But if the caller hangs up after 15 seconds, that will count as an Abandoned Call on a Report Data.
Is there a way to change or set the time of the Abandoned Call?
On CUCM or CUCX or ....... ?
Please explain step by step.
Thanks in advance,
Shin
04-16-2020 08:54 AM - edited 04-16-2020 09:54 PM
Ok, so all calls are abandoned by default, and it's the call center's job to handle them. We can do this in one of two ways:
#2 is the one you will need, and you can do that like this:
Start Accept (--Triggering Contact--)
/* some other steps in here */ Set Contact Info (--Triggering Contact--, handled)
/* some other steps in here */ Terminate (--Triggering Contact--) End
Now, the tricky part is meeting your 15 second requirement. You see, UCCX scripts are executed serially, top down, and there is no setTimeout like their might be in Javascript or other languages.
So, if we simply put the Set Contact Info step somewhere in our script, there's no guarantees it will even be executed (too late) or that perhaps it executes too soon.
Luckily, we do have some semblance of event driven programming in the way of exception handling. We can catch when an exception occurs, and then do something as soon as it does. We achieve that for when a caller hangs up like so:
Start On Exception (ContactInactiveException) Goto Caller Disconnected Accept (--Triggering Contact--) /* some other steps in here */ Terminate (--Triggering Contact--) Label Caller Disconnected:
Clear Exception (ContactInactiveException) Set Contact Info (--Triggering Contact--, handled) End
Now, we're still not done though, because if a caller hangs up at 16 seconds, we'd mark them as handled with that setup, so we have to check the total call duration and then conditionally mark it.
Variables Time start = T[now] Script Steps Start On Exception (ContactInactiveException) Goto Caller Disconnected Accept (--Triggering Contact--) /* some other steps in here */ Terminate (--Triggering Contact--) Label Caller Disconnected:
Clear Exception (ContactInactiveException)
/* If the call was shorter than 15 seconds... */ If (t[now].getTime() - start.getTime() <= 15000) True
/* ...then mark the call as handled */ Set Contact Info (--Triggering Contact--, handled) False
/* ...otherwise, leave it be */ End
And that should be it. I hope that satisfies your request to have it explained step by step. Let me know how it goes.
04-16-2020 01:13 PM
Awesome reply @Anthony Holloway (+5) all day long.
04-16-2020 01:57 PM
04-16-2020 02:26 PM
Thank you for replying my post
For additional info about this case:
My customers ask me for help, whether it can be changed or not
So this is to set from the existing, not making a new one
Can I share the existing script that I get from customers' CUCX?
If yes, where I can share it?
Maybe you can help me after seeing the existing Script.
Because I'm new about "Script"
04-16-2020 03:35 PM
04-16-2020 08:58 PM
I have sent an email to you
Shin
04-16-2020 09:50 PM - edited 04-16-2020 09:53 PM
First up, create a new Time variable called start
Now create a new label right after the Terminate step
Place an If step under your new label with this condition:
t[now].getTime() - start.getTime() <= 15000
Place the Set Contact Info step inside the If True branch, and set it to Mark as Handled
We need to clear the exception handler, else we might trigger it again with the Set contact Info step, thus causing the script to jump back to the new label, and enter an infinite loop.
Finish it off with the Exception handler like so...
Perform a Tools > Validate to make sure it's all good
Do you know how to save, upload and refresh to make the change take effect?
04-16-2020 11:23 PM - edited 04-17-2020 12:41 AM
I'm not entirely sure about that
Are there steps?
04-16-2020 11:36 PM
04-17-2020 10:20 PM
It doesn't work, because it's still displayed as an abandoned call in their report data application
But, thank you for the help and solutions that have been given
04-17-2020 11:15 PM
04-18-2020 01:48 AM
No. I am still solving this problem
04-20-2020 07:53 AM
05-04-2020 01:11 AM
No, thank you for the solution you have given me
I so appreciate that
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