cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
271
Views
35
Helpful
8
Replies
Highlighted
Contributor

UCCX CallBack Script

Hello All,

I'm working on a CallBack option for customer's who don't want to wait on hold. Basically, holding their place in the queue for the next available agent. I'm using the example found at the link below. But, have a few questions regarding the example.

https://www.cisco.com/c/en/us/support/docs/contact-center/unified-contact-center-express/214522-configure-custom-script-for-callback-fea.html 

I'm sort of ignoring the Leave a Message portion, as we already have something like that setup to send a caller to voicemail.

After the caller is Queued and the caller presses the 1 key, I send the caller to the portion of the script for the Call Back steps. Right now, I am able to successfully prompt the user for a call back number, which I then capture and read back to the caller to confirm. If the number is good, then a Terminate step.

Then, what I believe you're supposed to do is run a Place Call step to a new Script/Application containing a simple icd script with a Select Resource step. The Place Call step also has a Get Digit String (*under the Successful branch of Place Call) which waits for an Agent's input (*with a press one option to be connected).

This Place Call step hits the Unsuccessful branch. The example from the URL above just says to have the 2nd script's trigger to be a part of a different Call Control Group then the original script the caller was queued in. But, does that Call Control Group need to be a "outbound" Group Type for this to work? I don't appear to have that option when creating a new Call Control Group, so I assume we're not licensed for this. But, I did read something about Direct Preview Outbound, which doesn't require an extra license.

I have the MIVR logs from one of these test calls if needed. This is the first time we're trying anything outbound from UCCX so I'm not sure what's required.

 

Thanks in Advance,

Matt

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
VIP Mentor

Re: UCCX CallBack Script

EDIT: I edited this post like 5 times to keep tweaking it.  Sorry about that.

 

First off, you cannot save the caller's position in queue with UCCX callback.  It's unfortunate, but it's just not possible right now.

For script 2, all you really need is this:

E.g., Script 2 Bare Bones

Start
Accept (--Triggering Contact--)
Select Resource (--Triggering Contact--, "YourCSQName")
  Connected
    End
  Queued
    Delay 43200 sec
End

Notice that I prevent a loop from happening in the Queued branch by using a 12 hour delay.  12 Hours being the CUCM default setting for maximum call duration, at which point CUCM will drop the call.

You cannot avoid looping in Script 1 however, because it basically needs to poll something to understand when it can move to the next step, e.g., connecting to the caller.  However, care should still be taken here, because too long of a call with too quick of a loop cycle will start failing your calls, and callers will never get a callback.

As an aide in slowing down the loop cycle, you can manipulate the prompt which plays in the Get Digit String step to be longer, repeat it self, and/or mix in a Delay Prompt (E.g., dp[5000]) to create some space between playouts.

E.g., Script 1 Repeating prompt 10 times; Assumes prompt variable is named cb

contact = Place Call (to "1234")
Successful
CED = Get Digit String (contact, cb + cb + cb + cb + cb + cb + cb + cb + cb +cb)     Timeout         Goto Wait For Agent

E.g., Script 1 Adding in a delay based on ewt then repeat

contact = Place Call (to "1234")
Successful
Wait For Agent: ewt = Get Reporting Statistics (contact, Expected Wait Time) CED = Get Digit String (contact, dp[ewt * 1000] + cb + cb + cb + cb + cb + cb + cb + cb + cb +cb)     Timeout
        Goto Wait For Agent

Back to Script 2 though, the way I showed it, it will statically assign the target CSQ every time.  This may or may not work for you.  It typically needs dynamic assignment in my experience.  In which case, the Contact created in Script 1, is actually the same Contact as --Triggering Contact-- in Script 2.  This is convenient, because it allows you to Set Enterprise Call Info for the Contact in Script 1, while you can then Get Enterprise Call Info in Script 2.  E.g. Pass the target CSQ name from one script to the other.

Just be careful about creating a race condition here.  That is when Script 2 thinks it's able to read the value of the CSQ too soon, but Script 1 hasn't finished writing it yet.  So, you can either just delay a little at the start of Script 2, just after Accept, or you can write a small polling interval loop, checking if the CSQ has been set yet.

E.g. Script 2 Delay

Start
Accept (--Triggering Contact--)
Delay 5 sec
Select Resource (--Triggering Contact--, "YourCSQName")
  Connected
    End
  Queued
    Delay 43200 sec
End

E.g., Polling

Script 1

contact = Place Call (to "1234")
  Successful
    Set Enterprise Call Info (contact) Variables Used:csq
    ...

Script 2

Start
Accept (--Triggering Contact--)
Check for CSQ:
csq = Get Enterprise Call Info (--Triggering Contact--, "csq", --Scalar--, -- All --)
If (csq == null || csq.isEmpty()) Then
True
Delay 5 sec
Goto Check for CSQ
False Select Resource (--Triggering Contact--, csq) Connected End Queued Delay 43200 sec End

In some cases, like even in yours, the Agent might connect to Script 1 (the pretend caller) and be at a point in the Get Digit String step where the Agent hears silence for a while.  In which case, you might employee the following strategy, though it's a trade off in that you'll loop more often.

E.g. Detecting Agent Answer

Script 1

 

contact = Place Call (to "1234")
  Successful
Set Enterprise Call Info (contact) Variables Used:csq Goto Wait for Agent ... Wait For Agent: is_answered = Get Enterprise Call Info (contact, "is_answered", --Scalar--, -- All --) If (! is_answered) Then True Delay 10 sec Goto Wait For Agent Interact With Agent: ...do and say what you want now, you have an agent on the line...

Script 2

Start
Accept (--Triggering Contact--)
Delay 5 sec
Select Resource (--Triggering Contact--, csq)
  Connected
    Set Enterprise Call Info (--Triggering Contact--) Variables used:is_answered
    End
  Queued
    Delay 43200 sec
End

 

View solution in original post

8 REPLIES 8
Highlighted
Engager

Re: UCCX CallBack Script

It's been a bit since I played with it, but no the CCG is just like just first CCG it doesn't have to be outbound. You're not really doing traditional outbound aka dialer. You're actually having the agent make an outbound call as if there were to pick up the phone an dial it manually.

 

david

Highlighted
VIP Mentor

Re: UCCX CallBack Script

Not only is it just like the first CCG, you do not need a second CCG. I have many Callbacks deployed in the field, none of which use a separate CCG. I have yet to read a justification for this, and I think it's just a misunderstanding. Anyway, if the Place Call is going to Unsuccessful, it's probably that the value for the CCG in the step doesn't match your actual CCG ID. This can happen especially if you downloaded a sample script where the value was already populated.
Highlighted
Contributor

Re: UCCX CallBack Script

Hey, thanks for the replies.

*See screenshot below of CallBack portion from Script 1...

Ok, so I figured out the issue where the Place Call step was hitting the Unsuccessful branch. The CSS used by the CTI Route Point did not contain the Partition used by the CTI Port. So I added that Partition to the CSS and Place Call now hits Successful.

If I then take an Agent that has the Skills needed in Script 1, and make them go Ready, that Agent rings and is now at the Get Digit String step under the Label WaitForAgentCallBack. The Get Digit String step just asks the Agent to press any number to be connected to the Customer. This is now working to call the customer.

But, if I wait more then just a couple of seconds to make the Agent go Ready, the Get Digit String step times-out almost immediately when the Agent picks up. However, if as soon as the script hits Get Digit String I make the Agent go Ready, they ring and can hear the Prompt from Get Digit String except for the first couple of words, which makes me think this step is already playing a prompt before any Agent is available...

 

Lastly, I'm a little confused about the purpose of Script 2, which is the Trigger that the Place Call step is dialing. What is the purpose of Script 2? I see in the URL example from my OP, it says Script 2 should just have an Accept Step + a Select Resource step. Since Script 1 is where we're waiting for an Agent to become available, I'm not sure what to do in Script 2...

 

CallBack_Steps.png

 

Thanks Again,

Matt

Highlighted
VIP Mentor

Re: UCCX CallBack Script

"...which makes me think this step is already playing a prompt before any Agent is available..."

That's exactly how that works.  It's blindly just looping a prompt saying "press any key to continue" because there's no intelligence to know when you have the human on the line.

 

So, for callback, UCCX must call itself.  Script 1 is like the customer calling in, and Script 2 is like your queuing logic to route the call to the next available Agent.  Think of Script 1 as a person and Script 2 as a traditional script you write to handle calls.  Only, since it's a robot calling you, you don't need the pleasantries normally used like "Thank you for calling..." and "Please hold for the next available..."  I mean, who am I to say you don't need that.  Go ahead and tell it a story for all I care.  Maybe UCCX has feelings?

Highlighted
Contributor

Re: UCCX CallBack Script

Hey Anthony, thanks for the reply. Very much appreciated.

Ok, I'll add GoTos within the Enter Digit String step for the Unsuccessful and Timeout branches to restart that step. That makes sense, thank you.

As for Script 2... And this might be a personal preference, but maybe there's Pros to doing it a certain way. But, in Script 1 there are already Select Resource steps that have been queued up to the caller. So if I wanted to keep those same resources available to this caller, would I just use some bogus CSQ (*or if the CSQ needs to exist to not get errors, create a CSQ that has no Agents assigned to it) in order to just use those original Agent Resources from Script 1? Assuming this would preserve the caller's spot in the Queue.

Or, if we decide we want a separate skill to answer these calls, I'm guessing I would just Dequeue the caller from those already selected resources, and then use a new CallBack_CSQ containing separate skills in Script 2.Does that sound correct?

 

Thanks Again for the reply!

-Matt

Highlighted
VIP Mentor

Re: UCCX CallBack Script

EDIT: I edited this post like 5 times to keep tweaking it.  Sorry about that.

 

First off, you cannot save the caller's position in queue with UCCX callback.  It's unfortunate, but it's just not possible right now.

For script 2, all you really need is this:

E.g., Script 2 Bare Bones

Start
Accept (--Triggering Contact--)
Select Resource (--Triggering Contact--, "YourCSQName")
  Connected
    End
  Queued
    Delay 43200 sec
End

Notice that I prevent a loop from happening in the Queued branch by using a 12 hour delay.  12 Hours being the CUCM default setting for maximum call duration, at which point CUCM will drop the call.

You cannot avoid looping in Script 1 however, because it basically needs to poll something to understand when it can move to the next step, e.g., connecting to the caller.  However, care should still be taken here, because too long of a call with too quick of a loop cycle will start failing your calls, and callers will never get a callback.

As an aide in slowing down the loop cycle, you can manipulate the prompt which plays in the Get Digit String step to be longer, repeat it self, and/or mix in a Delay Prompt (E.g., dp[5000]) to create some space between playouts.

E.g., Script 1 Repeating prompt 10 times; Assumes prompt variable is named cb

contact = Place Call (to "1234")
Successful
CED = Get Digit String (contact, cb + cb + cb + cb + cb + cb + cb + cb + cb +cb)     Timeout         Goto Wait For Agent

E.g., Script 1 Adding in a delay based on ewt then repeat

contact = Place Call (to "1234")
Successful
Wait For Agent: ewt = Get Reporting Statistics (contact, Expected Wait Time) CED = Get Digit String (contact, dp[ewt * 1000] + cb + cb + cb + cb + cb + cb + cb + cb + cb +cb)     Timeout
        Goto Wait For Agent

Back to Script 2 though, the way I showed it, it will statically assign the target CSQ every time.  This may or may not work for you.  It typically needs dynamic assignment in my experience.  In which case, the Contact created in Script 1, is actually the same Contact as --Triggering Contact-- in Script 2.  This is convenient, because it allows you to Set Enterprise Call Info for the Contact in Script 1, while you can then Get Enterprise Call Info in Script 2.  E.g. Pass the target CSQ name from one script to the other.

Just be careful about creating a race condition here.  That is when Script 2 thinks it's able to read the value of the CSQ too soon, but Script 1 hasn't finished writing it yet.  So, you can either just delay a little at the start of Script 2, just after Accept, or you can write a small polling interval loop, checking if the CSQ has been set yet.

E.g. Script 2 Delay

Start
Accept (--Triggering Contact--)
Delay 5 sec
Select Resource (--Triggering Contact--, "YourCSQName")
  Connected
    End
  Queued
    Delay 43200 sec
End

E.g., Polling

Script 1

contact = Place Call (to "1234")
  Successful
    Set Enterprise Call Info (contact) Variables Used:csq
    ...

Script 2

Start
Accept (--Triggering Contact--)
Check for CSQ:
csq = Get Enterprise Call Info (--Triggering Contact--, "csq", --Scalar--, -- All --)
If (csq == null || csq.isEmpty()) Then
True
Delay 5 sec
Goto Check for CSQ
False Select Resource (--Triggering Contact--, csq) Connected End Queued Delay 43200 sec End

In some cases, like even in yours, the Agent might connect to Script 1 (the pretend caller) and be at a point in the Get Digit String step where the Agent hears silence for a while.  In which case, you might employee the following strategy, though it's a trade off in that you'll loop more often.

E.g. Detecting Agent Answer

Script 1

 

contact = Place Call (to "1234")
  Successful
Set Enterprise Call Info (contact) Variables Used:csq Goto Wait for Agent ... Wait For Agent: is_answered = Get Enterprise Call Info (contact, "is_answered", --Scalar--, -- All --) If (! is_answered) Then True Delay 10 sec Goto Wait For Agent Interact With Agent: ...do and say what you want now, you have an agent on the line...

Script 2

Start
Accept (--Triggering Contact--)
Delay 5 sec
Select Resource (--Triggering Contact--, csq)
  Connected
    Set Enterprise Call Info (--Triggering Contact--) Variables used:is_answered
    End
  Queued
    Delay 43200 sec
End

 

View solution in original post

Highlighted
Contributor

Re: UCCX CallBack Script

Thanks for the very detailed explanation. Very much appreciated!

Was able to get it working. But, will use some of your tweaks about the looping to fine tune it.

Thanks Again,
Matt
Highlighted
VIP Mentor

Re: UCCX CallBack Script

You're welcome. I'm glad you were able to make improvements to your solution.