Newer Version Available

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

PlatformEventSettings

Represents settings for platform events and change data capture events.

Parent Type and Manifest Access

This type extends the Metadata metadata type and inherits its fullName field.

In the package manifest, all the settings metadata types for the org are accessed using the “Settings” name. See Settings for more details.

File Suffix and Directory Location

PlatformEventSettings values are stored in the PlatformEvent.settings file in the settings folder. The .settings files are different from other named components, because there’s only one settings file for each settings component.

Version

PlatformEventSettings components are available in API version 58.0 and later.

Special Access Rules

There are no additional access requirements that are specific to this type.

Fields

Field Name Description
enableEnhancedUsageMetrics
Field Type
boolean
Description
Enables enhanced usage metrics for queries run against PlatformEventUsageMetric. Enhanced usage metrics provide additional fields for the queries and granular time segments. For more information, see Enhanced Usage Metrics in the Platform Events Developer Guide. Default value is false.

Declarative Metadata Sample Definition

The following is an example of a PlatformEventSettings component that enables the enhanced usage metrics feature.

1<?xml version="1.0" encoding="UTF-8"?>
2<PlatformEventSettings xmlns="http://soap.sforce.com/2006/04/metadata">
3    <enableEnhancedUsageMetrics>true</enableEnhancedUsageMetrics>
4</PlatformEventSettings>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>PlatformEvent</members>
5        <name>Settings</name>
6    </types>
7    <version>58.0</version>
8</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.