You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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)
80 accepted answers