- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2016 11:10 AM
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
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2016 12:54 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2016 11:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2017 08:48 AM
The ServiceNow Wiki content is no longer supported. Updated information about this topic is located here:
Outbound REST Web Service
Visit http://docs.servicenow.com for the latest product documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2016 12:06 PM
You can have onChange client script on state field and check if the new State is APPROVED, then call the script include from client side
in Script include, you can have script for your outbound REST web service
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2016 12:22 PM
Please allow me to ask a silly question. Where can i see such onChange code for my UI?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2016 12:32 PM
I did not understand what do you mean by "onChange code for my UI?"
But you can find client scripts under 'System Definition' and filter the Type as onChange, you can see lot of example scripts