Platform Events vs Change Data Capture

When to use Platform Events vs CDC for event-driven architecture in Salesforce.

TL;DR

Platform Events = custom business events you define. CDC = automatic notifications when records change. Use PE for cross-system orchestration, CDC for data sync and audit trails.

The Quick Answer

AspectPlatform EventsChange Data Capture
What triggers itYour code publishes explicitlyAny record DML (create/update/delete/undelete)
SchemaYou define the fieldsMirrors the object’s fields automatically
Replay72-hour retention, replay by replayId72-hour retention, replay by replayId
SubscribersApex triggers, Flows, external via Pub/Sub APIApex triggers, Flows, external via Pub/Sub API
Governor limitsCounts against DML limits when publishingNo DML cost — fires automatically
Order of executionAfter commit (async)After commit (async)
Use case fitBusiness events, cross-system signalsData replication, audit, keeping systems in sync

When to Use Platform Events

  • Custom business events that don’t map 1:1 to a record change — e.g., “Order Approved”, “Threshold Breached”, “Integration Completed”
  • Cross-system orchestration — signaling external systems that something happened
  • Decoupling — publisher doesn’t need to know who subscribes
  • Fire-and-forget patterns — publish and move on

When to Use Change Data Capture

  • Data sync — keeping an external system’s copy of Salesforce data current
  • Audit trail — capturing every field change without custom code
  • Near real-time replication — streaming changes to a data warehouse or lake
  • You want automatic coverage — no code needed to publish, just enable the object

Architect’s Take

Most architects default to Platform Events because they feel more “controlled.” But CDC is underrated for integration scenarios. If your use case is “keep System B updated when records change in Salesforce,” CDC gives you that for free — no Apex triggers, no workflow rules, no forgetting to publish an event.

The trap: don’t use CDC when you need custom business semantics. “Order Approved” is not a record change — it’s a business event that might span multiple record updates. That’s Platform Events territory.

Decision guide: Event-Driven Architecture on architect.salesforce.com covers this in depth with decision trees.

Licensing & Cost

Both PE and CDC draw from the same event delivery allocation — this is the number that catches architects off guard.

EditionStandard Daily Event Allocation
Enterprise100,000
Unlimited / Performance200,000
  • Platform Events: Standard allocation covers most use cases. At high volume, the high-volume Platform Event add-on is a separate purchase — budget for it before you build.
  • CDC: No separate license, but every change event counts against the same allocation. Enabling CDC on a high-churn object (e.g., Task with 50K updates/day) can silently exhaust the pool.
  • Pub/Sub API: No additional license. Included with PE/CDC.

Check usage: Setup → Platform Event Usage Metrics.

For the full picture on how licensing shapes architecture decisions, see How Licensing Shapes Architecture.

Related