cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1773
Views
0
Helpful
4
Replies

How to select different prompts in uccx

yixiu0317
Level 1
Level 1

Hi        There

I am using uccx 7 and having a requirement to play different prompts for callers in the same queue.

For example, the first caller will hear "you are the first caller" and the second caller will hear "you are the second caller".

I have the variable that save the caller's position in the queue, but having problem to play different prompt.

If the variable is called POSITION and its type is string, I want to use this variable to link to the prompt POSITION.wav file, when the POSITION is 1, it will play prompt 1.wav and if it is 2, it will play 2.wav.

But I could not find a way to pass the value, see the attachment, since it treat the POSITION variable as string not variable, the value of POSITION can not be passed.

Thank you in advance

1 Accepted Solution

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee

I use one of two ways, depending on the application:

1. Use the variable value as part of the wav filename.  Use this one with caution because now you have to have a filename for everypossible value that position_in_queue can hold.  To include -1!

Set position_in_queue = 3

Set piq_message = "youare" + position_in_queue + ".wav"

Play Prompt(--Triggering Contact--, P[piq_message])

2.  Use a switch (or lots of If's) to conditionally play your files.

Set position_in_queue = 3

Switch (psition_in_queue)

     Case 1

          Play Prompt (--Triggering Contact--, P[youarefirst.wav])

     Case 2

          Play Prompt (--Triggering Contact--, P[youaresecond.wav])

     Case 3

          Play Prompt (--Triggering Contact--, P[youarethird.wav])

     Case Default

          Play Prompt (--Triggering Contact--, P[youarescrewed.wav])

Anthony Holloway


Please use the star ratings to help drive great content to the top of searches.

View solution in original post

4 Replies 4

Aaron Harrison
VIP Alumni
VIP Alumni

Hi

If POSITION is the name of the variable, it should not be in quotes. If you put it in quotes, it becomes a literal string, so it will look for POSITION.wav

The variable name is CaSeSeNSiTive.

Regards

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Anthony Holloway
Cisco Employee
Cisco Employee

I use one of two ways, depending on the application:

1. Use the variable value as part of the wav filename.  Use this one with caution because now you have to have a filename for everypossible value that position_in_queue can hold.  To include -1!

Set position_in_queue = 3

Set piq_message = "youare" + position_in_queue + ".wav"

Play Prompt(--Triggering Contact--, P[piq_message])

2.  Use a switch (or lots of If's) to conditionally play your files.

Set position_in_queue = 3

Switch (psition_in_queue)

     Case 1

          Play Prompt (--Triggering Contact--, P[youarefirst.wav])

     Case 2

          Play Prompt (--Triggering Contact--, P[youaresecond.wav])

     Case 3

          Play Prompt (--Triggering Contact--, P[youarethird.wav])

     Case Default

          Play Prompt (--Triggering Contact--, P[youarescrewed.wav])

Anthony Holloway


Please use the star ratings to help drive great content to the top of searches.

Hi             Anthony

Like your default prompt name

The second method worked for me but the first one did not, it probably because of the path I mentioned in the P[] is not valid.

Thank you very much for your help

Glad to see some shared humor on the forums!  Do be sure to replace my example's Set step with the appropriate Get Reporting Statistics step.

The nice thing about the switch step is, you can easily expand or collpase your customized recording options, leveraging the default case for everything else.

Example: If you only wanted a customer recording for "You are next in line"

Switch (psition_in_queue)

     Case 1

          Play Prompt (--Triggering Contact--, P[youarenext.wav])

     Case Default

          Play Prompt (--Triggering Contact--, P[grabasnickers.wav])

In this example if looks like the switch step can easily be replaced by this if step example:

If (position_in_queue == 1)

     True

          Play Prompt (--Triggering Contact--, P[youarenext.wav])

     False

          Play Prompt (--Triggering Contact--, P[grabasnickers.wav])

And that might be true.  But what if you need to add a custom recording to the first two callers in queue?

If (position_in_queue == 1)

     True

          Play Prompt (--Triggering Contact--, P[youarenext.wav])

     False

          If (position_in_queue == 2)

               True

                    Play Prompt (--Triggering Contact--, P[thereisonecalleraheadofyou.wav])

               False

                    Play Prompt (--Triggering Contact--, P[grabasnickers.wav])

Eww.  That's ugly.  Let's see how that would have looked if we would have implemented a Switch at first instead:

Switch (psition_in_queue)

     Case 1

          Play Prompt (--Triggering Contact--, P[youarenext.wav])

     Case 2

          Play Prompt (--Triggering Contact--, P[thereisonecalleraheadofyou.wav])

     Case Default

          Play Prompt (--Triggering Contact--, P[grabasnickers.wav])

Oh!  That's much nicer.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.