Email Notification To Each Member Of The Assignment Group

ayushsaxena
Kilo Contributor

Hi,

I need to send an email notification to each member of the assignment group, in the member's preferred language (as specified on user form).
To elucidate - if I have 3 group members A (english), B(french), C(german); i want A to receive notification in English, B in French and C in German.
I have been trying to implement the same through mail scripts but have been unsuccessful.

Has anyone implemented anything similar?
Please Help!!

7 REPLIES 7

tony_fugere
Mega Guru

gs,getMessage can be called via mail_script to ensure that you get a translated version of a piece of text. Here are some resources:

http://wiki.servicenow.com/index.php?title=GlideSystem#getMessage.28String.2C_Object.29
http://wiki.servicenow.com/index.php?title=GlideSystem#getMessageS.28String.2C_Object.29
http://community.servicenow.com/blog/ctomasi/gsgetmessage-second-parameter

What I'm imagining is a very complex notification, but with the parameters per Chuck Tomasi's blog post, can be leveraged to make this fun.

You'll need to create Messages on the Messages table with the same key, different languages and language specific values. When you call them with gs.getMessage, the user's profile should be evaluated to determine which language to use.

Warning: this is just a theory though. It works GREAT in the UI of the platform, but I've never actually tried this with an email notification. Let me know if you get stuck and I'll work up an example on a sandbox for confirmation.


I tried the same but i didn't get it right as it's not getting me to the exact requirement.
I still wonder how will i notify each group member in different language.

As I was exploring on the same requirement and what i found was if we trigger multiple notifications on an event. Suppose on creating an incident we notify a group the notifications will automatically be send to the group members. If i create three notification in different language for all three members all three notifications would trigger on occurrence of an event.

Now i need to control these notifications for those group members that is at user level. Now I'm exploring subscription based notifications.
By using them user can accept and reject notifications based on his defined preferences. If some how i can put a language constrain on subscription that is a user defines a language on user form example English and set his preferences of notification based on that language that is he/she is willing to accept only those notifications which are in English. I think it can work.

Please Help !!


Much simpler idea in terms of implementation, but this means that you'll have X number of "duplicate" notifications to manage. Subscriptions are a great idea though because you can make sure the Mandatory flag is set to FALSE on the notifications, then users can access the notifications via "My Profile" > "Notification Preferences" related link.

Have you reviewed the wiki? http://wiki.servicenow.com/index.php?title=Using_Subscription_Based_Notifications


ayushsaxena
Kilo Contributor

Hi Tony,

It worked somehow and now I'm on the edge to finish this requirement. All i need now is:-
Is their a way to restrict subscriptions for notifications triggered on an event.
For instance we have two users A & B we want if we select language of A as English he should be subscribed to two notifications say 'incident_closed_english' and 'incident_resolved_english' which are triggered by an event incident_event.

Similarly if we select language of user B as French then he should automatically be subscribed to notifications say 'incident_closed_french' and 'incident_resolved_french' which are triggered by an event incident_event_french.

Basically what i m looking for is auto subscription based on language. If subscription can restrict the notifications there should be a table where a relationship between user and subscribed notifications is defined. If i can put a constrain their than i think auto subscription based on language is some how possible.I figured user.language table using which i had created a relation between preferred_language field on user form and preferred language assuming there might be a OOB functionality to trigger notifications based on the language (Value) defined on the sys_user_preference table. As i was considering this table to contain the subscription for each user.But it didn't work though it just synced the preferred_language field on user form and the value field on sys_user_preference form using a BR.


Any knowledge on this will really help me a lot.