Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

UCCX - Script - dynamic path prompt

Hi,

I have to create a contact center for many stores.

The structure of the menu and the structure of the prompts are allways the same for all the stores.

The only thing is prompts are different.

I have a different application ( trigger ) for each store.

I would like to use the same script for all the store and only create a parameter variable so on each of the Application in the UCCX web interface I will go and manually check and type the name of the store to change the path where it read the prompt.

How can I do that ?

it is similar as a language function but little more complexe.

thanks               

Everyone's tags (6)
2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: UCCX - Script - dynamic path prompt

You would hold the prompt filenames in String variables.

Variables

String store_name = "" Parameter

String greeting = "greeting.wav"

Script

Play Prompt (--Triggering Contact--, store_name + "/" + greeting)

Application Parameters

store_name = "store1"

This would play the file (assuming an en_US trigger):

en_US/store1/greeting.wav

On a related topic...

If you have the same 100KB store template script, loaded into 100 store applications (with 100 triggers), you should know two things:

  1. Even though you are using a single script file, the engine has to load that 100KB (as an example of script size) script into memory 100 times (as an example of store count)
  2. Any failure while making a change to the script (making enhancements or corrections for example) will fail all 100 stores

A solution for each, but not without their tradeoffs:

  1. If you had a single script, and a single application, with 100 associated triggers, this would load the script into memory only once and you would only have a single application in your config.
    1. Tradeoff: You cannot use the parameter approach and will need to use a scripting solution based on Dialed Number to dynamically set the store name.
  2. If you duplicated your script within the repository, once for each store, then a change to one store, does not affect all stores.
    1. Tradeoff:  The repo has more scripts within it.  And making a global change requires you to make the change to one of the store scripts, and then uploading the script on top of all other scripts in the repo.  This can be helped by creating a system where you create batch file that automates the file naming piece and creates a zip file for all scripts, and then you upload only the single zip file.  But it's still not as clean as modifying a singular script.

I don't believe there is a right way, or a better way.  I just thought I'd share some thoughts on the subject.

Happy templatizing your UCCX!

Anthony Holloway

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

Anthony Holloway

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

Re: UCCX - Script - dynamic path prompt

There is, but in my opinion it would start to look very messy.

I suggest using the Create Container Prompt step and having it concatenate all of your prompts (sounds like only two) into a single prompt, and then use that output prompt in the menu step.

But for science, I think it's:

Play Prompt (--Triggering Contact--, P[store_name + "/" + greeting] + P[store_name + "/" + greeting2])

I cannot test it at the moment, but I'm 80% confident.

Anthony Holloway

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

Anthony Holloway

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

Re: UCCX - Script - dynamic path prompt

You would hold the prompt filenames in String variables.

Variables

String store_name = "" Parameter

String greeting = "greeting.wav"

Script

Play Prompt (--Triggering Contact--, store_name + "/" + greeting)

Application Parameters

store_name = "store1"

This would play the file (assuming an en_US trigger):

en_US/store1/greeting.wav

On a related topic...

If you have the same 100KB store template script, loaded into 100 store applications (with 100 triggers), you should know two things:

  1. Even though you are using a single script file, the engine has to load that 100KB (as an example of script size) script into memory 100 times (as an example of store count)
  2. Any failure while making a change to the script (making enhancements or corrections for example) will fail all 100 stores

A solution for each, but not without their tradeoffs:

  1. If you had a single script, and a single application, with 100 associated triggers, this would load the script into memory only once and you would only have a single application in your config.
    1. Tradeoff: You cannot use the parameter approach and will need to use a scripting solution based on Dialed Number to dynamically set the store name.
  2. If you duplicated your script within the repository, once for each store, then a change to one store, does not affect all stores.
    1. Tradeoff:  The repo has more scripts within it.  And making a global change requires you to make the change to one of the store scripts, and then uploading the script on top of all other scripts in the repo.  This can be helped by creating a system where you create batch file that automates the file naming piece and creates a zip file for all scripts, and then you upload only the single zip file.  But it's still not as clean as modifying a singular script.

I don't believe there is a right way, or a better way.  I just thought I'd share some thoughts on the subject.

Happy templatizing your UCCX!

Anthony Holloway

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

Anthony Holloway

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

UCCX - Script - dynamic path prompt

hey,

thanks for the quick response..

Right now, i dont know why but instead of playing the prompt it spell letter by letter in the variable:

ex:

A voice spell :

S...T...O...R...E...ONE... Backslash

code is like that :

playprompt = strBanner+prWelcome

prWelcome = WelcomeMenu.wav

in the web app I set :

strBanner="store1\"

any idea?

UCCX - Script - dynamic path prompt

When you are typing in a filename in a String format, the prompt type should change automatically to "User Prompt".  As seen in this screenshot.

This is my test script where I proved out the solution, so I know it works.  We just need to figure out why yours is acting different.

Anthony Holloway

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

Anthony Holloway

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

UCCX - Script - dynamic path prompt

thanks again.. for the quick response..

I know why.. my prompt is in a Menu module... do you know if its possible from that ?

regards,

UCCX - Script - dynamic path prompt

All prompts work the same, in areas of the script.  The menu will work the same as the play prompt.

Post a screenshot if you can.

Anthony Holloway

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

Anthony Holloway

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

UCCX - Script - dynamic path prompt

Anthony,

it work..

I figure out that the variable must be String instead of prompt.

I dont know if this is a supported script by Cisco..

But, thanks a lot !! this is really good.

UCCX - Script - dynamic path prompt

philippe.cousineau wrote:

I dont know if this is a supported script by Cisco..

Haha.  That's funny.  Actually Cisco does not support scripting at all.  There is no such thing as "Cisco supported", only "does it work or not?"  That's what makes this community so great.  There's no one "Cisco approved" way of doing things, which allows us to all get very creative in our solutions.

There have been very few times where I have uncovered a defect in the scripting engine, for which I brought to Cisco's attention, and you know what they did?  They modified the documentation to suit the defect!

But, don't let me scare you.  What you are doing is very common.  Lot's of people do this.  In fact, if you take the UCCXA class, your instructor will show this method to you, and give you script examples which contain this method too.

In fact, it might even be present in the Cisco provided script repository.  Have a look for your self.  There's some good examples in there.

Anthony Holloway

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

Anthony Holloway

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

Re: UCCX - Script - dynamic path prompt

Anthomy,

Hehe, I understand what you mean !!

Hey.. another one..

do you know within that, is it possible to have more than one prompt in a menu ex:

Play Prompt  ((store_name + "/" + greeting + store_name + "/" + greeting2 ))
or

Play Prompt ((store_name + "/" + greeting) + (store_name + "/" + greeting2 ))

 

I have try many thing but can't find the right way.. Im sure there is a catch !?

any idea?7

Re: UCCX - Script - dynamic path prompt

There is, but in my opinion it would start to look very messy.

I suggest using the Create Container Prompt step and having it concatenate all of your prompts (sounds like only two) into a single prompt, and then use that output prompt in the menu step.

But for science, I think it's:

Play Prompt (--Triggering Contact--, P[store_name + "/" + greeting] + P[store_name + "/" + greeting2])

I cannot test it at the moment, but I'm 80% confident.

Anthony Holloway

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

Anthony Holloway

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

Re: UCCX - Script - dynamic path prompt

thats great , it work!

UCCX - Script - dynamic path prompt

Sweet!  Thanks for taking the time to rate my responses.  That's helps me!

Anthony Holloway

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

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
2905
Views
18
Helpful
11
Replies
CreatePlease login to create content