Salesforce API Guide: Choosing REST, Bulk v2, or Change Data Capture

Ampersand Blog Writings from the founding team

Salesforce
5 min read
Jul 10, 2025
Article cover image

Salesforce API Guide: Choosing REST, Bulk v2, or Change Data Capture

A developer’s guide to matching API rails with real-time workloads

Ayan Barua's profile picture

Ayan Barua

CEO

TL; DR

Salesforce offers three main APIs: REST for instant CRUD, Bulk v2 for large backfills, and Streaming/CDC for near-instant event notifications. Each fits a different traffic pattern. Picking the wrong one can waste quota, delay updates, or miss events entirely. With Ampersand, you don't have to worry about which API is right for you. Now, developers can focus on building, not babysitting integrations.

Integrations in the agentic age

As AI agents drive more interactions with Salesforce, the performance of your integration depends on more than just endpoint coverage. It hinges on choosing the right API rail for each job. REST, Bulk v2, and CDC were built for different workflows, and mixing them up can lead to silent failures, quota overruns, or hours of backlogged retries.

When users click save or copilots sync records mid-meeting, your system needs to make the right call in milliseconds. Building a realtime bidirectional integration with Salesforce is hard, Ampersand now makes it a breeze.

Read more about Salesforce under scale in the age of AI →

REST: Instant CRUD with tight quota ceilings

Salesforce’s REST API is the default choice for most teams. It handles synchronous operations well and delivers quick feedback. It is ideal when a user updates a record and expects to see the change immediately.

But REST comes with strict limits. Onboarding 10,000 records with unbatched REST calls can consume a significant portion of your daily quota, especially in orgs with lower ceilings or competing jobs. It also hits bottlenecks quickly under load.

Common failure modes for REST APIs:

Bulk v2: Built for volume, not speed

Bulk v2 is optimized for high-throughput operations. It accepts files up to 150 MB, slices them into 10,000-record batches, and processes them asynchronously. This rail is ideal for large backfills, periodic usage syncs, or ETL jobs. But the async nature introduces lag, and monitoring is more complex than with REST.

Common gotchas for Bulk v2:

  • Job size limits of 150 MB compressed
  • Partial failures logged silently; always review job results
  • Retries require smart deduplication logic to avoid creating duplicates

When Bulk v2 jobs fail, the errors often go unnoticed because the job can complete with a “Success” status even if thousands of records fail silently. Without careful monitoring and deduplication logic, retries can easily insert duplicates or leave data gaps.

CDC: Real-time updates without polling

Change Data Capture (CDC) is Salesforce’s event-driven API. It sends updates within seconds of a record change and does not consume traditional API limits. This makes it a strong fit for workflows driven by AI agents or product logic that must respond in real time. Unlike REST or Bulk, CDC works by subscription. You connect to channels like /data/OpportunityChangeEvent and receive compact payloads on every update.

Key risks for CDC APIs:

  • CDC events are only retained for 72 hours
  • Replay IDs must be persisted in durable storage
  • Gaps in CDC delivery must be recovered using REST queries

Matching APIs to your integration patterns

Use CaseBest APIReason
User clicks “Save” to update a recordRESTProvides synchronous, low-latency feedback suitable for interactive actions
Nightly updates of all Leads in SalesforceBulk v2Handles high volume asynchronously without burning through REST quota
Real-time updates for AI agentsCDCDelivers event-driven updates within seconds, without polling or quota cost

Each API works well for the scenario it was built for. Problems appear when engineers try to force a one-size-fits-all solution.

Ampersand monitors job type, quota headroom, and latency sensitivity to choose the right rail automatically, saving developers time and eliminating the need for custom routing logic. Learn more in our documentation →

Ampersand automates rail selection

Manually managing API rail decisions across environments is brittle and error-prone. Ampersand eliminates that burden by selecting the correct rail for each integration job and analyzing:

For example: If quota falls below safe thresholds, Ampersand can be set to throttle or reschedule non-critical jobs.

This happens without redeploys, manual rewrites, or emergency triage. Ampersand monitors job type, quota headroom, and latency sensitivity to choose the right rail automatically. This saves developers time and eliminates the need for custom routing logic.

Take-aways & next steps

Salesforce’s APIs were not built with AI agents in mind. They assume batch workflows and occasional updates. Today’s integrations demand faster reactions, higher concurrency, and smarter decisions.

Ampersand is a smart integration layer that uses the right API for the job. That means fewer quota overruns, better user experience, and less time spent fixing broken syncs.

Build your product logic. Let Ampersand handle the APIs.

Explore more in the docs →

Fix quota overruns, reduce latency, and ship faster with Ampersand.

Recommended reads

View all articles
Loading...
Loading...
Loading...