Skip to content
Engineering7 min read

Salesforce Integration Patterns: REST, Platform Events and CDC Explained

A plain-English guide to the main Salesforce integration patterns — request-reply, fire-and-forget, batch and change data capture — and when to use each.

Most Salesforce projects eventually need to talk to another system — a billing platform, an ERP, a data warehouse. The hard part is rarely the code; it is choosing the right integration pattern. Pick wrong and you end up with brittle, slow, hard-to-debug connections. Here are the patterns that matter and when each fits.

Request and reply (synchronous)

Salesforce calls an external system and waits for the answer — for example, fetching a live shipping quote. Simple and immediate, but the user waits, and you are exposed to the other system being slow or down. Use it when you genuinely need the response right now, and always handle timeouts.

Fire and forget (asynchronous)

Salesforce sends data and moves on without waiting. Platform Events and outbound messaging fit here. It is resilient and decoupled — the receiving system can process at its own pace — which makes it the right default for most "let the other system know this happened" cases.

  • Platform Events for an event-driven, pub/sub style integration
  • Outbound messaging for simple, configuration-driven notifications
  • Queueable / future Apex for asynchronous callouts in code

Batch data sync

When you need to move large volumes on a schedule — a nightly sync with a data warehouse, say — use batch patterns rather than hammering APIs record by record. Bulk API and scheduled jobs keep you within governor limits and avoid melting either system.

Change Data Capture (CDC)

CDC publishes a stream of record changes that external systems can subscribe to. It is ideal when another system needs to stay in near-real-time sync with Salesforce data without constantly polling for changes. You get the freshness of events with far less load than repeated queries.

How to choose

  • Need the answer immediately? Request and reply — with timeouts
  • Just notifying another system? Fire and forget with Platform Events
  • Moving lots of data on a schedule? Batch with the Bulk API
  • Keeping an external system in sync? Change Data Capture

AgentExchange designs and builds Salesforce integrations using the right pattern for the job — with secure auth, error handling and monitoring built in. If you need Salesforce connected to the rest of your stack, email us to scope it.

#Integration#Apex#Engineering

Have a Salesforce project or question?

Tell us what you need — automation, custom LWC, integrations or an Agentforce build. We reply the same business day.