News

MuleSoft Bulk API v2.0 Connector Support with the Salesforce

Blue and green data points moving in curves.

One of the main use cases with Salesforce that MuleSoft customers use involves uploading records that are stored in CSV format to Salesforce. MuleSoft has provided various ways to fulfill this use case. We have dataloader.io, the most popular Data Loader for Salesforce on Salesforce AppExchange, and also have Anypoint Platform’s Salesforce Connector with various operations.
We added another option to help you easily accomplish the above use case.
Mulesoft Bulk API v2.0 is available in API version 41.0 and later. Compared to Bulk API v1.0, Salesforce has dramatically simplified the pre-processing step of Bulk API. In this blog, we will walk you through how to bulk upload your contact records in CSV format to Salesforce through Bulk API v2.0.

  • Bulk API 2.0 provides a simple interface to quickly load large amounts of data into your Salesforce org and to perform bulk queries on your org data.
  • Bulk API 2.0 simplifies uploading large amounts of data by automatically breaking the data into batches. All you have to do is upload a CSV file with your record data.
  • We can process 100 million records per 24-hour period.
  • Salesforce creates a separate batch for every 10,000 records in your job data internally.
  • Salesforce Connector Creates a Bulk API V2 operation that is used to insert, update, delete or upsert the data.

Prerequisites:

  • Installing salesforce connector(by login into any point exchange from the studio, you can install the salesforce connector)
  • Salesforce developer account
  • Security token
  • Consumer key and secret(If you are using the Salesforce connector to access an OAuth API, you also need a consumer key and secret)
  • The CSV file used to process data to salesforce should be in UTF 8 format and can not exceed 100 MB.
  • Create a project in anypoint studio and configure the listener to trigger the flow
  • Drag and drop create job bulk API v2 operation from mule palette

Bulkapi2.0

  • Configure the file read operation to read the CSV file

Bulkapi2.0

Configure the below parameters for Create job bulk api v2 operation:

  • ObjectType: type of the salesforce object
  • sObjects: An array of one or more array objects(payload)
  • Operation: operation to be invoked insert/update/delete/upsert
  • Line ending: line ending of csv file, LF or CRLF
  • Column delimiter: backquote (`), caret (^), comma, pipe (|), semicolon, and tab
  • External Id field name: it only required for upsert operation

Scr

  • Deploy the application and, trigger the flow, create the test data as a CSV file

Picture2

We can check the status of the batch job after login into Salesforce.

Picture3

 

In this way, MuleSoft Bulk API v2.0 simplifies uploading large amounts of data by automatically breaking the data into batches. We can process 100 million records per 24-hour period.

Perficient + MuleSoft 

At Perficient, we excel in tactical MuleSoft implementations by helping you address the full spectrum of challenges with lasting solutions rather than relying on band-aid fixes. The end result is intelligent, multifunctional assets that reduce costs over time and equip your organization to proactively prepare for future integration demands. 

We’re a Premier MuleSoft partner with more than 15 years of integration expertise across industries, including financial services, healthcare, retail, and more. After MuleSoft’s acquisition by Salesforce, our continued innovation in the integration space offers more customized experiences on software developed by MuleSoft. We combine the MuleSoft product suite with our connectivity expertise to provide comprehensive solutions both on-premises and in the cloud. 

Contact us today to learn how we can help you develop API-led connectivity and Integrate with other systems like salesforce using different connectors.

Thoughts on “MuleSoft Bulk API v2.0 Connector Support with the Salesforce”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Suraj Kohale, Associate Technical Consultant

Suraj Kohale is an Integration developer at Perficient form last two years. He completed his master's degree in computer applications and mainly works on MuleSoft. Suraj also explores other integration tools like the logic app, BizTalk, Boomi, and many others.

More from this Author

Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram