Create Business Rule to Assign Incident based on Work Notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 06:59 AM
I have integrated PagerDuty with our ServiceNow Instance and currently I can have ServiceNow generate a ticket within PagerDuty.
When that happens, PagerDuty creates a work note on the ServiceNow incident as followed.
[PagerDuty Integration] PagerDuty created incident for group Configuration Support and assigned it to "User Name"
How could I create a Business Rule (or best method) to detect the "User Name" from the work note and properly assign it to that user in ServiceNow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 02:10 PM
Hello @andyrod156 ,
Write an after business rule when worknotes updated.
Logic: You have to fetch the assigned to user from current.work_notes and make GlideRecord query to the user table and get the sys_id of the user and set the current.assigned to the user.
Please Mark My Answer as Helpful and Accept as Solution, if you find this article helpful or resolves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2024 02:16 PM - edited 04-19-2024 02:17 PM
Hi @andyrod156,
First of all, try to avoid BR for assigning a ticket to a group/user, use the Assignment Rule instead.
I would avoid assigning someone from a text/work note as you never know what you will get.
Can you share what is expected within the work note? I am assuming it will contain the name/identifier of the assignee.
Also, is there a reason why you can't assign the Incident within ServiceNow and sync back to PagerDuty?
Cheers