Loading
Prepare for Email to Become the Default Login ExperienceRead More
Intermittent freezing when using using certain browser versionsRead More
Set Up and Maintain Your Salesforce Organization
Best Practices and Considerations for Leveraging Event Log Object Data

Best Practices and Considerations for Leveraging Event Log Object Data

It’s important to understand the recommended practices and limitations for the Event Log Object framework to get the most out of your log data. Here are some tips to ensure your queries run smoothly.

Available in: Salesforce Classic (not available in all orgs), and Lightning Experience

Available in: Enterprise, Performance, and Unlimited Editions

Requires Salesforce Shield or Salesforce Event Monitoring add-on subscriptions.

User Permissions Needed

To query and view event log object data:

View Event Log Object Data

Querying Event Log Object Data Through SOQL

As of Spring 25’, the Event Log Object framework only supports SOQL queries, with the following exceptions:

  • Relationship queries
  • HAVING
  • OFFSET
Note
Note Event Log Objects are designed for users with specific permissions to perform interactive analytics and diagnose security and performance incidents via SOQL. This feature is not meant to handle concurrent queries from a large number of users.

Timestamp Field Considerations

The only supported date function for the Timestamp field in a where clause within the Event Log Object framework is DAY_ONLY(). See Date Functions for more information on querying data by date periods.

You can query up to 15 days of data at a time using the Timestamp filter present on all event log objects. Consequentially, expect these behaviors when querying using the Timestamp field:

  • When there are 3 or more Timestamp filters in the WHERE clause, we block the execution of the query with an error.
  •  != isn’t supported
  • When the Timestamp filter isn’t specified in the query, we append a filter in the backend to query only the last 15 days of data.
  • If you are specifying Timestamp filters as part of an AND condition, the time range must fall within 15 days.
  • No more than 2 Timestamp filters can be used for OR and IN operators.
  • If a full range isn’t specified in the Timestamp filter (for example, if either the upper or lower bound is missing) the filter automatically retrieves 15 days of data in the direction of the missing bound.
Example
Example Valid Format:
  • Timestamp >= userSpecifiedTimeLower AND timestamp <= userSpecifiedTimeUpper
  • Timestamp = userSpecifiedTime1 OR Timestamp = userSpecifiedTime2
  • Timestamp IN (userSpecifiedTime1, userSpecifiedTime2)
Example
Example Valid Timestamp Filter:
  • Timestamp >= 2024-09-27T17:18:15.553Z AND timestamp <= 2024-10-05T17:18:15.553Z
Example
Example Invalid Timestamp Filter:
  • where Timestamp > 2024-09-27T17:18:15.553Z OR Timestamp = 2024-10-27T17:18:15.553Z
  • where Timestamp = 2021-10-26T17:18:15.553Z AND Timestamp < 2024-10-27T17:18:15.553Z
 
Loading
Salesforce Help | Article