Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Notification Preference Not Working for Groups

SNow_99
Tera Contributor

Hi Everyone,

I am working on a requirement where a notification should not be sent to a specific set of users, while continuing to send normally to everyone else.

I am using the sys_recipient_notif_preference table. The notification preference works as expected when configured for an individual user, but it does not seem to work when trying to handle a group of users.

I am considering the following approach:

  • Create a custom role or group, for example u_notification_exclusion.
  • Assign this role to a group containing the users who should not receive the notification.
  • In the Notification Preference, select the Role recipient type and specify the custom role.
  • The expectation is that all users having that role would be excluded from the notification.

My questions are:

  1. Does sys_recipient_notif_preference support role-based or group based notification preferences for excluding users from notifications?
  2. If the role is assigned to a group, will the preference automatically apply to all members of that group?
  3. Is any scripting required, or should configuring the custom role in the Notification Preference be sufficient?
  4. If role/group-based preferences are not supported, what is the recommended no-code/low-code approach for excluding a specific group of users from a notification without disabling the notification globally?

Thank you.

1 REPLY 1

AlpUtkuM
Mega Sage

If you need to send specific notification(s) to group of users why not creating group and custom notification and send the notification to that group only? I really don't get why are you thinking to create a role instead of creating a group?