Salesforce Bulk API Limits

In this article, we will explore the capabilities of the Salesforce Bulk API and how it can optimize your backups when using OwnBackup Recover. We will also discuss the new Bulk API 2.0 and how it can further enhance your backup process.

Backup flexibility is crucial for every Salesforce user, and the Bulk API offers a powerful solution. By utilizing Bulk APIs instead of REST APIs, you can significantly reduce backup run times, particularly when dealing with large objects or tables with a substantial number of records.

With OwnBackup, you have the option to enable the use of Bulk APIs by default. However, the recently introduced Bulk API 2.0 takes this functionality to the next level. It allows you to define the number of Bulk API batches per day and the total size of query results for each backup service, optimizing your backups and reducing run times. This enhancement also helps in optimizing Bulk API consumption within Salesforce.

What is Bulk API 2.0?

Bulk API 2.0 is specifically designed to handle large sets of data, whether it involves querying, inserting, updating, or deleting records. Any data operation involving more than 2,000 records is an ideal candidate for Bulk API 2.0, as it can efficiently manage Salesforce workflows.

The Differences between Bulk API and Bulk API 2.0

The main distinction between Bulk API and Bulk API 2.0 lies in the limit mechanisms they employ. The older Bulk API limits the number of records per batch and the number of batches per day. In contrast, Bulk API 2.0 sets limits based on the maximum size of query results per backup, making it particularly beneficial for optimizing API consumption when dealing with large objects or tables.

See also  Playwright API Testing: POST Example

Backup for Salesforce using Bulk API 2.0

Starting from API version 41.0, Bulk API 2.0 offers a new and improved way of querying data similar to Bulk API. The key difference is the daily limits. Bulk API 2.0 limits the maximum number of records to 100 million per 24-hour period, rather than restricting the number of Bulk Jobs and Batches. Both Bulk API and Bulk API 2.0 utilize the same REST API framework as other Salesforce REST APIs.

For customers who might exceed the Bulk API consumption limit or need to expedite backups of large data sets with large tables, OwnBackup highly recommends using the new Bulk API 2.0 feature. It provides greater flexibility and efficiency in managing your backups. You can find more information on Backup for Salesforce using Bulk API 2.0 here.

When configuring API Consumption limits in the Options page, take into account the specific characteristics of your organization’s data. Some orgs may have numerous records that are not necessarily large, while others may have a moderate number of records that are data-heavy. By utilizing both Bulk API 2.0 and the older Bulk API simultaneously, you can optimize the usage of consumed APIs.

For example, if a data set contains 15 million records, and each batch is defined to contain up to 10,000 records, it would consume 1500 batches (i.e., API queries) per day using Bulk API. In this case, if the batch limit is set to 15,000 per day, the table in question would use up 10% (1500 batches) of the entire day’s limit. This is where Bulk API 2.0 comes into play. By utilizing this method, query jobs no longer need to consume 1500 batches. Each job corresponds to one table, meaning the 15 million account records would only consume a single job from the daily limit of 10,000 jobs. This approach minimizes the waste of Bulk API calls, allowing you to save them for other jobs that handle a large number of records in a single table.

See also  The Ultimate Alchemy NFT API Alternative: Introducing ProgramMatek

For more information on managing API limits, refer to Recover for Salesforce Managing API Limits.

So, make the most of the Salesforce Bulk API and Bulk API 2.0 to optimize your backups and efficiently manage your data. Backup with confidence using OwnBackup Recover.