Newer Version Available

This content describes an older version of this product. View Latest

Considerations for Defining and Publishing Platform Events

Take note of the considerations when defining and publishing platform events.

Considerations for Defining Platform Events

Field-Level Security
All platform event fields are read only by default, and you can’t restrict access to a particular field. Because platform events aren’t viewable in the Salesforce user interface and aren’t editable, field-level security permissions don’t apply.
Platform Encryption
Platform Encryption is not supported for Platform Event fields.
Enforcement of Field Attributes
Platform event records are validated to ensure that the attributes of their custom fields are enforced. Field attributes include the Required and Default attributes, the precision of number fields, and the maximum length of text fields.
Permanent Deletion of Event Definitions
When you delete an event definition, it’s permanently removed and can’t be restored. Before you delete the event definition, delete the associated triggers. Published events that use the definition are also deleted.
Renaming Event Objects
Before you rename an event, delete the associated triggers. If the event name is modified after clients have subscribed to notifications for this event, the subscribed clients must resubscribe to the updated topic. To resubscribe to the new event, add your trigger for the renamed event object.
No Associated Tab
Platform events don’t have an associated tab because you can’t view event records in the Salesforce user interface.
No SOQL Support
You can’t query event notifications using SOQL.
No Record Page Support in Lightning App Builder
When creating a record page in Lightning App Builder, platform events that you defined show up in the list of objects for the page. However, you can’t create a Lightning record page for platform events because event records aren’t available in the user interface.
Platform Events in Package Uninstall
When uninstalling a package with the option Save a copy of this package's data for 48 hours after uninstall enabled, platform events aren’t exported.
Event Volume in Package Installations and Upgrades
Installing a managed or unmanaged package that contains a standard-volume platform event causes the event type to be saved as high volume in the subscriber org. Upgrading a managed package doesn't change the event volume in the subscriber org.
No Support in Professional and Group Editions
Platform events aren’t supported in Professional and Group Edition orgs. Installation of a package that contains platform event objects fails in those orgs.

Considerations for Publishing Platform Events

Publishing Events in Read-Only Mode
During read-only mode, publishing standard-volume platform events results in an exception, and the events aren’t published. Publishing high-volume platform events in read-only mode sometimes fails when the event schema is not up to date in Salesforce. Your org is in read-only mode during Salesforce maintenance activities.
High-Volume Platform Event Persistence
Platform events are temporarily persisted to and served from an industry-standard distributed system during the retention period. A distributed system doesn’t have the same semantics or guarantees as a transactional database. As a result, we can’t provide a synchronous response for an event publish request. Events are queued and buffered, and Salesforce attempts to publish the events asynchronously. In rare cases, the event message might not be persisted in the distributed system during the initial or subsequent publish requests. No mechanism surfaces these types of errors to the publishers or consumers of the event streams.