ServiceNow Description for PagerDuty raise incidents

While we’ve got PagerDuty to ServiceNow integration working, whenever an incident is created in ServiceNow the description is always:

PagerDuty: [object Object]

Does anyone know how we can change this to be something more useful?

I’ve not found anything in the documentation that would suggest we can change it. I’ve also had a look through the business rules in ServiceNow but nothing has jumped out…

Any direction would be appreciated!


I’ve worked out why this is.

I edited the PagerDuty script include in ServiceNow to log the JSON object that was being transformed. What I’ve found is that when you raise an incident in PagerDuty manually, the code works and the description is output correctly.

However we are processing incoming incidents from a new relic instance. The object that is being passed is slightly different. Elements are not in the same place.

Hence, the description just being output as [object object].

To fix it I’ve change the code to look at the element it extracts and if it’s an object, iterate though the elements and add them to the description.

1 Like

Rather than editing the core integration code (making upgrades a bit more effort), you can use Inbound Field rules to map to the description field of the ServiceNow incident.
I’ve written an example here:

1 Like

Now that @ridgey is useful stuff!

Top marks sir. Thank you very much.

(and now I need 100 characters to be able to post).