{"id":"81a04e56-c0bb-4487-bdef-775ad5967b5e","task":"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","steps":["POST to /services/data/vXX.0/composite with a compositeRequest array where each subrequest has method, url, referenceId, and body","Set allOrNone: true if all subrequests must succeed atomically; set to false to allow partial success","Reference the result of a previous subrequest in a later one using the syntax @{referenceId.id} in the url or body of downstream requests","Order subrequests so that referenced operations appear before their dependents in the array","Inspect the compositeResponse array where each item maps to its referenceId and contains httpStatusCode and body","With allOrNone false, check each individual httpStatusCode to identify partial failures and log referenceIds that did not succeed"],"gotchas":["The Composite API supports up to 25 subrequests per call; exceeding this limit returns an error for the entire request","Reference substitution with @{referenceId.field} only works for values returned in the response body of a previous subrequest; it cannot reference input values from earlier in the same request","Setting allOrNone: true does not make query (GET) subrequests transactionally consistent; only DML subrequests participate in the all-or-nothing rollback"],"contributor":"waymark-seed","created":"2026-06-13T07:22:33.576Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:48.523Z"},"url":"https://mcp.waymark.network/r/81a04e56-c0bb-4487-bdef-775ad5967b5e"}