Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More

How to Check and Aggregate Credit Consumption Details from TenantEnrichedUsageEvent

Publish Date: Jul 22, 2026
Description

While you can check overall consumption in Digital Wallet, querying TenantEnrichedUsageEvent from your Query Editor allows you to track detailed usage and perform custom aggregations.

Resolution

Overview

While the overall credit consumption is visible in Digital Wallet, you can gain deeper insights into detailed usage and perform flexible aggregations by querying the TenantEnrichedUsageEvent Data Lake Object (DLO) from the Query Editor in the customer's environment.

Steps

  1. Log in to the Data 360 production org
  2. Click [Query Editor] | [New]
  3. Enter any name and click [Save]
  4. Enter the following SQL query and click [Run Query]
  5. Click the [Save] button
SELECT
  "eventtime__c",
  "usagebusinessenvtype__c",
  "usagereportingorgid__c",
  "cardname__c",
  "usagetypedevelopername__c",
  "featuredevelopername__c",
  "resourceidorapiname__c",
  "resourcetype__c",
  "rootresourceidorapiname__c",
  "rootresourcetype__c",
  "unitsconsumed__c"
FROM
  "TenantEnrichedUsageEvent__dll"
ORDER BY
"eventtime__c" DESC;

Feel free to modify the query as needed for your own aggregations.

Key Fields in TenantEnrichedUsageEvent

Field NameDescription
eventtime__cTimestamp when the event occurred (default is UTC)
usagereportingorgid__cOrg ID of the org where the event occurred (production, sandbox, or companion org)
cardname__cName of the consumption card displayed on the Digital Wallet
unitsconsumed__cNumber of credits consumed

For details on each field, refer to the TenantEnrichedUsageEvent Data Lake Object.

Checking the request category of query results
If the category cannot be determined from the query results, you can review an overview of each request category from the following Help articles. Categories vary depending on the feature and contract model, so please refer to the appropriate article.

Changing the Timezone

The default timezone is UTC. For example, to output results in Japan Standard Time (JST), replace "eventtime__c" in the SELECT clause with the following:

CAST("eventtime__c" + INTERVAL '9' HOUR AS TIMESTAMP) AS "event_time_jst"

Sample Queries

List of Credit Consumption on a Specific Date
This query displays all transactions for a specific date. Modify the date timezone and format as needed.

SELECT
    TO_CHAR("EventTime__c" + interval '9' hour, 'YYYY-MM-DD HH24:MI:SS') AS "eventtime_jst",
    "usagebusinessenvtype__c",
    "usagereportingorgid__c",
    "cardname__c",
    "usagetypedevelopername__c",
    "featuredevelopername__c",
    "resourceidorapiname__c",
    "resourcetype__c",
    "rootresourceidorapiname__c",
    "rootresourcetype__c",
    "unitsconsumed__c"
FROM
    "TenantEnrichedUsageEvent__dll"
WHERE
    CAST("eventtime__c" + INTERVAL '9' HOUR AS DATE) = DATE '2026-07-14'
ORDER BY
  "eventtime__c" DESC

 

Daily Credit Consumption Trend
Aggregates by date per consumption card and displays from the most recent date.

SELECT
  CAST("eventtime__c" + INTERVAL '9' HOUR AS DATE) AS "event_time_jst",
  "cardname__c",
  SUM("unitsconsumed__c") AS "unitsconsumed"
FROM
  "TenantEnrichedUsageEvent__dll"
GROUP BY
  CAST("eventtime__c" + INTERVAL '9' HOUR AS DATE),
  "cardname__c"
ORDER BY
 "event_time_jst" DESC;

 

Data 360 Credit Consumption Ranking for the Past 90 Days
Extracts only Data 360 credit consumption from data within the past 90 days, excluding storage capacity consumption.

SELECT
  "cardname__c",
  "usagetypedevelopername__c",
  "resourcetype__c",
  "resourceidorapiname__c",
  SUM("unitsconsumed__c") AS "unitsconsumed__c"
FROM
  "TenantEnrichedUsageEvent__dll"
WHERE
  "usagetypedevelopername__c" LIKE 'Data%'
  AND "cardname__c" <> 'Data Storage Allocation'
  AND "eventtime__c" >= CURRENT_TIMESTAMP - INTERVAL '90' DAY
GROUP BY
  "cardname__c",
  "usagetypedevelopername__c",
  "resourcetype__c",
  "resourceidorapiname__c"
ORDER BY
 "unitsconsumed__c" DESC;

Adding the Data Space

Even if Data 360 is already activated, if TenantEnrichedUsageEvent has not been added to the data space, an error will occur when running queries. (Error message: table "TenantEnrichedUsageEvent__dll" does not exist)
Follow these steps to resolve the issue:

  1. Log in to the Data 360 production org
  2. Click [Data Space] | [default]
  3. Click [Add Data Lake Object]
  4. Search for TenantEnrichedUsageEvent and check the checkbox
  5. Click [Next]
  6. Check [Add object without using search criteria] and click [Save]

About Data Refresh Timing

Data is reflected in TenantEnrichedUsageEvent once per day. For real-time verification, please query the TenantBillingUsageEvent DLO from the Query Editor. By manually running [Refresh Now] on the TenantBillingUsageEventStream data stream, data will be reflected in the TenantBillingUsageEvent DLO immediately. For details on each field, refer to the TenantBillingUsageEvent Data Lake Object.

Notes

  • Data 360 must be activated to run queries against TenantEnrichedUsageEvent.
  • The Query Editor displays up to 1,000 records.
Knowledge Article Number

005388929

 
Loading
Salesforce Help | Article