Newer Version Available

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

LightningUriEvent (Beta)

Detects when a user creates, accesses, updates, or deletes a record in Lightning Experience only. LightningUriEvent is a big object that stores the event data of LightningUriEventStream. This object is available in API version 46.0 and later.

This object is included in Real-Time Event Monitoring (Beta). As a beta feature, Real-Time Event Monitoring is a preview and isn’t part of the “Services” under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. This feature is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature. You can provide feedback and suggestions for this object in the Real-Time Event Monitoring Beta group in the Trailblazer Community.

Note

Supported Calls

describeSObjects(), query()

Special Access Rules

Accessing this object requires the Shield Event Monitoring add-on, and the View Data Leakage Detection Events and API Enabled user permissions.

LightningUriEvent doesn’t track Setup events.

Note

Fields

Field Details
AppName
Type
string
Properties
Nillable
Description
The name of the application that the user accessed.
ConnectionType
Type
string
Properties
Nillable
Description
The type of connection.
Possible Values
  • CDMA1x
  • CDMA
  • EDGE
  • EVDO0
  • EVDOA
  • EVDOB
  • GPRS
  • HRPD
  • HSDPA
  • HSUPA
  • LTE
  • WIFI
DeviceId
Type
string
Properties
Nillable
Description
The unique identifier used to identify a device when tracking events. DEVICE_ID is a generated value that’s created when the mobile app is initially run after installation.
DeviceModel
Type
string
Properties
Nillable
Description
The name of the device model.
DevicePlatform
Type
string
Properties
Nillable
Description
The type of application experience in name:experience:form format.
Possible Values
Name
  • APP_BUILDER
  • CUSTOM
  • S1
  • SFX
Experience
  • BROWSER
  • HYBRID
Form
  • DESKTOP
  • PHONE
  • TABLET
DeviceSessionId
Type
string
Properties
Nillable
Description
The unique identifier of the user’s session based on page load time. When the user reloads a page, a new session is started.
Duration
Type
double
Properties
Nillable
Description
The duration in milliseconds since the page start time.
EffectivePageTime
Type
double
Properties
Nillable
Description
Indicates how many milliseconds it took for the page to load before a user could interact with the page’s functionality. Multiple factors can affect effective page time, such as network speed, hardware performance, or page complexity.
EventDate
Type
dateTime
Properties
Nillable
Description
The time when the specified URI event was captured (after query execution takes place). For example, 2013-01-01T03:01:01Z. Seconds are the most granular setting.
EventIdentifier
Type
string
Properties
Filter, Sort
Description
The unique ID of the event. For example, 4DWDVuDbwCDZcEIdp7MQZ.
LoginKey
Type
string
Properties
Nillable
Description
The string that ties together all events in a given user’s login session. The session starts with a login event and ends with either a logout event or the user session expiring. For example, 8gHOMQu+xvjCmRUt.
Operation
Type
picklist
Properties
Nillable, Restricted picklist
Description

The operation being performed on the entity. For example, Read, Create, Update, or Delete.

Create and update operations are captured in pairs; that is, expect two event records for each operation. The first record represents the start of the operation, and the second record represents whether the operation was successful or not. The two records are correlated by RelatedEventIdentifier.

If there isn’t a second event recorded for a create or update operation, then the user canceled the operation, or the operation failed with client-side validation (for example, when a required field is empty).

OsName
Type
string
Properties
Nillable
Description
The operating system name.
OsVersion
Type
string
Properties
Nillable
Description
The operating system version.
PageStartTime
Type
dateTime
Properties
Nillable
Description
The time when the page was initially loaded, measured in milliseconds.
Example
1471564788642
PageUrl
Type
url
Properties
Nillable
Description
Relative URL of the top-level Lightning Experience or Salesforce mobile app page that the user opened. The page can contain one or more Lightning components. Multiple record IDs can be associated with PageUrl.
Example
/sObject/0064100000JXITSAA5/view
PreviousPageAppName
Type
string
Properties
Nillable
Description
The internal name of the previous application that the user accessed from the App Launcher.
PreviousPageEntityId
Type
reference
Properties
Nillable
Description
The unique previous page entity identifier of the event.
PreviousPageEntityType
Type
string
Properties
Nillable
Description
The previous page entity type of the event.
PreviousPageUrl
Type
url
Properties
Nillable
Description
The relative URL of the previous Lightning Experience or Salesforce mobile app page that the user opened.
Example
/sObject/006410000
QueriedEntities
Type
string
Properties
Nillable
Description
The API name of the object referenced by the URI.
RecordId
Type
reference
Properties
Nillable
Description

The id of the record being viewed or edited. For example, 001RM000003cjx6YAA.

RelatedEventIdentifier
Type
string
Properties
Nillable
Description
Represents the EventIdentifier of the related event.
SdkAppType
Type
string
Properties
Nillable
Description
The mobile SDK application type.
Possible Values
  • HYBRID
  • HYBRIDLOCAL
  • HYBRIDREMOTE
  • NATIVE
  • REACTNATIVE
SdkAppVersion
Type
string
Properties
Nillable
Description
SdkVersion
Type
string
Properties
Nillable
Description
The mobile SDK application version number.
Example
5.0
SessionKey
Type
string
Properties
Nillable
Description
The user’s unique session ID. Use this value to identify all user events within a session. When a user logs out and logs in again, a new session is started.
SessionLevel
Type
picklist
Properties
Nillable, Restricted picklist
Description
Session-level security controls user access to features that support it, such as connected apps and reporting. Possible values are:
  • HIGH_ASSURANCE—A high assurance session was used for resource access. For example, when the user tries to access a resource such as a connected app, report, or dashboard that requires a high-assurance session level.
  • LOW—The user’s security level for the current session meets the lowest requirements.

    This low level is not available, nor used, in the Salesforce UI. User sessions through the UI are either standard or high assurance. You can set this level using the API, but users assigned this level will experience unpredictable and reduced functionality in their Salesforce org.

    Note

  • STANDARD—The user’s security level for the current session meets the Standard requirements set in the org’s Session Security Levels.
SourceIp
Type
string
Properties
Nillable
Description
The source IP address of the client logging in. For example, 126.7.4.2.
UserId
Type
reference
Properties
Nillable
Description
The user’s unique ID. For example, 005RM000001ctYJYAY.
Username
Type
string
Properties
Nillable
Description
The username in the format of user@company.com at the time the event was created.
UserType
Type
picklist
Properties
Nillable, Restricted picklist
Description
The category of user license. Each UserType is associated with one or more UserLicense records. Each UserLicense is associated with one or more profiles. Valid values are:
  • CsnOnly—Users whose access to the application is limited to Chatter. This user type includes Chatter Free and Chatter moderator users.
  • CspLitePortal—CSP Lite Portal license. Users whose access is limited because they are organization customers and access the application through a customer portal or community.
  • CustomerSuccess—Customer Success license. Users whose access is limited because they are organization customers and access the application through a customer portal.
  • Guest
  • PowerCustomerSuccess—Power Customer Success license. Users whose access is limited because they are organization customers and access the application through a customer portal. Users with this license type can view and edit data they directly own or data owned by or shared with users below them in the customer portal role hierarchy.
  • PowerPartner—Power Partner license. Users whose access is limited because they are partners and typically access the application through a partner portal or community.
  • SelfService
  • Standard—Standard user license. This user type also includes Salesforce Platform and Salesforce Platform One user licenses.

Standard SOQL Usage

LightningUriEvent allows filtering over two fields: EventDate and EventIdentifier. The only supported SOQL functions on the LightningUriEvent object are WHERE, ORDER BY, and LIMIT. In the WHERE clause, you can only use comparison operators (<, >, <=, and >=). The != operator isn’t supported. In the ORDER BY clause, you can only use EventDate DESC. Ascending order isn’t supported with EventDate, and EventIdentifier sorting isn’t supported.

Date functions such as convertTimeZone() aren’t supported—for example, SELECT CALENDAR_YEAR(EventDate), Count(Id) FROM UriEvent GROUP BY CALENDAR_YEAR(EventDate) returns an error. You can use date literals in your queries and some date/time functions like TODAY(), YESTERDAY(), and LAST_n_DAYS:1. However, these functions use comparison operators behind the scenes. Therefore you can only use them in the final expression in the WHERE clause.

Note

The following list provides some examples of valid queries:
  • Unfiltered
    • Valid—Contains no WHERE clause, so no special rules apply.
      1SELECT EntityType, UserName, UserType
      2FROM LightningUriEvent
  • Filtered on EventDate—you can filter solely on EventDate, but single filters on other fields fail. You can also use a comparison operator in this query type.
    • Valid—you can filter solely on EventDate, but single filters on other fields fail. You can also use a comparison operator in this query type.
      1SELECT EntityType, UserName, UserType
      2FROM LightningUriEvent 
      3WHERE EventDate>=2014-11-27T14:54:16.000Z

Async SOQL Usage

With Async SOQL, you can filter on any field in LightningUriEvent and use any comparison operator in your query.

Find who is accessing Opportunities and related Contacts

SELECT EventDate, EventIdentifier, UserName, UserType, Name, EntityType, Operation, LoginKey, SessionKey FROM LightningUriEvent WHERE RecordId='1000000000001'