- SalesforceChaCha
- Posts
- π De-mystifying Change Data Capture (CDC) πΊ
π De-mystifying Change Data Capture (CDC) πΊ
CDC βοΈ OMG π WTF π€ LOL π
Good morning, Salesforce Nerds! We here at π ChaCha πΊ love event driven architectures π
They make it possible to build flexible connections between systems, support processes that span these systems and provide near real-time data updates! π₯
While the benefits are clear β¦ the implementation is not. π
So, today we want to shed some light on on the subject and uncover a bit about a powerful tool in your Salesforce toolbox! π§° '
Letβs check out Change Data Capture (CDC)! π

Agenda for today includes
De-mystifying Change Data Capture (CDC)
Daily Principle
All the Memes
De-mystifying Change Data Capture (CDC)
π€ What is it?
CDC is an integration pattern used by many platforms (not just Salesforce) to track when/what changes happen to data and then alert π¬οΈ other systems of the changes. Those system can then react as necessary. In near real-time! π―
Think of it this way, suppose we set up CDC on the Account object. Anytime a change occurs on an Account record, Salesforce βοΈ will create a CDC event that has all the details regarding the change and places the event onto the Event Bus for any subscribing systems to ingest.
All you need to do is hook up the subscribers. π This can be any CometD enabled app, a Pub/Sub API, an Apex Trigger, or an LWC!
π€ How does it work?
Itβs magic. πͺ
Nah, itβs not, really. But weβll avoid the technical deep-dive here. You can find it here if you want to check it out. π€
Itβs SUPER π¦Έ easy to config in Salesforce. You just move objects around in a dual picklist to enable/disable. π
By enable CDC on an object, the platform will natively generate CDC events. Nothing else is required on the Salesforce side. The work now lies with the subscribing system. π
π€ When should I use it?
This is best suited for data replication. π A situation where you have data in two separate places that you need to keep in sync.
As outlined in the dev guide, data replication includes 3 stages:
Initial copy of entire data set to external system β
Continuous synchronization of new/updated data to external system β
Reconciliation of duplicated data between both systems β
CDC is the solution for step 2 - the continuous synchronization of data. π₯
βοΈ Things to know:
As with most SaaS feature, there are limitations. β οΈ Be sure to check out the General Considerations to understand when a CDC event isnβt generated or how multiple changes for the same record are handled. π
Then cruise over the allocations page. This is where youβll see the limits associated to CDC. How many objects you can choose, how many channels you can have and how many event notifications can be delivered. ποΈ
Daily Principle
"Whatever can happen at any time can happen today."
and now....Your Daily Memes



What did you think about today's newsletter? |