Salesforce Dictionary — Free Salesforce GlossarySalesforce Dictionary

Change Data Capture

Development🔴 Advanced

Definition

Change Data Capture (CDC) in Salesforce is a Streaming API feature that publishes real-time notifications when records in Salesforce are created, updated, deleted, or undeleted. External systems subscribe to change event channels to receive these notifications, enabling near-real-time data synchronization and event-driven architectures without polling the Salesforce API for changes.

Real-World Example

Consider a scenario where a developer at Quantum Labs is working with Change Data Capture to build a custom solution that extends the platform beyond its standard capabilities. They write clean, bulkified code for Change Data Capture, add comprehensive test coverage, and deploy it through a CI/CD pipeline. The new functionality handles 10,000 records without hitting governor limits.

Why Change Data Capture Matters

Change Data Capture (CDC) is a Streaming API feature that publishes change events in real time when records in Salesforce are created, updated, deleted, or undeleted. External systems subscribe to channels like /data/AccountChangeEvent or /data/ContactChangeEvent and receive a structured payload describing exactly what changed: which record, which fields, and what the new values are. This eliminates the need to poll the Salesforce API for changes, which is both slower and more API-intensive.

CDC is the foundation for event-driven integration architectures where external systems need to react to Salesforce changes within seconds rather than minutes. Common consumers include data warehouses (keeping their copy of Salesforce data fresh), search indexes, customer data platforms, and operational systems that need to react to business events. CDC events can also be subscribed to from within Apex via Change Event triggers, which lets Salesforce code react to changes asynchronously without re-running synchronous trigger logic.

How Organizations Use Change Data Capture

  • Quantum LabsUses CDC to keep an external data warehouse in sync with Salesforce in near real time. The warehouse subscribes to AccountChangeEvent and OpportunityChangeEvent and applies updates within seconds of records changing in Salesforce.
  • TerraForm TechSubscribes to CDC events from a Node.js service that updates Elasticsearch search indexes whenever Knowledge articles change. Search results stay current without periodic re-indexing.
  • CodeBridgeBuilt a Change Event trigger in Apex that fires when a Case is updated, processing the change asynchronously to update related records without affecting the original transaction's performance.

🧠 Test Your Knowledge

1. What does Change Data Capture publish?

2. What is a key benefit of CDC over API polling?

3. What are Change Event triggers in Apex?

See something that could be improved?

Suggest an Edit