- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2020 05:53 AM
I have a Notification (sysevent_email_action) where Subscribable is checked/true:
Then I sign up for it via Settings (gear at top right - in banner) > Notifications > Notifications by category, and then find the notification under SYSTEM NOTIFICATIONS, then toggling the channels to true:
When I did the screen shot above, I found that Notification Message (cmn_notif_message) records were created - this is good.
From this docs article, and from looking in my instance, I see that the "Subscription Based Notifications 2.0" plugin is installed, which replaces the cmn_notif_subscription table with the sys_notif_subscription table.
In order to get my notification to work (create sys_email records), I had to manually link the Notification (sysevent_email_action) to the Notification Message (cmn_notif_message) by the following steps:
- sys_notif_subscription.list in the Navigator and press Enter.
- click the blue New button at the top of the list
- fill in User, Notification, and Send to and click Save.
Obviously we can't expect our users to do the same. My expectation was/is that this sys_notif_subscription would be automatically created when a user subscribes.
I searched high and low for logic that would create the sys_notif_subscription record, and I did find some, but it looks like it's specific to cmdb, and nothing is there for notification subscription. But I could be missing something.
I'm thinking we'll have to create logic that will create sys_notif_subscription records when someone subscribes, and delete sys_notif_subscription records when someone unsubscribes. But is there another way to do this? Something different recommended by ServiceNOW? Or could this be functionality that somehow slipped thru the cracks and should be in a future release?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2020 08:06 AM
Yup thats what I meant 🙂
Hope that helps you achieve what you are looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2020 04:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2020 05:37 AM
MB - I apologize. By "custom table" you probably meant the table shown in the first screenshot. Looks like we're going to have to build logic similar to what you've described.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2020 08:06 AM
Yup thats what I meant 🙂
Hope that helps you achieve what you are looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2020 05:45 AM
MB - thanks for responding. Actually, on our instance (from Stats - Build tag: glide-newyork-06-26-2019__patch4-hotfix1b-01-24-2020), I couldn't find UI Action "Subscribe for a Business Service", but I did find "Subscribe" on the Configuration Item (cmdb_ci) table, which calls script include SubscriptionUtil. If we have to build custom logic, I'm almost certain I can use this as a guide for what we need to do to ensure "Notification Subscription" [sys_notif_subscription] table records are created, updated, and deleted as needed (I'm guessing by "your custom table" you mean this "Notification Subscription" [sys_notif_subscription] table).
But I disagree on that point if that's what you meant - I don't think "Notification Subscription" [sys_notif_subscription] can be considered a custom table - it was created with the plugin I mentioned. Then assuming it's not a custom table, going further, I believe that either
- functionality would/should accompany that plugin to ensure "subscribable" notification functionality will work when a user signs up for it (note - they do this via an ootb dialog they get when clicking the gear at the top right - "System Settings" it's called - this is not a dialog we created or I think we should change), or,
- via "docs" guidance would be provided on what we should do when linking a subscribable notification to a user when they sign up for it via System Settings > Notification.
Regardless, we're probably stuck building the logic we need because we can't wait for it to be added to a future release or patch. Therefore again, the direction you've provided will be useful. But I'd like to leave this unanswered for a while in case someone else has any different/additional knowledge on the subject.