Bulk Insert Records
A 5-step recipe with Salesforce. We can help you get access.
Recipe · 5 steps
Bulk Insert Records
with Salesforce
Bulk insert records into a Salesforce object via the Bulk API 2.0 ingest lifecycle.
- Create a new Bulk API 2.0 ingest job configured for the insert operation against the target object. The job starts in the Open state.
- Upload the CSV payload to the open ingest job. The first row must be a header of field API names matching the target object.
- Close the ingest job by setting its state to UploadComplete, which tells Salesforce to begin processing the uploaded data.
- Poll the ingest job state. When the job reaches JobComplete, continue to retrieve results; while still InProgress or UploadComplete, loop back to poll again; if the job Failed or Aborted, stop the workflow.
- Retrieve the CSV of successfully processed records once the job has reached JobComplete. Each row includes the added sf__Id column.
What you'll need to have ready
- object: The API name of the SObject to insert records into (e.g. Account).
- csvData: CSV payload with a header row of field API names and one record per subsequent row.
- lineEnding: Line ending used in the CSV data (LF or CRLF). Defaults to LF.
For your developer
Arazzo workflow salesforce:bulk-insert-records, 5 operations: createIngestJob → uploadJobData → updateIngestJob → getIngestJobInfo → getSuccessfulResults. Specs on APIs.io.