How to retry if transaction get cancelled for inbound integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 04:53 AM - edited 05-28-2025 04:55 AM
In an inbound integration scenario, if a transaction is interrupted mid-execution—due to instance slowness or other issues—the script may not complete successfully. As a result, although the record is created in ServiceNow, the response is not sent back to the third-party system, preventing the corresponding record from being created/updated there.And 3rd party cant try 2nd time as its having unique value. How can we implement a retry mechanism to re-execute the script and ensure the response is captured and stored in a custom table for future reference or reprocessing?
Here is my code sample of Scripted rest api resource
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 07:58 AM
Hi@Ankur Bawiskar can you please help with this post?
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 09:05 AM
since the API is consumed by 3rd party why should ServiceNow have retry mechanism
3rd party should handle this and if they send same info again, within ServiceNow you can check and if already record present then don't create it and send response to 3rd party that earlier request was success
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 11:15 PM
Okay. But I want to store the response in a custom table for future tracking purposes, but due to a transaction issue, the data isn't being inserted into the table. How can I resolve this?
Stay awesome,
Roshnee Dash