Allow REST API composite batch subrequests to be processed in one transaction - Ideas - Salesforce Trailblazer Community
Trailblazer Community

All Ideas

Idea Details

Post an Idea
This idea has been delivered and can no longer be voted or commented on. If you’d like to add to this conversation, please post a new idea.
60  Points voting closed
Delivered in Spring 17
Delivered in Spring 17

Allow REST API composite batch subrequests to be processed in one transaction


I have a small collection of records that I want to update in Salesforce via the REST API. Say a dozen OpportunityLineItem records.

If I use a composite batch request with 12 subrequests then I get 12 different transactions to make the changes to each OpportunityLineItem individually. This results in the triggers and workflows all executing independently for 12 isolated transactions. 12 times the before triggers, 12 times the SOQL queries, 12 times the workflows, ...

I need a way to update this small set of records within a single transaction so the triggers can work on the records in bulk.

The Bulk API isn't a good option here due to its asynchronous nature. The user is waiting for these records to be updated and I'd prefer to avoid polling for the bulk job to finish.

Creating a dedicated Apex REST API is an option, but I'd prefer not to have to maintain a method for each small collection of records that need to be updated.

The SOAP API isn't a great option as the rest of the application is using the REST API.

· Flag

  • Upvotes
  • Downvotes



from AppExchange


No results found.

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.