How to set notification preferences for all users are same as per their role.

mmr
Tera Contributor

Hi Team,

We would like to set same notification preferences for all users based on their role. When I checked in Roles and groups forms, did not find any option to configure preferences in roles or groups. So here do we need to achieve this by writing some scripting? please suggest on this.

11 REPLIES 11

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Mohana,



cmn_notif_message is the table you are looking for. You can GlideRecord the table and insert record as per your logic.



Hi Pradeep,



Thank you for the reply on this. Request you to please provide bit more information in detail like, do we need to write a BR to add/set specific particular same notification preferences based on Role? For ex: if we set 5 preferences for itil role, when we assign an itil role to some two users, those users should get the same 5 preferences by default.


if somebody implemented it already, that script will be helpful in this.


Hi Mohana,



I don't know if anyone has implemented something like this before. This would likely be done with a business rule. I can see this working much like roles to a group. When you add a user to that group, they get a role. Same with notifications. The missing piece is, where are you defining what notifications go with that group? You are going to need a new m2m table that defines "This group gets these notifications by default."



See this: Creating a Many-to-Many Relationship - ServiceNow Wiki   for the data structure. Once that is defined, you can add it as a related list. Send us the details about the table name and fields involved and then we can talk about a business rule script to get you going. 🙂


Hi @Community Alums ,

 

I understand it's a pretty old thread. But I have a question related to Notification Preference which resembles to this discussion.

 

We are planning to customize notification preference and show only relevant once for people to Subscribe/Unsubscribe(rather than showing all ~500 notifications list & 90% of which the user may not be knowing what they are related to.

 

Is there a way we can do that through a simple configuration like setting "Active = False" for a record on a similar table like cmn_notif_message.