cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1757
Views
25
Helpful
8
Replies

How Does the Language settings work under Trigger in UCCX

Hello All,

 

This is my first time asking a question on Cisco Community, I apologize in advance if I have raised my question with the wrong board, please advise me accordingly.

 

So I am building a script which has a lot of variables declared as parameters and once I pass the value from application page the script runs fine.

just a note: by documents in my thread i mean XML files

My problem is that I don't understand that how does the Language setting works under Trigger settings, as far as i understand it specifies the repository where the script will look for the files(prompts+documents) specified, so I have selected L[en_GB] there in trigger settings and i have added all of the prompts and documents under L[en_GB] and i have selected the respective prompts and documents on main application page. when the scripts runs and i do a reactive debug i can see that system looks for the prompts in L[en_GB] and for documents it looks in en_US, since the documents are in en_GB i am getting document not found exception.

 

So my question is, is it normal that documents are supposed to be in L[en_US] all the time? and that setting under trigger is only to give the repository for prompts.

 

the confusing thing is if instead of declaring variable as parameter and adding value on main application page, I add the value in variable inside the script itself then the system looks for the file in L[en_GB]

 

I would really appreciate if someone could explain how the standard system is suppose to work. Thank you

 

Regards,
Masood

1 Accepted Solution

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee

EDIT: I now see what the problem is.

 

If you have a document parameter, the only way to set it, is with the document selector, which, by default lists every document in your document repository.

 

There's two problems with it:

 

1. The UI does not show the full path to the document, thus, the language folder is unclear to the user

2. If a file exists in multiple language folders with the same name, it's only shown once, and the system default language is the "winner" - though, see #1 above, the UI doesn't make this clear

 

Example:

 

My en_US and en_GB folders have two files: one uniquely named file, and one generically named file

uccx-doc-en-us-folder.png

uccx-doc-en-gb-folder.png

 

 

Now, when I try to set my app param, I see the following screen, where the unique names are shown, but the common name is collapsed into a single entry, hiding it's language parent folder.  Though, as your and my testing has proven, the en_US system default language wins.  I don't know if it's as simple as that, or if there's some alphabetical sorting going on or what, but it's broken nonetheless, and not a good UX.

uccx-doc-parameter.png

 

 

If you want to adjust the language in the script to match the trigger, here's what you can do.

 

Variables

 

Language contact_language = L[]
Document target_document = DOC[]

 

 

*Where target_document is an app parameter and set on the web page

 

Script Steps

 

/* Read the trigger language setting */
contact_language = Get Contact Info (--Triggering Contact--)
/* Override the document language */
Set target_document = target_document @ contact_language

 

 

View solution in original post

8 Replies 8

Anthony Holloway
Cisco Employee
Cisco Employee

EDIT: I now see what the problem is.

 

If you have a document parameter, the only way to set it, is with the document selector, which, by default lists every document in your document repository.

 

There's two problems with it:

 

1. The UI does not show the full path to the document, thus, the language folder is unclear to the user

2. If a file exists in multiple language folders with the same name, it's only shown once, and the system default language is the "winner" - though, see #1 above, the UI doesn't make this clear

 

Example:

 

My en_US and en_GB folders have two files: one uniquely named file, and one generically named file

uccx-doc-en-us-folder.png

uccx-doc-en-gb-folder.png

 

 

Now, when I try to set my app param, I see the following screen, where the unique names are shown, but the common name is collapsed into a single entry, hiding it's language parent folder.  Though, as your and my testing has proven, the en_US system default language wins.  I don't know if it's as simple as that, or if there's some alphabetical sorting going on or what, but it's broken nonetheless, and not a good UX.

uccx-doc-parameter.png

 

 

If you want to adjust the language in the script to match the trigger, here's what you can do.

 

Variables

 

Language contact_language = L[]
Document target_document = DOC[]

 

 

*Where target_document is an app parameter and set on the web page

 

Script Steps

 

/* Read the trigger language setting */
contact_language = Get Contact Info (--Triggering Contact--)
/* Override the document language */
Set target_document = target_document @ contact_language

 

 

@Anthony Holloway  Thanks you so much for your reply. it actually cleared a lot of ambiguity that i had in my mind regarding Language setup. so I have tried the approach you have mentioned:

DOC = DOC @ Language

 

and it worked like Magic!!!

 

so since the show documents does not show the full path of the xml we need to specify in the script, strange thing is that it works just fine in case of prompts, but anyways many thanks for your input on this. I really appreciate it.

 

 

Awesome! I didn't know this was even an issue. I personally stay away from app params (personal preference), though I know they are used by a lot of people. Good to know. I think I'll open a defect for this if you don't think you will.

Hi @Anthony Holloway 

 

Actually I had opened a case with Cisco TAC, it took about a week but they couldn't really get to the bottom of it, that's when you came in and gave me this simple workaround.

 

By the way if you could answer, how do we reference xml files in a specific folder inside a Language repository from within the script? I am using the upload document step and i want to give the full path including the folder name here under the Language field like L[en_GB]\foldername\ while the system only gives me option to select a Language, may we can do it using expression editor but i don't know the syntax for that. I have attached an image of the step i am using

 

appreciate your help @Anthony Holloway 

 

Regards,

Masood

In the filename field, just put the relative path, but excluding the language.

E.g., "foldername\filename.xml"

TIP: If the folder doesn't exist, the upload step creates it on the fly

Also, this article I wrote may be of interest to you as well:
https://community.cisco.com/t5/collaboration-voice-and-video/uccx-masking-passwords-in-scripts/ta-p/3137357

ah alright ... so it was that simple...I'll try that, and thank you so much for sharing the article, good piece of information  ...

 

have a nice day sir ... cheers

 

Regards,

Masood

Sean Lynch
Level 7
Level 7

Here's an alternative response:

When using languages in UCCX, there is a system default at the root.  You can find this setting for you system in:

System --> Language Information

2020-0424-findDefLang.png

 

Shows the default language set for your system:

2020-0424-findDefLang2.png

If you do not specify a change in language from the default, for any script you write, the 'default' directory for Documents and Prompts is the starting search point.

2020-0424-defDocs.png

If the script does not find the document or prompt referenced in your script, it will then search the directories set by the system default language (Named).  Or, subsequently, for an alternate language if changed for the Contact in the script.

2020-0424-defPrompts.png
 

If you are writing a script and you would prefer the application not use the system default language, then you can change the default language for the specific application at the TRIGGER in the application:

2020-0424-appLevelLangugeChg2.png

1.  Click the link for the Trigger in the Application

2.  In the pop-up window, click the drop-down arrow 

3.  Select a new alternate default language for the Application

4.  Save

This will change the default language for contacts calling your application.  Alternatively, you can set multiple Triggers (with unique extension) for a given application, and set a default language for that specific trigger.  You could then reference different languages by dialed number/trigger.

If you are not writing an application script that needs to change between languages (multi language change from [system default] [en_US] English to [es_US] US Spanish, for example) within the script, then this is the simplest way to change language from the system default.  The Prompt names should match, in their respective named language directories, for each language referenced...

The system will still look for documents and prompts in the default directory first, but if none is found, it will search the set language--be it system default or application/trigger defined.

 

Hope this helps.

-Sean

@Sean LynchThank you for your input on this, it was really helpful.

 

my problem actually was that even if i was specifying the default Language setting under the trigger as en_GB and the file was also inside it, the system was not looking there.

so i used the step mentioned by @Anthony Holloway  and it worked.

 

Thanks for your response. I really appreciate it