Shawn Gumucio
So there are a lot of ways to update service now incidents from an xMatters workflows. However they all require a Sys_ID, I rarely have access to the sys ID however I always have access to the Incident#.
I can right a simple java script that that taps the ServiceNow API and returns the Sys_ID by for a corresponding incident#, however I cant seem to get that to run right on a custom step in xMatters
With all the the xMatters to ServiceNow integration that currently exists there has to be an easier way to just reach out the SNow from xMatters and say, "Hey tell me about this Incident#"
Thoughts?
0
Comments
Please sign in to leave a comment.
Thank you for your feedback. We'll consider how we might make this process easier in the future.
To provide some background, ServiceNow requires the sys_id to update, add comments, or retrieve a specific record. While users with the appropriate permissions can change the incident number, the sys_id remains immutable. You can search for a record using the incident number, which can be sufficient as it is should be a unique, auto-incremented value. However, if you need to update the record or add a comment, you will still need the sys_id, which can be obtained from the query results.
Here is a definition for a step to query for an incident by number and output the sys_id.
Name: ServiceNow - Get Incident by Number
Endpoint Type: ServiceNow
Inputs:
Outputs:
Script:
I appreciate you taking the time to respond.
Well now I am know I'm not going crazy. Before making this post I tried a script just like this and I kept getting the same error. Its like it wont see the existing endpoints.
I know this endpoint works cause in the same workflow it does other things that communicate with ServiceNow.
Script failed with message: No endpoint has been defined with name 'ServiceNow' No endpoint has been defined with name 'ServiceNow'
Is your custom step configured like this?
Endpoint configuration
Endpoint reference in script code