1) What is Change Data Capture (CDC)?
Change Data Capture is a streaming product in Salesforce that enables real-time integration with external systems. It notifies subscribed systems of data changes like record creation, updates, deletions, and undeletions, helping keep external systems in sync without periodic data exports or repeated API calls.CDC is available for all custom objects and a subset of standard objects. Each object has an associated ChangeEvent object, named
<ObjectName>ChangeEvent
for standard objects and <ObjectName>__ChangeEvent
for custom objects.No, ChangeEvent objects don’t support CRUD operations or queries. They are used to capture and publish changes but cannot be directly manipulated.
CDC respects field-level security, delivering only the fields a user has access to. However, it ignores record-level sharing settings and doesn’t include derived fields (e.g., formula fields) except for roll-up summary fields.
Excluded fields include:
- IsDeleted
- SystemModStamp
- Formulae Fields (except roll-up summary fields).
6) What are the steps to enable Change Data Capture?
- Navigate to Setup > Change Data Capture in Salesforce.
- Select the desired custom and standard objects from the Available Entities list.
- You can enable up to five entities by default. For more, purchase an add-on license.
- Save the settings.
7) Provide an example of subscribing to CDC events using the Workbench.
- Open Workbench > Queries > Streaming Push Topics.
- Click Generic Subscriptions and enter
/Data/AccountChangeEvent
. - Click Subscribe to establish the connection.
Updates to the Account record will trigger notifications visible in the Workbench.
8) What happens if you need different subscribers to receive specific event types?
Use custom channels to group and isolate change events for different subscribers. This ensures that each subscriber receives only the events they need.
9) What are the licensing constraints for CDC?
- Default: Up to 5 entities.
- Add-on license: Select up to 10 entities per channel and increase delivery allocations. After selecting the first 10 entities, you can add more.
No comments:
Post a Comment