How to trigger outbound REST API when State is change?

jackh
Kilo Contributor

Hi,

My use case requires to call external REST API from ServiceNow when the incident state is changed.   For example, our release pipeline will create a new incident (via inbound REST API call) for someone to approve this release.   Once the incident assignee approves the ticket by changing the State (e.g. from New to Approved), it will trigger to call outbound REST API to our release pipeline.   How to do that in ServiceNow to trigger such outbound API when State is changed?


Any advice would be appreciated.

Thanks

1 ACCEPTED SOLUTION

That is because, when you click "Update" you are redirected to the recent page you opened. When you click save, you can still stay on the same incident form even after updating the form.


View solution in original post

22 REPLIES 22

Srinivas Balusu
Kilo Guru

You can create an 'After Update Business rule' to achieve this.


thirschi
Tera Expert

Make a REST Message and then take the sample code and write a Business Rule that satisfies your conditions and then call the REST Message.


I've put my code on share for automated deployments.



ServiceNow Share


I've put my code on share for automated deployments.



ServiceNow Share