Newer Version Available
What Is the Difference Between the Salesforce Events?
Salesforce
offers various features that use events. Except for Platform Events and Streaming API generic
events, most of these events are notifications within Salesforce or calendar
items.
The following is a partial list of the types of events provided.
- Platform Events
- Platform events enable you to deliver secure, scalable, and customizable event notifications within Salesforce or from external sources. Platform event fields are defined in Salesforce and determine the data that you send and receive. Apps can publish and subscribe to platform events on the Lightning Platform using Apex or in external systems using CometD.
- Streaming API Events
- Streaming API provides two types of events that you can publish and subscribe to: PushTopic and generic. PushTopic events track field changes in Salesforce records and are tied to Salesforce records. Generic events contain arbitrary payloads. Both event types don’t provide the level of granular customization that platform events offer. You can send a custom payload with a generic event, but you can’t define the data as fields. You can’t define those types of events in Salesforce, and you can’t use them in Apex triggers.
- Event Monitoring
- Event monitoring enables admins to track user activity and the org’s performance. In this context, events are actions that users perform, such as logins and exporting reports. The events are internal and logged by Salesforce. You can query the events, but you can’t publish the events or subscribe to them in real time.
- Transaction Security Policies
- Transaction security policies evaluate user activity, such as logins and data exports, and trigger actions in real time. When a policy is triggered, notifications are sent through email or in-app notifications. Actions can be standard actions, such as blocking an operation, or a custom action defined in Apex.
- Calendar Events
- Calendar events in Salesforce are appointments and meetings you can create and view in the user interface. In the SOAP API, the Event object represents a calendar event. Those events are calendar items and not notifications that software systems send.
This guide focuses on Platform Events only.