User's Notifications: Default Subscriptions?

toneyvecchio1
Tera Expert

Greetings,

 

I have been modifying email notification subscriptions on behalf of users at request but I am not aware of what controls the default initial subscriptions offered to the user? Of course they can select + Subscribe to a new notification, but what table manages the default/base offered? I've tried toying with groups and roles, looking at the the Email Notifications table but can't seem to make the correlation. Couldn't find much on the wiki for this and I appreciate any information.

 

Notifications.png

1 ACCEPTED SOLUTION

Slava Savitsky
Giga Sage

Notifications are defined in Email Notifications [sysevent_email_action] table. The ones that have Subscribable = true are available for subscription. Besides, when a user receives a certain notification for the first time, its appears in their subscriptions and can then be changed from there. Subscriptions are stored in Notification Messages [cmn_notif_message] table. If you want to subscribe your users to certain notifications by default, you can write a business rule that will create the necessary entries in Notification Messages table when a User record is inserted. To subscribe existing users, use a scheduled job or a background script.


View solution in original post

5 REPLIES 5

robpickering
ServiceNow Employee
ServiceNow Employee

From my experience, this isn't a definitive answer, but a user's notifications become available AFTER they have received a specific notification.   So, to populate their options, they have to receive it once, then they can disable it if they wish.


Subhajit1
Giga Guru

You can test it if you want......create a Test user on your Test instance and see what Notifications the User is subscribed to after going to the sys_user_preference table and check what notifications the User is subscribed to in the first place


Slava Savitsky
Giga Sage

Notifications are defined in Email Notifications [sysevent_email_action] table. The ones that have Subscribable = true are available for subscription. Besides, when a user receives a certain notification for the first time, its appears in their subscriptions and can then be changed from there. Subscriptions are stored in Notification Messages [cmn_notif_message] table. If you want to subscribe your users to certain notifications by default, you can write a business rule that will create the necessary entries in Notification Messages table when a User record is inserted. To subscribe existing users, use a scheduled job or a background script.


Slava, great info this is definitely leading me into the right direction. I can add a msg subscription using the normal user's UI and see it reflected as a row in [cmn_notif_message], I can even modify that row to change the Notification Message to a different row from [sysevent_email_action] and see it reflected in the users account - As seen below I changed to "Request Item Delivery" - Cropped img.


UsersSubscriptions.png



However, when I add manually using New button table for Notifcation Messages and manually entering a row, I cannot seem to get it to reflect on the users account. Is there something that occurs during the UI add that isnt accomplished by adding directly to table, another table involved for reference? I confirmed that the selected notifications were active and subscribable on the   [sysevent_email_action] table. I showed the available fields in the New Notification compared to the one entered succesfully from the UI and it looks to match. Additionally I deleted the manually added row and created another subscription over the UI using the same Notification Message as the manually added row that was deleted and it works. Am I missing something?



The first poster mentioned that the user needs to receive a Notification Message for it to show on the UI - is that the explination and if so could I manually flag it to appear?



Added via UI - shows on users subscribed notifications:Notification-ReqItemSuccess.png



Added directly to table - Does not reflect in users subscriptions.


Notification-ReqApprovalFail.png



Deleted Request Aproved and then added it using the UI, worked correctly and of course reflected in the users subscription UI.


Notification-ReqApprovalSuccess.png