What is Change Data Capture (CDC) and how does it differ from Platform Events?
Suggested answer
Change Data Capture (CDC) automatically publishes change events when Salesforce records are created, updated, deleted, or undelete — no custom code needed. CDC events contain: the changed fields and their new values, the ChangeEventHeader (operation type, record IDs, entity name, changed fields list), and gap events (indicating missed events due to subscriber downtime). Differences from Platform Events:
1. CDC is automatically generated from record changes; Platform Events require explicit publishing.
2. CDC captures the actual changed data; Platform Events carry custom payloads.
3. CDC is primarily for integration/replication use cases; Platform Events are for general event-driven architectures. CDC events are available for standard objects (enable in Setup) and custom objects. Replay ID and 72-hour retention apply to CDC as well.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.