Create Business Rule to Assign Incident based on Work Notes

andyrod156
Tera Contributor

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? 

2 REPLIES 2

Appanna M
Tera Guru

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.

James Chun
Kilo Patron

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