Loading...
Loading...
Use to enable Salesforce Change Data Capture (CDC) on a standard or custom object, configure a custom event channel, set a filter expression, or add enrichment fields. TRIGGER broadly on any of: 'enable CDC', 'enable Change Data Capture', 'turn on CDC', 'subscribe X to change events', 'only emit events for', 'filter change events', 'enrich change events', 'create a custom event channel'; or any mention of CDC, change events, PlatformEventChannel, PlatformEventChannelMember, EnrichedField, ChangeEvents channel, enrichment fields, change event filter; or when the user wants a downstream system to receive Salesforce data changes; or when the user touches .platformEventChannelMember-meta.xml / .platformEventChannel-meta.xml files. SKIP when publishing platform events, Pub/Sub API or REST/SOAP (use integration-connectivity-generate), or ManagedEventSubscription (out of scope for CDC). Always use this skill for CDC channel-membership metadata.
npx skill4agent add forcedotcom/sf-skills integration-eventing-cdc-configurePlatformEventChannelMemberChangeEventsPlatformEventChannelPlatformEventChannelMemberPlatformEventChannelPlatformEventChangeEventsAccountLeadOrder__cChangeEvents__chnStatus__c != nullChangeEventsPlatformEventChannelMemberPlatformEventChannel<ChangeDataCapture>.changeDataCapture-meta.xmlchangeDataCapture/EnableChangeDataCaptureManagedEventSubscriptionPlatformEventChannelMemberPlatformEventChannelChangeEvents<selectedEntity>| Source object | |
|---|---|
| |
| |
| |
| |
| |
ChangeEvent__c__ChangeEvent(entity, channel)ChangeEventselectedEntity__c| Source object | Filename (and fullName) | |
|---|---|---|
| | |
| | |
| | |
| | |
selectedEntityassets/PlatformEventChannelMember-template.xmlPlatformEventChannel__chn<eventChannel>Invalid channel name| User says | DeveloperName | Filename |
|---|---|---|
| | |
| | |
| | |
<eventChannel>PartnerSync__chn</eventChannel>assets/PlatformEventChannel-template.xml<enrichedFields><name>FIELD_API_NAME</name></enrichedFields>OwnerIdParentIdMyLookup__cRegion__cStatus__cOwner.NameParent.Account.Industry<filterExpression>...</filterExpression>WHEREStatus__c != nullWHERE Status__c != nullreferences/filter-expressions.md| Constraint | Rationale |
|---|---|
| The Metadata API binds the member to a ChangeEvent entity — passing |
Member fullName uses single underscore: | The double-underscore form ( |
Default channel value is exactly | Older fixtures and some docs show |
| Enrichment field names are single-hop API names on the source entity | Standard ( |
| Deploy returns "filter expression has syntax errors: unexpected token: 'WHERE'". |
Filter cannot reference | Deploy rejects with "field is invalid". |
DateTime fields support only equality in filters ( | Deploy returns "Only equality operators are supported for this field type or value". Use a named date literal: |
| Filter RHS must be a literal — no field-to-field comparison | |
Compound fields (e.g. | |
Custom channel filename ends with | Salesforce's MDAPI naming convention; mismatch causes deploy ambiguity. |
Custom channel XML must include | Without |
| Source custom objects must already exist (or be deployed in the same transaction) | The ChangeEvent entity for |
Never generate a | The default channel is system-provided. Reference it via |
| Adding |
| Adding |
Generated metadata files only — never run | This skill produces artifacts; deployment is a separate lifecycle concern. |
| Issue | Resolution |
|---|---|
| Set |
| Use the ChangeEvent name, not the source object: |
| Rename the file to use a single underscore: |
| Replace |
| Remove the |
| Use the compound dotted form: |
| Custom-object member fails with "ChangeEvent doesn't exist" | The source object isn't deployed yet. Ensure the |
| The member is already subscribed. Either delete first or skip — CDC doesn't support upsert on members directly. |
| That file extension and metadata type don't exist. Replace the |
User says "subscribe Order__c" but means standard | Confirm — |
force-app/.../platformEventChannelMembers/<Entity>_ChangeEvent.platformEventChannelMember-meta.xmlforce-app/.../platformEventChannels/<DevName>__chn.platformEventChannel-meta.xmlassets/sf project deploy start --dry-run -d <path> --target-org <alias>references/deploy-troubleshooting.md| Need | Delegate to |
|---|---|
| Generate the source custom object | |
| Generate custom fields referenced by enrichment or filter | |
| Build a permission set for users who consume change events | |
| File | When to read |
|---|---|
| Step 3 — starting structure for a channel member |
| Step 4 — starting structure for a custom channel |
| Step 6 — for the supported operators and field-type matrix when writing a filter expression |
| When a user reports a dry-run deploy error and asks for help diagnosing it |