Salesforce Certified Platform Data Architect Practice Questions

Salesforce Certified Platform Data Architect exam preparation

Salesforce Certified Platform Data Architect practice questions in English: 177 questions with explanations. The mock exam has 60 questions and 105 minutes.

Salesforce Certified Platform Data Architect free question 5 / 10 · Domain 3: Salesforce Data Management

You are designing an integration that creates accounts, contacts, and opportunities together from a back-office system with Composite. The integration developer reasons that if something fails an HTTP error status code will be returned and the call can simply be resent. Which statement matches "Composite Request Body" in the REST API Developer Guide (Spring '23)?

  1. The top-level request returns HTTP 200 whether allOrNone is true or false, so you must check the response of every subrequest to find failures
  2. If any subrequest fails, the top-level request returns HTTP 500 and the response body is empty
  3. With allOrNone true, any failure makes the top-level request return HTTP 400, so the status code tells you
  4. With allOrNone false, the top-level request returns HTTP 207 with a list of the subrequests that failed
Show the answer and explanation

Answer: A

Why this is correct
Composite Request Body describes allOrNone as the setting that controls what happens when an error occurs while processing a subrequest; if it is true, the entire Composite request is rolled back. It then says that in either case, the top-level request returns HTTP 200 and includes responses for each subrequest. Failures are therefore detected from each subrequest's response, not from the top-level status code.

Why the other options are wrong
"With allOrNone true, any failure makes the top-level request return HTTP 400, so the status code tells you" … The guide says that even when allOrNone is true and the whole request is rolled back, the top-level request returns HTTP 200 and includes a response for each subrequest. The status code does not reveal the failure.
"With allOrNone false, the top-level request returns HTTP 207 with a list of the subrequests that failed" … The guide says that in either case the top-level request returns HTTP 200 and includes responses for each subrequest. It does not mention HTTP 207.
"If any subrequest fails, the top-level request returns HTTP 500 and the response body is empty" … The guide says the top-level request returns HTTP 200 and includes responses for each subrequest. The details of a failure are read from the individual subrequest responses.

Where people trip
With requests that bundle several operations, success of the outer call and success of its contents are separate things. If you decide to resend from the status code alone, you can treat a rolled-back request as a success and carry on with data missing.

Go to the Salesforce Certified Platform Data Architect practice app (10 free questions; purchase unlocks all questions)

See the full practice set