The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Opsgenie's out of the box integration with ServiceNow currently populates the short description, description, and assignment group of an Opsgenie-created, ServiceNow incident. A lot of folks ask how to customize the web service script to populate additional fields in the ServiceNow incident, so I thought I'd write it up and share it with you all on the community. I'll talk about how to map the “Entity” field from the Opsgenie alert to the “Category” field of the ServiceNow incident.
You'll need to use the Opsgenie ServiceNow integration with action mapping configured for Opsgenie alerts to create ServiceNow incidents for this advice to work for you.
Line 1 grabs the alias received from the Opsgenie alert
Line 2 makes the Get Alert API call to Opsgenie using that alias to get the full alert details, and assigns it to a variable named “alert”
Line 3 grabs the actual alert payload from the “alert” variable
Line 4 grabs the value of the entity field from the payload, and assigns to a variable named “opsgenieEntity”
Line 5 logs the value of the the entity field to the Warning logs in ServiceNow
Line 6 sets the value of the ServiceNow incident’s “Category” field, as the value of the opsgenieEntity variable
Note: Line 5 is optional - it just logs what the value of the entity field from Opsgenie. You can see these logs under “Warnings” in the System logs in ServiceNow. (Search for “Warnings” in the ServiceNow Menu search bar)
Samir
Atlassian TeamHi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
2 comments