Click HERE to see how Saviynt Intelligence is transforming the industry. |
02/24/2023 05:56 AM
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
Solved! Go to Solution.
02/24/2023 04:53 PM
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 !
03/23/2023 02:04 AM
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
03/23/2023 02:30 AM - edited 03/23/2023 02:31 AM
let me know if below works -
${accessItems.collect{it.request_access_attrss.find{it.attributeName.toString().equalsIgnoreCase('Unique')}.collect{it.attributeValue.toString().replace('[','').replace(']','')}}}
03/28/2023 10:44 PM
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