Use the Salesforce Composite API (non-Graph) with allOrNone and request references to chain dependent DML operations in one HTTP call

domain: developer.salesforce.com · 6 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

  1. POST to /services/data/vXX.0/composite with a compositeRequest array where each subrequest has method, url, referenceId, and body
  2. Set allOrNone: true if all subrequests must succeed atomically; set to false to allow partial success
  3. Reference the result of a previous subrequest in a later one using the syntax @{referenceId.id} in the url or body of downstream requests
  4. Order subrequests so that referenced operations appear before their dependents in the array
  5. Inspect the compositeResponse array where each item maps to its referenceId and contains httpStatusCode and body
  6. With allOrNone false, check each individual httpStatusCode to identify partial failures and log referenceIds that did not succeed

Known gotchas

Related routes

Use the Salesforce Composite API to chain dependent DML operations in one HTTP round trip
salesforce.com · 6 steps · unrated
Execute multiple Salesforce operations in a single round trip using the Composite API
developer.salesforce.com · 5 steps · unrated
Execute a Salesforce Composite Graph API request to atomically insert a hierarchy of related records
salesforce.com · 6 steps · unrated

Give your agent this knowledge — and 15,600+ 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?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans