How to send a notification to an approval group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 01:15 AM
In our ServiceNow instance, we have some records called 'Capability Provisioning' records, which extends from the 'u_cmdb_ci' table:
I'm wanting to create a notification if either the 'Provider' or 'Recipient' fields on a record gets amended and send this to the approval group of the 'Provider' or 'Recipient'. Both of those fields come from the 'Departments' table e.g. if the 'Provider' changes, an email notification should be sent to the approval group of the new 'Provider' and the approval group of the current 'Recipient', and vice versa.
In this example, the notification would only need to be sent to the approval group, containing SPC.
I thought I'd check if this is possible to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 01:24 AM
Hi,
Based on your question, below is my understanding.... confirm me if I'm correct.. then I can help you with the script..
On 'Capability Provisioning' table, when ever there is change in "Provider" or "Recepient" then we need to trigger a group approval..
so how can we find for which group we need to send the notification?
Is it something like.. group name contains "SPC"? to all those groups we need to send the notification?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 01:26 AM
Hi,
That is correct, or it could be something such as Group Type is 'privileged_approval' and 'SPC'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 01:44 AM
I'm not sure how to filter on the group, that's what I need help with.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 01:58 AM
Hi,
Try like below.. it will help you.. tested.. it's working..
1. Create a business rule like below... update your table name and field names as per your requirement..
instead of caller and assigned to... use provider and recepient..
In script part use below..
In encoded query,, just go to your table and apply filter condition..copy paste it..
2. Create an event with the same name which was mentioned in the code..
3. Create notification and click "true" on event parm1.. that's it..
Please mark my response as both helpful and correct, if it helps,.