Three Salesforce mechanisms for emitting data outwards in (near-)real-time. They overlap but solve different patterns.
Outbound Messages (legacy):
- Configured via Workflow Rules (and now Flow). When triggered, sends a SOAP message to a configured external endpoint.
- Reliable retry — Salesforce retries on failure, up to 24 hours, with exponential backoff.
- Synchronous from Salesforce's POV — fired after commit.
- Limited to a fixed payload (the record's fields, no calculation).
- Now considered legacy; new patterns prefer Platform Events or CDC.
Change Data Capture (CDC):
- Salesforce-managed event stream of record changes on enabled objects. When a record is created, updated, undeleted, or deleted, an event is published describing what changed.
- Uses the Streaming API / CometD transport, or the modern Pub/Sub API.
- Per-object opt-in: you enable CDC on Account, Opportunity, etc. — only those objects publish events.
- Replay / catch-up: events are retained for 72 hours; subscribers can request events from a specific replay ID after reconnect.
- Use case: data replication to external warehouses (Snowflake, BigQuery), real-time integration with Mulesoft/middleware, audit logging.
Platform Events:
- Custom event types you define (like a custom object with
__esuffix). Schema is up to you. - Salesforce code (Apex, Flow) publishes events; subscribers (Apex triggers, Flow, external clients via Streaming API/Pub/Sub) consume.
- Use case: pub-sub messaging between systems where you want a custom payload — e.g., "OrderApproved" events fired from an Approval Process to trigger downstream fulfilment, with a custom set of fields.
Decision tree:
- Want to know when records change -> CDC. No coding required, schema is the record's diff.
- Want to publish a custom semantic event ("Order Approved", "Customer Churned") -> Platform Event. Define your own schema.
- Have a legacy SOAP endpoint and need reliable retry -> Outbound Message (or wrap with middleware that exposes a Pub/Sub-friendly receiver).
Reliability differences:
- Outbound Message: explicit retry, delivery guarantee within 24 hours.
- Platform Event / CDC: at-least-once delivery, but subscribers must handle the 72-hour retention window — if a subscriber is down for 4 days, events are lost.
Modern Salesforce patterns lean heavily on CDC for replication and Platform Events for pub-sub messaging; Outbound Messages are kept alive only for legacy integrations that already use them.
