Salesforce · Arazzo Workflow

Salesforce Bulk Delete Records

Version 1.0.0

Run the full Bulk API 2.0 delete lifecycle — create a delete ingest job, upload a CSV of Ids, close, poll, and read successful results.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Fortune 500Artificial IntelligenceAnalyticsCloudCommerceCRMCustomer ServiceEnterpriseMarketingPlatformSalesArazzoWorkflows

Provider

salesforce

Workflows

bulk-delete-records
Bulk delete records from a Salesforce object via the Bulk API 2.0 ingest lifecycle.
Creates a delete ingest job, uploads a CSV of record Ids, closes the job, polls until JobComplete, and returns the successful results CSV.
5 steps inputs: csvData, lineEnding, object outputs: jobId, numberRecordsFailed, numberRecordsProcessed, state, successfulResults
1
createJob
Create a new Bulk API 2.0 ingest job configured for the delete operation against the target object. The job starts in the Open state.
2
uploadData
Upload the CSV of record Ids to the open ingest job. The header row must contain the single Id column.
3
closeJob
Close the ingest job by setting its state to UploadComplete, which tells Salesforce to begin processing the deletions.
4
pollJob
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.
5
getResults
Retrieve the CSV of successfully deleted records once the job has reached JobComplete.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Salesforce Bulk Delete Records
  summary: Run the full Bulk API 2.0 delete lifecycle — create a delete ingest job, upload a CSV of Ids, close, poll, and read successful results.
  description: >-
    The Bulk API 2.0 ingest lifecycle for soft-deleting many records at once.
    The workflow creates a delete ingest job for a target object, uploads a CSV
    whose single Id column lists the records to remove, closes the job to begin
    processing, polls the job state until it reaches JobComplete (branching to
    retry while InProgress and to fail if the job reports Failed or Aborted),
    and finally retrieves the CSV of successfully deleted records. Every step
    spells out its request inline so the flow can be read and executed without
    opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: ingestJobDataApi
  url: ../openapi/salesforce-ingest-job-data-api-openapi.yml
  type: openapi
- name: ingestJobsApi
  url: ../openapi/salesforce-ingest-jobs-api-openapi.yml
  type: openapi
workflows:
- workflowId: bulk-delete-records
  summary: Bulk delete records from a Salesforce object via the Bulk API 2.0 ingest lifecycle.
  description: >-
    Creates a delete ingest job, uploads a CSV of record Ids, closes the job,
    polls until JobComplete, and returns the successful results CSV.
  inputs:
    type: object
    required:
    - object
    - csvData
    properties:
      object:
        type: string
        description: The API name of the SObject to delete records from (e.g. Account).
      csvData:
        type: string
        description: >-
          CSV payload whose header is a single Id column followed by one record
          Id per row to soft-delete.
      lineEnding:
        type: string
        description: Line ending used in the CSV data (LF or CRLF). Defaults to LF.
  steps:
  - stepId: createJob
    description: >-
      Create a new Bulk API 2.0 ingest job configured for the delete operation
      against the target object. The job starts in the Open state.
    operationId: createIngestJob
    requestBody:
      contentType: application/json
      payload:
        operation: delete
        object: $inputs.object
        contentType: CSV
        lineEnding: $inputs.lineEnding
        columnDelimiter: COMMA
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      jobId: $response.body#/id
      state: $response.body#/state
  - stepId: uploadData
    description: >-
      Upload the CSV of record Ids to the open ingest job. The header row must
      contain the single Id column.
    operationId: uploadJobData
    parameters:
    - name: jobId
      in: path
      value: $steps.createJob.outputs.jobId
    requestBody:
      contentType: text/csv
      payload: $inputs.csvData
    successCriteria:
    - condition: $statusCode == 201
  - stepId: closeJob
    description: >-
      Close the ingest job by setting its state to UploadComplete, which tells
      Salesforce to begin processing the deletions.
    operationId: updateIngestJob
    parameters:
    - name: jobId
      in: path
      value: $steps.createJob.outputs.jobId
    requestBody:
      contentType: application/json
      payload:
        state: UploadComplete
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      state: $response.body#/state
  - stepId: pollJob
    description: >-
      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.
    operationId: getIngestJobInfo
    parameters:
    - name: jobId
      in: path
      value: $steps.createJob.outputs.jobId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      state: $response.body#/state
      numberRecordsProcessed: $response.body#/numberRecordsProcessed
      numberRecordsFailed: $response.body#/numberRecordsFailed
    onSuccess:
    - name: jobComplete
      type: goto
      stepId: getResults
      criteria:
      - condition: $response.body#/state == "JobComplete"
    - name: stillProcessing
      type: goto
      stepId: pollJob
      criteria:
      - condition: $response.body#/state == "InProgress"
    onFailure:
    - name: jobFailed
      type: end
      criteria:
      - condition: $response.body#/state == "Failed"
  - stepId: getResults
    description: >-
      Retrieve the CSV of successfully deleted records once the job has reached
      JobComplete.
    operationId: getSuccessfulResults
    parameters:
    - name: jobId
      in: path
      value: $steps.createJob.outputs.jobId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      successfulResults: $response.body
  outputs:
    jobId: $steps.createJob.outputs.jobId
    state: $steps.pollJob.outputs.state
    numberRecordsProcessed: $steps.pollJob.outputs.numberRecordsProcessed
    numberRecordsFailed: $steps.pollJob.outputs.numberRecordsFailed
    successfulResults: $steps.getResults.outputs.successfulResults

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/salesforce-bulk-delete-records-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.