
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
05-26-2024 10:30 PM - edited 07-22-2024 10:26 AM
Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
Hi there,
Working with Virtual Agent Proactive Triggers which ServiceNow introduced in the Utah release and on a multi-language instance? Then probably you have run into the question of how to translate the Message field on the Proactive Action record! If you know the structure, it will only take you a few seconds though if you don't... so let's share this undocumented small piece of knowledge 😀.
Proactive Triggers
With the Utah release ServiceNow introduced Proactive Triggers for Virtual Agent. The ServiceNow Docs describes this roughly as "Proactive Triggers supports end users by providing helpful platform actions, using real-time data. Admin users can customize rules and actions to present rich text pop-up messages to specific users."
A picture says more than a 1,000 words. This is what Proactive Triggers looks like:
Proactive Triggers is not active by default on instances. About a year ago I wrote an article on how to activate Proactive Triggers and basic configuration steps:
- Proactively sending context-specific messages to end users with Virtual Agent Proactive Triggers
Proactive Action Message
When configuring the actual messages for Proactive Triggers, you'll land the Proactive Action records. On Proactive Action records the message is stored in the "Message" field which is of type HTML Script.
Translation
Working on a multi-language instance, at some point you will have the need to work on the translations for existing and/or new Proactive Triggers. When doing so, you might ask yourself... how?! As HTML Script type fields are not translatable. Though at the same time, viewing the out-of-the-box examples, those are multi-language. What's the catch? What's the trick?
When working on translations, I find I18N Debugging a very useful appliance. When activating this (System Localization > Enable I18N Debugging) and triggering the Proactive Trigger on the Portal again you might see something like this:
The Proactive Action Message is prefixed with "TRT:". This indicates that Translated Text can be used. I also wrote an article on this three years ago:
- Q: Help!!! (How) can I translate this? A: Have you had a look at I18N Debugging?
Another option I like to use is having SN Utils enabled. SN Utils would add a Flag icon and a link if the field is translatable. In regards to the Proactive Action Message field though, nothing is shown?! Somehow ServiceNow did make Proactive Triggers multi-language, though not in a conventional way. Unfortunately we cannot access the source code of the Proactive Trigger widget we see on the Portal. Though knowing I18N Debugging showed TRT, let's search the Translated Text table.
When working with Translated Text it helps to know the Table name and hopefully the Field name you are after. With that you would be able to find any records if applicable within seconds. In this case I did search first on the Table name and Field name, though no results. When removing the Field name:
Field "translated_message"? Apparently not the Message field is used (which would also be odd since it's of type HTML Script), though an additional field called Translated Message which is not on the Form Layout. Viewing the XML of one of the out-of-the-box Proactive Action records reveals this field:
Digging a bit more around you will find Business Rule "Add translated_message" which keeps the Translated message field in sync with the Message field.
Result
Knowing the structure described above, we can now translate the Proactive Action Message with ease by creating/updating the Translated Name records for the Proactive Action Messages. Hopefully describing this undocumented piece saves some of you a few hours of searching.
---
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? |
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
9x ServiceNow MVP
---
- 903 Views