Anatomy of an event

The following is a sample event record:

"event": {  "source": "acme",  "type": "2fa_enabled",  "description": "Customer enabled 2-factor authentication",  "properties": {    "passcode_preference": "SMS"  }}

An event is usually associated with a profile. For more information, see Anatomy of a profile.

An event contains the following information:

The source, type, and properties properties are required. The description property is optional.

All event properties are strings, including number values.

source

Required. A user-defined name for the application or system where the events occur.

Example:

"source": "acme"

Because you define the source name, make sure you choose a descriptive name and use it consistently with events from that source.

type

Required. A user-defined name that lets you create different kinds of events from a given source. For example, you might want to create one set of events for a login interface and another for a shopping cart in the same app. You could use login for one set of events and cart for the other set. The events would share the same source.

Example:

"type": "cart"

Because you define the type names, make sure you choose descriptive names and use them consistently with events.

description

Optional. A description of the event to give more context to human consumers of the data.

Example:

"description": "Customer enabled 2-factor authentication"

properties

Required. A user-defined JSON object with details about the event. A property is typically information about the event that's used in the source application or system. Properties can also be used to provide context as to how data should be presented in the Agent Workspace.

Example:

"properties": {  "passcode_preference": "SMS"}

Because you define the property names, make sure you choose descriptive names and use them consistently.