Execute multiple Salesforce operations in a single round trip using the Composite API
domain: developer.salesforce.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
In-depth guide
Salesforce Bulk API 2.0 limits — the full failure-mode walkthrough related to developer.salesforce.com, checked against official docs, with linked verified routes.
Steps
POST to /services/data/vXX.0/composite with a JSON body containing a compositeRequest array
Each element in compositeRequest includes a method, url (relative), referenceId (unique string), and optionally a body
Reference the output of a prior subrequest in later subrequests using the @{referenceId.field} syntax
Set allOrNone to true if you want all subrequests rolled back when any single one fails
Parse the compositeResponse array in the response — each item has an httpStatusCode and a body
Known gotchas
A single composite request supports up to 25 subrequests; exceed this and the entire call is rejected
With allOrNone false, earlier successful subrequests are not rolled back even if a later one fails — handle partial success explicitly
Not all REST endpoints are supported as subrequests; query and tooling API calls have restrictions — check the documentation for the specific API version
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?