Execute a Salesforce Composite Graph API request to atomically insert a hierarchy of related records

domain: 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 salesforce.com, checked against official docs, with linked verified routes.

Steps

  1. POST to /services/data/vXX.0/composite/graph with a body containing 'graphs': [{graphId, compositeRequest:[...]}]; a single call may include up to 500 sub-requests across multiple independent graphs.
  2. Each graph is processed atomically — a failure in any node rolls back only that graph, not others; use this when you have multiple independent hierarchies to insert in one call.
  3. Reference nodes within the same graph using @{referenceId.field} exactly as in the Composite API; cross-graph references are not supported.
  4. Choose graph boundaries intentionally: records in the same graph share a transaction, records in different graphs do not.
  5. Parse 'graphs' in the response; each graph element has 'graphId', 'isSuccessful', and 'graphResponse' containing per-node results.
  6. Test with a single-graph request first before scaling to multi-graph payloads to isolate failure modes.

Known gotchas

Related routes

Execute a Salesforce Composite Graph API request to insert a hierarchy of related records atomically
developer.salesforce.com · 6 steps · unrated
Insert a parent record with multiple related child records in one request using the Salesforce sObject Tree API
salesforce.com · 6 steps · unrated
Use the Salesforce sObject Tree API to insert a parent record and multiple child records in one request
developer.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