Generic Events (Legacy)
Use generic events to send custom notifications that aren’t tied to Salesforce data changes.
Generic Events is a legacy product. Salesforce no longer enhances Generic Events with new features and provides limited support for this product. Instead of Generic Events, consider using Platform Events. To learn about Platform Events, see the Platform Events Developer Guide and the Platform Events Basics Trailhead module.
Use generic streaming when you want to send and receive custom notifications. Use generic streaming to:
- Publish and receive arbitrary payloads in JSON without a predefined event schema
- Broadcast notifications to a target set of users, specific teams, or your entire org
- Send notifications for events that are external to Salesforce
To use generic events, you need:
- A StreamingChannel that defines the channel, with a name that is case-sensitive
- One or more clients subscribed to the channel
- The Streaming Channel Push REST API REST API resource to monitor and invoke push events on the channel
StreamingChannel isn’t available for users in Experience Cloud sites, including Partner Community and Customer Community users. Also, StreamingChannel isn’t available in legacy Customer Portals.
-
Replay Generic Streaming Events with Durable Generic Streaming
A client can receive generic streaming events after it subscribes to a channel and as long as the Salesforce session is active. Events sent before a client subscribes to a channel or after a subscribed client disconnects from the Salesforce session are missed. However, a client can fetch the missed events within the 24-hour retention window by using Durable Generic Streaming.
-
These default allocations apply to consumers of generic streaming.