Agent Locale in Scripts

Hi everyone, I noticed that there was a new feature released last week whereby "Scripting boxes can now populate based on the agent's locale/language settings". I do see a new built-in script variable for agent locale, but I'm unsure how we could use this to vary the displayed text in the script. Is there a way to enter an "if/then" statement in the text box itself?

{{Scripter.Agent Locale}} —agent’s chosen language code, such as: en-US: English; fr: French; and es: Spanish, based on the agent’s language selection.

https://help.mypurecloud.com/articles/built-in-script-variables/

#Bump - anyone have any ideas?

I'm not sure where you got your quote from, but the release notes from Oct. 12th are a little clearer:

The variable enables the script designer to dictate, based on the agent’s chosen language, the content that appears or the actions that trigger.

This is saying you, as the script designer, can use the new locale variable anywhere in a script where you can already use conditional logic. I don't believe this is implying any new functionality other than the existence of the variable.

Hi Tim,

Thanks for your response -- I agree; that's my understanding too....however, are there any resources available to show how you can use conditional logic in scripts? (Not saying that's new, but in order to use this new feature, I need to figure out how I can use a conditional to display different text based upon the locale variable)

Cheers,
Brad

Here's one way to localize text on the page. You could also make use of multiple pages and transition to the desired one based on the language.

Create vars that will hold localized text:

Configure a custom action to set vars for the language:

Assign the action as the page load action:
image

Use the language-customized variables in the script:

1 Like

Thanks @tim.smith - this is very helpful! I'll give it a shot in our lower environment.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.