cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
495
Views
5
Helpful
4
Replies

UCCX Script

mightyking
Level 6
Level 6

Hello Experts,

I am trying to write a script which will support 2 different languages.  As soon as I try to add the "if" statement the script validation fails.  Is there anything that I am missing? Please find attached a picture of the script.

 

Thanks for your help,

 

MK

 

 

4 Replies 4

Hi Mightyking,

You need a condition in your "If", based on the calling number or whatever.

However if the caller is able to change the language you're better to use another "menu" step instead the "if". put the menu step into the branch "ChangeLanguage"  with a prompt like "for french press one, for english press two" and then make two branche French / English.

Regards,

 

Hi Julien,

The condition in my  "If", is if the caller presses 1 to change the language and I believe that should work. In the main menu prompt, I am offering the caller the option to chose the language and don't want to make another menu and prompt to repeat that again. How can I make the  "If" statement work. At the beging of the script I am setting the contact info (language) to French and asking in the main prompt if the caller desires to change the language to English.

 

Thanks,

 

MK

Ah do you mean that whenever the langage, when the caller press the button (say one if "changeLanguage" Branch is affected to one) it switch the language.

I believe that if you initialize bEnglishSpeaker to False and  set your condition to (bEnglishSpeaker== true), it should work.

However to have something easier to read, maybe you can use a String and do something like this

//Initialize your variable lang at the beggining of the script

lang = "FR"
set contact Info()

.........

// in the branch of your menu Step, instead the "if", use a switch :

switch(lang)
    case "FR"
            lang = "EN"
            set contact Info()
    case "EN"
            lang = "FR"
            set contact Info()

Thanks Julien,

Will test that and let you know.

 

Regards,

 

MK

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: