Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Email Internationalization Usecase

Mahak_Acharya
New Contributor III
New Contributor III

We have a usecase of Internationalization of email communication to the Users.

The requirement is to be able to send email comms in the user's native/selected language based on the user's country.

Could this be achieved via email scripting in Saviynt or any other way.

Regards,

Mahak

4 REPLIES 4

adriencosson
Valued Contributor
Valued Contributor

Hello,

You can use the following sample code in your Email Template to check on user's country

Below is displaying custom text in English for both "GB" & "US" and the custom text in Italian for "IT" : 

${'GB'.equalsIgnoreCase(user.country)||'US'.equalsIgnoreCase(user.country)?'English Version':'IT'.equalsIgnoreCase(user.country)?:'Italian Version'}

You can you this logic to extend to your use case, but you will need to perform translation yourself based on given text.

Hope this helps !

Regards,
Adrien COSSON

Mahak_Acharya
New Contributor III
New Contributor III

Hi Team,

Instead of using a user attribute, we wanted to utilize a dynamic attribute to build the if else.

-Within the request form we have a DA called "Language" where we select the languages from a drop down. This attribute needs to be used to send emails in the selected language.

I tried using this "${accessItems.collect{ it.request_access_attrss.find{it.attributeName.toString().equalsIgnoreCase('Language')}.collect{it.attributeValue}}.get(0)}" but the data is being printed in form of an array. Do we have a syntax i could use to work on the usecase

let me know if below works - 

${accessItems.collect{it.request_access_attrss.find{it.attributeName.toString().equalsIgnoreCase('Unique')}.collect{it.attributeValue.toString().replace('[','').replace(']','')}}}

Mahak_Acharya
New Contributor III
New Contributor III

Thanks Shreyas, 

This did work.

Condition Used:

<% if (accessItems?.collect{it.request_access_attrss.find{it.attributeName.toString().equalsIgnoreCase('LanguageCode')}.collect{it.attributeValue}.contains('fr')}.get(0)) print "Bonjour User" else if (accessItems?.collect{it.request_access_attrss.find{it.attributeName.toString().equalsIgnoreCase('LanguageCode')}.collect{it.attributeValue}.contains('es')}.get(0)) print "Hola User" else print "Hi User"%>

 

Regards,

Mahak