In our previous blogs, 'Working with Salesforce sObjects with Composite Connector Part 1' we looked at some common sObject type names in Apex used for standard objects, in 'Working with Salesforce sObjects with Composite Connector Part 2' we looked into Collections. In 'Working with Salesforce sObjects with Composite Connector Part 3' we focused on how to retrieve, update, upsert, and delete records. In 'Working with Salesforce sObjects with Composite Connector Part 4' we focused on Composite requests.
In this blog we will continue to look at working with MuleSoft Salesforce Integration of Salesforce sObjects with Composite Connector, this time focusing on Composite Batch.
- Executes up to 25 subrequests in a single request.
- The response bodies and HTTP statuses of the subrequests in the batch are returned in a single response body.
- Each subrequest counts against rate limits.
- Subrequests execute serially in their order in the request body
- Subrequests are independent, and you can’t pass information between them.
Batch Request Body
- Describes a collection of subrequests to execute with the Batch resource
Batch Collection Input
- The request body contains a batchRequests collection that includes subrequests to execute.
- haltOnError - Controls whether Salesforce should stop processing subrequests if a subrequest fails. The default is false. - Optional
- batchRequests - Collection of subrequests to execute. - Contains the resource, method, and accompanying information for the subrequest.
Batch Response Body
- Describes the result of a Batch request.
- Collection of subrequest results.
The Salesforce Composite Connector from MuleSoft can simplify your code and reduce the processing time by reducing the number of calls to SFDC as multiple records can be created and updated with a single request. Thus reduces network overhead and improves your app’s performance.