Salesforce CDC Enriched Fields vs Querying Salesforce After Every Event
A common CDC design starts like this:
CDC event -> subscriber -> query Salesforce -> build downstream message
Sometimes that lookup is necessary. Sometimes it exists only because the change event did not carry a stable identifier or routing field.
CDC enriched fields give you another option.
Query-After-Event Pattern
A follow-up query can retrieve the latest complete record state and related information.
That is useful when the subscriber genuinely needs a broad, current view that cannot reasonably fit in the event contract.
But doing it for every event adds:
- API traffic;
- another network round trip;
- latency;
- another failure point;
- coupling to Salesforce query availability;
- possible race semantics if the record changes again before the lookup.
Enrichment Pattern
For a CDC custom-channel member, configure a small set of fields that Salesforce should always include in the delivered change event.
CDC -> custom channel + enrichment -> subscriber -> downstream
Salesforce documents up to 10 enriched fields per member.
This works especially well for external IDs, routing keys, or compact context the subscriber consistently needs.
Enrichment Is Not a Full Snapshot
Do not use ten fields to pretend CDC is a snapshot replication protocol.
If the downstream operation needs dozens of fields, complex related data, or the authoritative latest state, a deliberate query may still be correct. The question is whether the query is business-required or merely compensating for missing event context.
Consistency Consideration
An enriched event carries context associated with the event. A later query retrieves state at query time. Those are not always semantically identical in a rapidly changing record.
For event-driven processing, keeping the necessary correlation data with the event can make reasoning easier.
A Practical Decision Rule
Use enrichment when a small, stable set of fields makes the event independently processable.
Use a follow-up query when processing genuinely requires broader current Salesforce state.
Use both when enrichment supplies correlation/routing data but a later step intentionally needs current state.