Loading

How to Use Salesforce Connector with Bulk API v1 to Process Records in Jobs and Batches

Publish Date: Jul 29, 2025
Task

Use Salesforce Connector with Bulk API v1 to process records in jobs and batches

Steps

1. Create a job

Salesforce Conncetor operation: https://docs.mulesoft.com/salesforce-connector/latest/salesforce-connector-reference#createJob

Bulk API: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_quickstart_create_job.htm

2. Add a Batch to the Job

Salesforce Conncetor operation: https://docs.mulesoft.com/salesforce-connector/latest/salesforce-connector-reference#createBatch

Bulk API: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_quickstart_add_batch.htm

3. Check Batch Status

Salesforce Conncetor operation: https://docs.mulesoft.com/salesforce-connector/latest/salesforce-connector-reference#batchInfo

Bulk API: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_quickstart_check_status.htm

Interpret Batch State: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_batches_interpret_status.htm

4. Retrieve Batch Results

Salesforce Conncetor operation: https://docs.mulesoft.com/salesforce-connector/latest/salesforce-connector-reference#batchResult

Bulk API: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_quickstart_retrieve_results.htm

5. Based on the error messages for the failed records, fix the records if necessary and repeat steps 2 - 4 to submit the failed records again for processing.

6. Close the job

Salesforce Conncetor operation: https://docs.mulesoft.com/salesforce-connector/latest/salesforce-connector-reference#closeJob

Bulk API: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_quickstart_close_job.htm

 

Disclaimer: This solution provides a suggestion that should be considered in conjunction with your specific use case and requirements and does not represent a complete solution for all circumstances.

This article involves products and technologies which do not form part of the MuleSoft product set. Technical assistance for such products is limited to this article.

Knowledge Article Number

005105139

 
Loading
Salesforce Help | Article