managing-cdc-enablement
Originally fromforcedotcom/sf-skills
Installation
SKILL.md
Managing Change Data Capture Enablement
Generate the metadata that subscribes Salesforce objects to Change Data Capture: PlatformEventChannelMember files for the default ChangeEvents channel or a custom channel, and PlatformEventChannel files for new custom channels. Covers enrichment fields, filter expressions, and the canonical naming and value formats that the Metadata API actually accepts (which differ from values that appear in many internal test fixtures and code-search hits).
Scope
- In scope: Generating
PlatformEventChannelMemberandPlatformEventChannelmetadata for CDC. Subscribing standard objects, custom objects, or both. Configuring enrichment fields. Configuring filter expressions. Defining custom data channels. - Out of scope: Publishing custom platform events (PE) — that's a different metadata type (
PlatformEvent). Pub/Sub API or external Kafka/Bayeux configuration. Pricing/limits guidance — refer the user to the CDC Developer Guide. Programmatic event-bus subscribers in Apex.
Clarifying Questions
Before generating, confirm with the user if not already clear:
- Which entity (or entities) need CDC enablement? Standard, custom, or both?
- Default channel (
ChangeEvents) or a custom channel? If custom, what's the channel label? - Any enrichment fields needed? (Lookup IDs that the consumer needs even when they didn't change.)
- Any filter expression needed? (A SOQL-WHERE-clause body that gates which change events emit.)