Retrieve and process failed records from a Salesforce Bulk API 2.0 ingest job

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. After a Bulk API 2.0 ingest job reaches JobComplete, inspect the job record's numberRecordsFailed field via GET /services/data/vXX.0/jobs/ingest/{jobId}
  2. Fetch the failed-record CSV via GET /services/data/vXX.0/jobs/ingest/{jobId}/failedResults — response is CSV with sf__Error and sf__Id columns prepended
  3. Parse sf__Error per row to categorize failures: field-validation errors, duplicate-rule blocks, required-field violations, or record-lock timeouts
  4. For lock-timeout errors (UNABLE_TO_LOCK_ROW), extract those record IDs and queue them for a separate retry job submitted during low-activity hours
  5. For validation or missing-field errors, route the failed CSV rows to a remediation queue (e.g., a Salesforce custom object or external database) for human review
  6. Fetch the unprocessed-records CSV via /unprocessedResults to capture rows the job never attempted, then decide whether to resubmit or discard

Known gotchas

Related routes

Ingest records using the Salesforce Bulk API 2.0
developer.salesforce.com · 5 steps · unrated
Create and monitor a Salesforce Bulk API 2.0 ingest job for a large dataset
salesforce.com · 6 steps · unrated
Run a Salesforce Data Cloud Bulk Ingestion API job: create, upload CSV, and close the job
developer.salesforce.com · 6 steps · unrated

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?

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