EventSettings

Represents an org's platform event settings for Event Monitoring.

File Suffix and Directory Location

EventSettings components have the suffix .settings and are stored in the settings folder.

Version

EventSettings components are available in API version 47.0 and later.

Fields

Field Name Field Type Description
bypassMeteringBlock boolean Determines the behavior of metering service protection for Transaction Security policies. When true, metering occurs but doesn't block the user operation that triggered the policy. When false and a policy can't be handled within three seconds, metering occurs and the user's action is blocked. Default value is false.
enableDeleteMonitoringData boolean Allows (true) or disallows (false) users to delete event log files and LoginEvent data. Users require the Delete Event Monitoring Records user permission, which is available when this setting is enabled. Default value is false.
enableDynamicStreamingChannel boolean Enables (true) or disables (false) the dynamic creation of a streaming channel when you subscribe to generic streaming. Default value is false.
enableEventLogGeneration boolean Enables (true) or disables (false) the generation of event monitoring log files. Default value is false.
enableEventLogObjectFeature boolean Enables (true) or disables (false) event log objects. Default value is false.
enableEventLogWaveIntegration boolean Enables (true) or disables (false) the integration of event monitoring log files and Analytics apps. Analytics apps help you visualize your user’s activity. Default value is false.
enableLightningLoggerEvents boolean Enables (true) or disables (false) the generation of Lightning Logger events. Lightning Logger events track information about custom Lightning web components. Default value is false. Requires Salesforce Shield or Salesforce Event Monitoring add-on subscriptions.
enableLoginForensics boolean Enables (true) or disables (false) the Login Forensics feature. Login Forensics helps you track and audit your org's user login activity. Default value is false. Available in API versions 47.0–49.0.

In versions 50.0 and later, enable LoginEvent on the Event Manager Setup page.

Tip

enableStreamingApi boolean Enables (true) or disables (false) Streaming API in the org. Default value is true.
enableTerminateOldestSession boolean Determines the behavior of legacy transaction security policies that trigger an end-session action during an API-based login (a login that doesn’t come through the UI.) An end-session action occurs when a user exceeds the maximum number of allowed Salesforce sessions.
When true, and a user triggers an end-session action, Salesforce terminates the user’s oldest session until the user is in compliance. When set to false, Salesforce blocks the most recent user’s attempt to log in and doesn’t allow a new user session. Default value is false. Available in API versions 47.0–49.0.

As of Summer '20, Legacy Transaction Security is a retired feature in all Salesforce orgs.

Note

enableTransactionSecurityPolicies boolean Enables (true) or disables (false) the ability to create and use transaction security policies in the Salesforce UI. Default value is false.
enableApexLimitEvents boolean Enables (true) or disables (false) the Apex Limit Events (Pilot) feature. Default value is false.

The Apex Limit Events (Pilot) feature has been discontinued so don’t use this field.

Note

eventLogRetentionDuration integer Specifies the number of days (between 30 and 365) that your event log file data is retained for. If this value is not set, your event log file data is retained for your org's default retention period.

Declarative Metadata Sample Definition

The following is an example of an EventSettings.settings file.

<?xml version="1.0" encoding="UTF-8"?>
<EventSettings xmlns="http://soap.sforce.com/2006/04/metadata">
    <enableDeleteMonitoringData>true</enableDeleteMonitoringData>
    <enableDynamicStreamingChannel>false</enableDynamicStreamingChannel>
    <enableEventLogWaveIntegration>true</enableEventLogWaveIntegration>
    <enableStreamingApi>true</enableStreamingApi>
    <enableTransactionSecurityPolicies>true</enableTransactionSecurityPolicies>
</EventSettings>

Example Package Manifest

The following is an example package manifest used to deploy or retrieve the Event settings metadata:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
   <types>
       <members>Event</members>
       <name>Settings</name>
   </types>
   <version>47.0</version>
</Package>

Wildcard Support in the Manifest File

The wildcard character * (asterisk) in the package.xml manifest file doesn’t apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. For details, see Settings. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.