Async Business Rule Functionality
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
If a same Async Business Rule runs multiple times on a same record due to multiple updates at different times, can all the executions run at the same time in the queue.
We have a Integration that creates/updates records in the target system. we noticed sometimes the payloads are being sent at the exact same second, which results in duplicate records in target system.
We have two Async Business Rule(On Insert, On update), which are sending payloads out. I'm assuming Its either Both BR running at same time in the queue OR execution of multiple updates happening at the same time in queue from on update BR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Is there a unique key in the target which can be used to just update the record instead of creating two separate records?
Also you can also just use On update, which should take care of both insert and update. I would try to do just one BR if possible for the transaction.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
-> yes Async business rules are queued and no guarantee in their order of execution.
-> Multiple updates to the same record (e.g., through integrations or scripts) will put several async jobs in queue running at nearly the same second, creating overlapping executions.
-> May be add some custom field which tells that payload sent = true
-> try to use script action and event queue based approach and see if that helps
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader