πŸ’ƒ 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."

Seneca

and now....Your Daily Memes

What did you think about today's newsletter?

Login or Subscribe to participate in polls.