As the Salesforce Summer '23 release is enabled in all environments, I wanted to use "Enhanced Usage Metrics" capability of Salesforce Platform Events. For this I am referring to Salesforce documentation.

When I run the below query:

SELECT EventName, EventType, UsageType, Value, StartDate, EndDate 
FROM PlatformEventUsageMetric 
WHERE TimeSegment='Hourly'

I am getting below error:

No such column 'EventName' on entity 'PlatformEventUsageMetric'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

The documentation says, "enable enhanced usage metrics". I am not able to find where should I enable this setting?

Is above "Enhanced Usage Metrics" not yet available to be used? OR Am I missing anything here?

1 Answer 1


Enhanced Usage Metrics is available in all sandboxes on API version 58 and later. Before you use it please enable 'enableEnhancedUsageMetrics' field to true in Metadata API using PlatformEventSettings.

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

As per release notes, this feature might not be available immediately.

enter image description here

If you still see error please provide me your sandbox org Id so that I can check further.

  • Hi @Vinay, Is it available (can be enabled) in Production?
    – user36778
    Jun 15, 2023 at 9:55
  • This feature is currently available in sandbox, can you confirm if your org is in version 58? If yes it should be available.
    – Vinay
    Jun 15, 2023 at 13:31
  • Hi @Vinay, I am not able to deploy above package.xml file to a sandbox using VS Code. What should be my package.xml? I am getting errors like: Cannot read properties of undefined (reading 'types') Invalid types definition in manifest file: \manifest\package.xml
    – user36778
    Jun 21, 2023 at 2:32
  • package.xml should be like <types><members>PlatformEvent</members<name>Settings</name> </types> <version>58.0</version>
    – Vinay
    Jun 21, 2023 at 13:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .