Platform Events Developer Guide
Summer '25 (API version 64.0)
Spring '25 (API version 63.0)
Winter '25 (API version 62.0)
Summer '24 (API version 61.0)
Spring '24 (API version 60.0)
Winter '24 (API version 59.0)
Summer '23 (API version 58.0)
Spring '23 (API version 57.0)
Winter '23 (API version 56.0)
Summer '22 (API version 55.0)
Spring '22 (API version 54.0)
Winter '22 (API version 53.0)
Summer '21 (API version 52.0)
Spring '21 (API version 51.0)
Winter '21 (API version 50.0)
Summer '20 (API version 49.0)
Spring '20 (API version 48.0)
Winter '20 (API version 47.0)
Summer '19 (API version 46.0)
Spring '19 (API version 45.0)
Winter '19 (API version 44.0)
Summer '18 (API version 43.0)
Spring '18 (API version 42.0)
Winter '18 (API version 41.0)
Summer '17 (API version 40.0)
Spring '17 (API version 39.0)
No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Flows
Processes
Lightning Components
Pub/Sub API
CometD
Subscribe to the Channel and Receive the Filtered Event Stream
Get Custom Channels and Channel Members
Identify and Match Event Messages with the EventUuid Field
Filter Your Stream of Platform Events with Custom Channels
Receive only the event messages that match a predefined filter on a custom channel.
Create a channel, and configure it with a filter expression. Subscribers to the channel,
including Pub/Sub API clients, Streaming API (CometD) clients, and event relays, receive a
filtered stream of events. With fewer events delivered to subscribers, event processing is
optimized. Also, subscribers make more efficient use of the event delivery
allocation.
- This feature is supported for high-volume custom platform events that you define. It isn’t supported for legacy standard-volume custom platform events or standard platform events, such as real-time event monitoring events.
- This feature is supported in Pub/Sub API and Streaming API (CometD) subscribers but not in other types of subscribers, such as Apex triggers, flows, and processes.
- If you use Government Cloud and your org was created before January 14, 2022, contact Salesforce to enable this feature. Government Cloud orgs created on or after January 14, 2022 have this feature enabled. This feature is available in all other clouds.
Note
-
Platform Event Filters
Using Tooling API or Metadata API, an administrator with the Customize Application permission can configure a complex filter expression that contains multiple fields. -
Filter Expressions in Channel Members
Add a filter expression in a channel member that’s associated with a custom channel. The channel member associates a custom platform event with the channel and specifies the filter expression. The channel holds the filtered stream of event messages that match the filter expression for the specified custom platform event. -
Subscribe to the Channel and Receive the Filtered Event Stream
After configuring the filter, subscribe to the channel and receive the event messages that match the filter expression. Only Pub/Sub API and CometD clients support stream filtering. Because Apex triggers, flows, and processes don’t support custom channels, you can’t use them to subscribe to filtered event streams. -
Get Custom Channels and Channel Members
You can find which channels and channel members are set up in your Salesforce org by performing SOQL queries through Tooling API.