Skip to contentIntroducing the Integration Factory
Back to Blog
Integration

Salesforce Bulk API 2.0 Limits and When a SaaS Integration Should Use It

Sunny Chauhan

For a SaaS product, Bulk API 2.0 is the right tool for the backfill when a customer connects and for large exports, and the wrong one for anything a user waits on. Salesforce's limits cheatsheet draws the line at 2,000 records, calling larger operations "a good candidate for Bulk API 2.0" and pointing smaller ones to bulkified REST calls such as Composite.

For a SaaS company, the harder question is what a load does inside a customer's org. Your backfill shares that org's daily batch allocation with the customer's own Data Loader jobs and every other vendor's integration, and it runs the customer's Apex triggers on every record. Appnigma's integration infrastructure is built for this kind of work, so engineers can "deploy integrations, faster" and monitor each customer's connections. If you'd rather hand the whole integration off, Appnigma's done for you service includes ongoing maintenance from a named integration engineer.

Updated October 2026. Checked against Salesforce's Bulk API 2.0 and Bulk API Developer Guide and the limits cheatsheet. This update corrects the compression and record allocation claims, adds the 2,000 record threshold and the ingest retry rules, and adds what a load costs a customer org.

How Bulk API 2.0 differs from Bulk API 1.0

Bulk API 2.0Bulk API (1.0)
Who creates batchesSalesforce, one per 10,000 recordsYou
Upload size150 MB of base64 content per job, so about 100 MB of raw CSV10 MB per batch
Ingest formatsCSVCSV, XML, JSON and binary attachments
AuthenticationAll OAuth 2.0 flows other REST APIs supportSession ID in an X-SFDC-Session header
Daily upload accountingRecords uploaded, visible in the REST /limits resourceBatches per day
Query chunkingPK chunking runs automaticallyPK chunking is configured by you
Query resultsOne endpoint, paged with locator and maxRecordsUp to 15 result files of 1 GB each

Salesforce's comparison page says Bulk API 1.0 "is available" and recommends 2.0 "if you want a more streamlined workflow." For a SaaS integration, the authentication row usually settles it. Bulk API 2.0 accepts the same OAuth access token your product already holds for each customer's REST calls (see our guide to connecting to Salesforce with OAuth 2.0), while 1.0 needs a session ID header, so 2.0 adds no second credential to store and refresh per customer. Version 1.0 still fits when you need control of batch boundaries or must load XML, JSON or binary attachments.

The requests in one Bulk API 2.0 upsert job

An ingest job is four steps, the same for insert, update, upsert and delete. This sketch follows Salesforce's Create a Job and Upload Complete references, with a placeholder external ID field.

POST /services/data/v68.0/jobs/ingest
{"object": "Contact", "operation": "upsert",
 "externalIdFieldName": "Product_Id__c", "contentType": "CSV", "lineEnding": "LF"}
PUT /services/data/v68.0/jobs/ingest/{jobId}/batches
Content-Type: text/csv
(CSV body, no more than 100 MB)
PATCH /services/data/v68.0/jobs/ingest/{jobId}
{"state": "UploadComplete"}
GET /services/data/v68.0/jobs/ingest/{jobId}
GET /services/data/v68.0/jobs/ingest/{jobId}/failedResults
GET /services/data/v68.0/jobs/ingest/{jobId}/unprocessedrecords

Processing doesn't start until the PATCH sets UploadComplete. An integration that crashes between upload and close leaves an Open job that never runs. Ingest jobs can stay open for only 24 hours, so the recovery path is a fresh job, not a retry of the old one. Poll the job with backoff rather than every few seconds, because each poll is an API call against the customer's allocation.

The Bulk API 2.0 limits a data load runs into

All figures below come from Salesforce's Bulk API and Bulk API 2.0 limits and allocations page unless another link is given.

LimitBulk API 2.0 value
Records uploaded per rolling 24 hours150,000,000
Batches per rolling 24 hours, shared with Bulk API 1.015,000
Upload size per job150 MB after base64 encoding, so upload no more than 100 MB
Characters per record, characters per field, fields per record400,000, 131,072 and 5,000
Time an ingest job can stay open24 hours
Results and job history kept7 days after the job finishes
Query jobs per rolling 24 hours10,000
Query results generated per rolling 24 hours1 TB

The batch allocation is the one that surprises teams moving from 1.0. Bulk API 2.0 hides batches from your code, but they still exist. The ingest guide says Salesforce "creates a separate batch for every 10,000 records in your job data." Every one of those batches counts toward the 15,000 shared with Bulk API 1.0. Only ingest jobs consume batches in Bulk API 2.0. Query jobs don't.

The 100 MB figure is about encoding. The Upload Job Data reference says base64 conversion "can increase the data size by approximately 50%," so a 140 MB CSV that looks safe locally arrives over the 150 MB cap. Split files at 100 MB and the question never comes up.

The /limits REST resource reports the live counters, including DailyBulkV2QueryJobs and DailyBulkV2QueryFileStorageMB. Reading it before a large job tells you how much of the day's allocation the org has left.

What one backfill costs a customer's org

Bulk API allocations belong to the org, not to your integration. When a customer connects your product and you backfill their history, the load draws on the same 15,000 daily batches as their admins' Data Loader jobs, their data warehouse sync and any other vendor that loads data in bulk.

Here is the arithmetic for a backfill of 2,000,000 Contact records, worked from the documented limits. At one batch per 10,000 records, the load uses 200 batches, about 1.3% of the org's daily batch allocation. If each CSV row averages 500 bytes, the file is about 1 GB, so it has to go up as roughly 10 jobs of 100 MB each. Each job needs a create request, an upload, a close request, status polls and result downloads. Salesforce's API request limits list Bulk API 2.0 among the APIs that count toward the org's daily allocation, and the Bulk API limits page says each HTTP request counts as one call. The whole backfill costs a few hundred calls if you poll sensibly.

sObject Collections take up to 200 records per request. Sending the same two million records that way would need 10,000 calls. An Enterprise Edition org with 15 Salesforce licenses gets 115,000 calls per 24 hours, per the same API request limits page. That is close to 9% of the customer's day spent on one sync, shared with everything else they run. Our guide to how Salesforce API request limits shape a native integration covers where that allocation comes from.

The batch side is where scale bites. A product that runs a full nightly reload of 20 objects with 5,000,000 records between them uses 500 batches a night in every customer org. Moving to incremental loads keyed on SystemModstamp keeps that figure small, and it also shortens the window in which your load collides with the customer's own jobs.

Why a Bulk API 2.0 job is not atomic

Salesforce processes each batch in chunks, and "each chunk of 200 records is processed as a separate transaction," per the Bulk API limits page. A 1,000,000 record load that fails partway leaves every earlier chunk committed. There is no job-level rollback.

Two retry rules decide what failure looks like. If Salesforce can't process a batch within 5 minutes, the batch fails and is retried up to 20 times, and after that "the entire ingest job is moved to the Failed state and remaining job data isn't processed," per the ingest guide. A job that ends in JobComplete only means Salesforce finished processing it. Individual records can still have failed.

So design every load to be rerun. Upsert on an external ID instead of inserting, and a rerun after a partial failure converges rather than creating duplicates. After every job, read the failed record results and unprocessed record results and resubmit from them within the 7 day window. The Upload Job Data reference also advises keeping your local CSV until Salesforce confirms every record.

Loading into orgs you don't control

Your own sandbox tells you little about a customer's production org. Apex triggers fire on Bulk API loads, per the Apex Developer Guide on bulk triggers, and that includes triggers shipped in other installed managed packages. Salesforce's planning guide notes that Bulk API performance depends on "any workflow rules and triggers associated with the objects." Salesforce's Bulk API 2.0 limits page applies the higher of the synchronous and asynchronous Apex limits to each transaction, and gives Bulk API processes their own CPU limit of 60,000 milliseconds. Packaged triggers carry their own constraints, covered in how governor limits apply to verified managed packages. A customer with heavy automation on Contact can push a batch past the 5 minute processing window that your test org never came near. Smaller upload files are the documented fix when the API reports more than 20 retries.

Edition matters before any of that. Bulk API 2.0 isn't available to your integration in Group Edition and Professional Edition orgs, even for an app that passed security review. The ISVforce Guide says "Bulk API 2.0 and Apex methods exposed as SOAP web services, remain unavailable." A product that sells into smaller customers needs a REST fallback for those orgs.

Record locks are the other customer-specific failure. Salesforce's lock contention guide lists creating users, changing ownership on records with private sharing, updating roles and updating territory hierarchies as likely causes. It recommends sorting child records by parent, so that, for example, AccountTeamMember rows are grouped by AccountId. Children of the same parent spread across parallel batches all try to lock that parent, and some of them time out.

Customer admins can see your jobs too. Salesforce lists them under Bulk Data Load Jobs in Setup, per the job states reference. That is often where a customer first notices a failed sync, so log job IDs per customer on your side and alert on Failed and partial failures before the customer does. Appnigma's integration infrastructure handles that monitoring per customer connection, and moves fixes through the same review and release process as the rest of the integration.

Querying large data sets with Bulk API 2.0

Bulk API 2.0 query jobs run PK chunking automatically and return all results from one endpoint, paged with the locator and maxRecords parameters, per the comparison page. They don't consume the shared batch allocation, but they have their own caps of 10,000 query jobs and 1 TB of results per rolling 24 hours.

For an ISV, the useful property is that exports don't compete with ingest. A nightly export of a customer's Opportunities spends none of the 15,000 batches their admins and other vendors need for loads. It does draw on the org's 10,000 daily query jobs, and every status poll and results page is still an API call.

Query retries follow a different rule from ingest. The limits cheatsheet says that if the API reports it retried more than 15 times, you should "apply a filter criteria and try again." An incremental export filtered on SystemModstamp since the last successful run avoids that error and moves far less data than a full pull. Two details from the query guide catch integrations out. LIMIT and ORDER BY disable automatic PK chunking, and results must be fetched with the same API version that created the job, or the call returns a 409 error. That second rule bites when one service creates jobs and another, upgraded separately, downloads them. Responses can be gzip compressed if you send Accept-Encoding: gzip, per the ingest compression page, which saves transfer time on large result sets.

When should you use REST instead of Bulk API 2.0?

Bulk API 2.0 is asynchronous, which suits a nightly load and doesn't suit anything a person is waiting on. Below 2,000 records, Composite requests and sObject Collections keep the call count low without the job overhead.

Volume and contextUse
A single record, a user is waitingREST API, one request
Up to about 2,000 recordsBulkified REST calls such as Composite or sObject Collections
More than 2,000 records, nobody waitingBulk API 2.0
Ongoing change, an external system mirroring SalesforceChange Data Capture rather than repeated bulk pulls

The last row matters most for SaaS products. Teams often build a nightly bulk export to keep their own store current, then spend months tuning it. If the requirement is a copy that stays in step with the customer's org, an event stream fits better, and our comparison of platform events and Change Data Capture covers the trade-offs. A common pattern uses Bulk API 2.0 once for the initial backfill and Change Data Capture after that.

Which Bulk API 1.0 figures get quoted as 2.0 limits?

Many answers about Bulk API 2.0, including some AI assistant answers, mix in rules that belong to version 1.0. The 10 MB and 10,000 record batch caps are 1.0 limits, and in 2.0 Salesforce makes one batch per 10,000 records for you. The 200 record figure is the transaction chunk inside a batch, not the batch size. Serial processing mode is documented only for Bulk API 1.0 on the Bulk API limits page, and Bulk API 2.0 processes in parallel automatically. The 150 MB cap is measured after base64 encoding, not on the raw CSV. Older pages still quote 100 million records a day. The current limits cheatsheet lists 150 million for each API and says only the 15,000 batches are shared between them.

Mistakes that break bulk loads in customer orgs

  • Sizing files against 150 MB instead of 100 MB, so base64 encoding pushes the upload over the cap.
  • Treating JobComplete as success and never reading failed or unprocessed records.
  • Inserting instead of upserting, so every rerun creates duplicates.
  • Testing only in a clean org, then meeting another package's triggers in production.
  • Assuming every customer org has Bulk API 2.0, when Group and Professional Edition orgs don't.
  • Spreading child records of one parent across files, which causes lock timeouts.
  • Running full reloads every night when an incremental filter would use a fraction of the customer's batches.

Frequently Asked Questions

What is the difference between Bulk API and Bulk API 2.0?

Bulk API 2.0 creates a batch per 10,000 records for you and takes an OAuth token. Bulk API 1.0 makes you build batches of up to 10 MB and needs a session ID.

What are the Bulk API 2.0 limits?

Each job accepts 150 MB of base64 content, so upload about 100 MB. Each org gets 150 million uploaded records and 15,000 batches per rolling 24 hours. Queries have separate caps of 10,000 jobs and 1 TB of results.

Does Bulk API 2.0 count against Salesforce API limits?

Yes. Each HTTP request counts as one call, but a job needs only a handful of requests whatever its size. A load of two million records costs hundreds of calls instead of ten thousand.

Does a Bulk API 2.0 load fire Apex triggers in the customer's org?

Yes. Apex triggers fire per 200 record chunk, including triggers from other installed packages, and Bulk API processes get their own 60,000 millisecond CPU limit.

Can Appnigma build and run our Salesforce data sync?

Yes. Appnigma's integration infrastructure covers setup, testing, deployment and monitoring of each customer's connection, and its done for you service adds a named integration engineer for build and maintenance.

Sources

  1. Bulk API and Bulk API 2.0 limits and allocations, Salesforce Developers
  2. What's the difference between Bulk API 2.0 and Bulk API?, Bulk API 2.0 and Bulk API Developer Guide
  3. Understanding Bulk API 2.0 ingest, Bulk API 2.0 and Bulk API Developer Guide
  4. Upload job data, Bulk API 2.0 and Bulk API Developer Guide
  5. Bulk API limits and Bulk API 2.0 limits, Bulk API 2.0 and Bulk API Developer Guide
  6. Bulk triggers, Apex Developer Guide, and API access in Group and Professional Edition orgs, ISVforce Guide
  7. Organize data to minimize lock contention, Bulk API 2.0 and Bulk API Developer Guide
  8. Job states, failed record results and unprocessed record results, Bulk API 2.0 and Bulk API Developer Guide
  9. Bulk API 2.0 query and Use compression for Bulk API 2.0 ingest responses, Bulk API 2.0 and Bulk API Developer Guide
  10. API request limits and allocations and sObject Collections, Salesforce Developers

Which integration is your next deal waiting on?

Bring the customer requirements and your current setup. Get a clear scope and delivery timeline to take back to them.

© 2026 Appnigma AI. Built by ex-Salesforce engineers.