cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2236
Views
0
Helpful
8
Replies

UCCX Script help for placement in queue

Perry Camacho
Level 1
Level 1

I am trying to add a new feature into a script...."You are currently nth in line to talk to a cust serv rep"

I was told this is fairly common and easy, does anyone have a template or can someone help out? I posted a copy of my current script, I hope it is legible.

8 Replies 8

Anthony Holloway
Cisco Employee
Cisco Employee

I do not have a script editor to view you script, in which case posting a screenshot would be helpful.

However, I can tell you that this is easy to do, and here is one way to do it:

Variables:

String csq_name = "MyCSQ"

int position_in_queue = 0

Prompt you_are_currently = p[you_are_currently.wav]

Prompt caller_in_line = p[caller_in_line.wav]

Prompt next = p[next.wav]

Script:

...

Select Resource (csq_name)

     Connected

          End

     Queued

          position_in_queue = Get Reporting Stats (Position in Queue for csq_name)

          /* This next line handles zero and negative numbers, which you don't want to playback to the caller */

          Set position_in_queue = (position_in_queue < 0) ? 0 : position_in_queue

          if (position_in_queue > 0)

               True

                    /* We have a good value to work with */

                    Play Prompt (you_are_currently)

                    if (position_in_queue == 1)

                         True

                              /* The caller is next in line; which sounds better than first in line IMO */

                              Play Prompt (next)

                         False

                              /* The caller is some number greater than 1 in line */

                              Play Prompt (#[position_in_queue])

                    Play Prompt (caller_in_line)

               False

                    /* Something went wrong and we do not have a good value; don't play anything */

...

Hi Anthony,

First let me say thank you, this is cool and i would have missed the use of equal to or less than 0. I'm uploading a copy of my script. Can you show me where I should add your info?

-Perry.

Perry Camacho
Level 1
Level 1

I created these variables that I found here, but just not sure what to do now about the zero question and where to place it?

Variables: String/CSQ and int/positionInQueue

Fields in Get Reporting Statistics step:

Report Object: CSQ IPCC Express

Field: Position in Queue

Row Identifier: CSQ (Variable)

Result Statistics: positionInQueue (Variable)

I'm sorry, I forgot to write the name of the step for that line.  I have edited it, and it now shows:

Set position_in_queue = ...

Does that answer your question or do you still need help?

Consider me an illiterate when it comes scripting, I do it so infrequently that I forget anything I learn. If you can help I promise there is a check headed your way.

Well, there's no "right" place to put it, but in order for it to work, the contact has to be queued in a queue.  So, a logical place to put it would be within the queue treatment of your script.

Here's an example using your current script logic.

Note that this will play the "all agents busy" message upon entering the queue, and then, only if a PIQ is available, it will play the PIQ message.  The queue loop does not include playing the PIQ over and over again, because, with priorities, it is actually possible that the PIQ could increase for the caller.  E.g., Caller is priority 1, and PIQ == 1; then a VIP calls in, gets priority 2, and now caller's PIQ == 2.

Also, you would need to create three new prompts: pYouAreCurrently, pNext, pCallerInLine

Queued

     Play Prompt (--Triggering Contact--, pAllAgentsBusy1)

     positioninQueue = Get Reporting Statistic (--Triggering Contact--, Position in Queue[CSQ] from CSQ IPCC Express)

     Set positioninQueue = (positioninQueue < 0) ? 0 : positioninQueue

     If (positioninQueue > 0)

         True

               Play Prompt (--Triggering Contact--, pYouAreCurrently)

               If (positioninQueue == 1)

                   True

                         Play Prompt (--Triggering Contact--, pNext)

                   False

                         Play Prompt (--Triggering Contact--, #[positioninQueue])

               Play Prompt (--Triggering Contact--, pCallerInLine)

         False

     Queue Loop:

     Call Hold (--Triggering Contact--)

     Delay 60 sec

     Call Unhold (--Triggering Contact--)

     Play Prompt (--Triggering Contact--, pAllAgentsBusy2)

     Call Hold (--Triggering Contact--)

     Delay 120 sec

     Call Unhold (--Triggering Contact--)

     Play Prompt (--Triggering Contact--, pAllAgentsBusy2)

     Call Hold (--Triggering Contact--)

     Delay 120 sec

     Call Unhold (--Triggering Contact--)

     Play Prompt (--Triggering Contact--, pAllAgentsBusy2)

     Goto Queue Loop

Message was edited by: Anthony Holloway - Fixed the indentation

In all seriousness, if this works, I will send you a check. I was dead serious about that. Please send me your email or something where I can get your address.

Payment is not necessary, but fyi my email is on my profile.