What problem does it solve?
Platform events provide a scalable way to decouple Salesforce applications by defining custom event objects with __e suffix and enabling event-driven communication across Apex, Flows, REST, and external subscribers.
Core Features & Use Cases
- Event Definition & Metadata: Define reliable event schemas with fields and publish behavior.
- Publish & Subscribe: Publish events from Apex, Flow, REST, and subscribe via Trigger, Flow, or external subscribers using CometD or Pub/Sub APIs.
- Replay & Reliability: Use replay IDs to resume processing and implement idempotent processing patterns.
- Error Handling: Patterns for dead-lettering and graceful failure without blocking transactions.
- Use Case: Build an order processing workflow that publishes an Order_Placed__e event and reacts to it asynchronously.
Quick Start
Instantiate the first Order_Placed__e event in your Salesforce org using the provided Apex snippet.