ServiceNow-OpsGenie Integration
Asked by Mritunjay Pathak:

Hi All,

If we acknowledge the alert in OpsGenie, a work note is added in ServiceNow Incident. (this setting is available).  

My Question is:  
Is it possible to change the ServiceNow Incident state from New to In-Progress if the alert is acknowledge in OpsGenie? Any Settings available in Integration or any custom setting is there?  

<br />


Answers:
author: Shivam Naik
body: Hi [@Mritunjay Pathak](/t5/user/viewprofilepage/user-id/5115076) ,

Happy to help!

The options for the Acknowledge Action in Opsgenie include adding the note and sending the payload to a Custom Endpoint:  

![Pasted_Image_4_26_23__4_20_PM.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/254119i9969CE0BD05B7AC8/image-size/large?v=v2&px=999 "Pasted_Image_4_26_23__4_20_PM.jpg")

The latter option for a Custom Endpoint on the ServiceNow side to change that status when the Acknowledge payload comes through would be the best option here. Opsgenie does not currently have a built-in way to have that payload change a ServiceNow Incident to In-Progress.

Please let me know if you have any follow up questions!

comments: author: Mritunjay Pathak
body: Hi [@Shivam Naik](/t5/user/viewprofilepage/user-id/3915058)

Thanks for the reply.  

Just want to confirm, if we select **send to custom endpoint** then in the third box should we need to fill **sample?
![OpsGenie sample.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/254160iF18B8181316EF98B/image-size/large?v=v2&px=999 "OpsGenie sample.jpg")** If yes, then in **sample** in ServiceNow should we need to make any script change? Please guide me as I am new to this and don't have enough knowledge.

![ServiceNow sample.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/254161i6D5BC4791222129C/image-size/large?v=v2&px=999 "ServiceNow sample.jpg")


author: Shivam Naik
body: Hi [@Mritunjay Pathak](/t5/user/viewprofilepage/user-id/5115076) ,

We don't have specific examples to provide, but I found this documentation on their site <https://docs.servicenow.com/bundle/rome-application-development/page/integrate/custom-web-services/concept/c_CustomWebServices.html> going over how to create those. Essentially you're creating a Custom API Script to trigger for specific Opsgenie actions. It doesn't necessarily have to be the Sample script, but you would need to create a script with an endpoint for changing the status of the Service Now Incident into In Progress when triggered by the Opsgenie Acknowledgement.

[The Sample script](https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-servicenow/#Sending-Payload-to-a-Custom-Scripted-REST-API-Source-Endpoint-in-ServiceNow--Optional-) itself makes an HTTP request to our Alert API and get the alert data from our Alert API and log it to the application logs as an example for this "sample" Scripted REST API Resource. You could edit it perform the Incident Status change in relation to the Opsgenie Acknowledgement, but it would be better to create a new script specific to that Acknowledge action to reference in the Integration.

Please let us know if you have any follow up questions


Tags: cloud