(Dynamic) Multi-lingual notification support - ServiceNow Community
Mark Roethof
Tera Patron
Tera Patron

Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

 

Hi there,

 

In a previous article, I shared how to achieve static Multi-lingual notification support. Say what, multi-lingual notifications, is that an option with ServiceNow?! Yes it is... since the Tokyo release 😀. Besides having the "static" multi-lingual notification support, the Tokyo release also offers a "dynamic" multi-lingual notification support. Let's have a closer look at this.

Pre-Tokyo

Setting up notifications in various languages, you could see several "solutions" out there. For example:
- Adding a condition to the Notification, validating the language of the email sender. Easy to set up and for some customers this would work fine. Though what if the senders language setting is not the same as the receivers language setting?
- Scripting the subject and message body, using gs.getMessageLang() to translate all text to match the receivers language setting. This works fine, though will require all text to be added as UI Messages. Also... this only works for one receiver, not when working with a watch list or a group which contains receivers with different language settings.
- Creating separate events for all receivers of the Notification, to be able to validate the individual receivers language settings and send the Notification in the correct language. Works well, though the customizations needed for these are way too much.

Tokyo

During the TechNow episode regarding the Tokyo release, multi-lingual notification support was covered. As already mentioned, there is a static way and a dynamic way. The dynamic way is one step further. In theory you would have your normal Notification record, which could be dynamically translated using Dynamic Translation. This could be used for example if you have no static in place, or if you have static in place for some languages on your instance though not all.

 

find_real_file.png

Activating dynamic multi-lingual notification support

There are some steps you need to take before the multi-lingual notification support is available to use.

General
1. Activate Dynamic Translation
2. Integrate with a translation service provider (on my PDI, I'm using a free IBM Cloud for this)

Dynamic multi-lingual notification support 
3. Activate Glide Notification Translation
4. Enable static translation

After having met the previously mentioned prerequisites, there's only one thing left...

 

find_real_file.png

 

Enable Dynamic Translation on the Notifications of your choosing 😀.

Testing

confidence too low
For this article, for my first test I am using out-of-the-box Notification record "Incident was opened". When submitting a new Incident, with a caller which has a non-English language set... you might still receive emails in the "normal" English language... To save you some headache, if you receive emails in the "normal" English language, and you have met the pre-requisites, have a look at the System logs (not the Email logs). Most likely you will see something like:

 

{
   "code":"40050",
   "message":"Unable to automatically detect the source language, confidence too low",
   "status":"Error"
}

 

Note: This is a specific message from the IBM Cloud service provider, so for Google or Microsoft it might look a bit different.

Email Outbox
For my second test, I just created a new Notification record with a bunch of plain English text. This way, the "confidence too low" error should not be an issue.

You might have the email sending disabled on your non-production instance (or Personal Developer Instance). After simulating the Notification trigger conditions on the Incident, it's pretty common to look at the generated Email records [sys_email] to see if and what emails have been generated. At first sight, you might think the Multi-lingual notification support has done nothing. Though when opening the Email record, notice the "Email Log" related list: 

 

find_real_file.png

 

When Multi-lingual Notification support is working, actually two Translated emails have been generated, one for English, one for Dutch! I did verify the actual emails which were sent, works like a charm 😀.

Groups, Watch list, CC, BCC

The multi-lingual notification support works also perfect when having a Group or Watch list set as receivers of the notification. Using scripted CC or BCC though, is not supported for multi-lingual notification support.

Paid

Be aware, Dynamic Translations is a paid product. So you pay for the ServiceNow feature, and you pay for the service that you get translations from (like Google, IBM, etcetera). For this article, I've used IBM Cloud which I have in place on my Personal Developer Instance.

---


And that's it. Hope you like it. If any questions or remarks, let me know!

 

C

If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.

 

Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in?
- Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

 

Kind regards,


Mark Roethof

Independent ServiceNow Consultant
3x ServiceNow Developer MVP

3x ServiceNow Community MVP

---

LinkedIn

 

Comments
Aman Gulati
Mega Guru

@Mark Roethof - For Dynamic Translations How do the notifications trigger the translation? DO we need to implement a flow for each notification?

 

Thank you

Aman

Version history
Last update:
‎08-03-2024 10:21 AM
Updated by:
Contributors