1. Interfaces

IdentityData

Version:
TypeInterface
ExtendsEventAttributesInput
Import path@sitecore-cloudsdk/events/browser

Data for IDENTITY events.

Signature

export interface IdentityData extends EventAttributesInput {
  city?: string;
  country?: string;
  dob?: string;
  email?: string;
  firstName?: string;
  gender?: string;
  identifiers: Identifier[];
  lastName?: string;
  mobile?: string;
  phone?: string;
  postalCode?: string;
  state?: string;
  street?: string[];
  title?: string;
  extensionData?: ExtensionData;
}

Properties

NameTypeDescriptionValue
citystringOptional.The site visitor's city address.Format: title case recommended."Dublin"
countrystringOptional.The site visitor's country address.Format: uppercase ISO 3166-1 alpha-2."IE"
dobstringOptional.The site visitor's date of birth.Format: ISO 8601."1984-04-15"
emailstringOptional.The site visitor's email address.Format: lowercase recommended."[email protected]"
firstNamestringOptional.The site visitor's first name.Format: title case recommended."Jane"
genderstringOptional.The site visitor's gender."female""male""unknown"
identifiersIdentifier[]Required.The identifiers used for identifying site visitors.identifiers: [{ id: "123456", provider: "BXLP" }]
lastNamestringOptional.The site visitor's last name.Format: title case recommended."Doe"
mobilestringOptional.The site visitor's mobile number."+3531234567"
phonestringOptional.The site visitor's phone number."+3531234567"
postalCodestringOptional.The site visitor's postal code."D2"
statestringOptional.The site visitor's state address.Format: title case recommended."Oregon"
streetstring[]Optional.The site visitor's street address.Format: title case recommended.["Tara Street"]
titlestringOptional.The site visitor's title.Format: title case."Miss""Mr""Mrs""Ms"
extensionDataExtensionDataOptional.Any custom data to collect about an event in addition to the other attributes provided for the event data.{ customKey: "customValue" }

Identifier properties

NameTypeDescriptionValue
idstringRequired.

The unique guest (site visitor) identifier provided by your organization's identity system, such as a Customer Relationship Management (CRM) system.
"123456"
providerstringRequired.

The name of your organization's identity system, external to SitecoreAI, that provided the unique guest (site visitor) identifier.
"BXLP"
expiryDatestringOptional.

The date the unique guest (site visitor) identifier expires. This is determined by your organization's identity system.

Format: ISO 8601.
"2026-04-15T08:39
.868Z"

Examples

Here's a basic event data object for an IDENTITY event:

const eventData: any = {
  identifiers: [
    {
      id: "123456",
      provider: "BXLP"
    }
  ]
};

Here's an example event data object for an IDENTITY event with required and optional event data, and extension data:

const eventData: any = {
  language: "EN",
  page: "home",
  channel: "WEB",
  currency: "EUR",
  email: "[email protected]",
  title: "Miss",
  firstName: "Jane",
  lastName: "Doe",
  gender: "female",
  dob: "1984-04-15",
  mobile: "+3531234567",
  phone: "+3531234567",
  street: ["Tara Street"],
  city: "Dublin",
  country: "IE",
  identifiers: [
    {
      id: "123456",
      provider: "BXLP",
    },
  ],
  extensionData: { customKey: "customValue" }
};
If you have suggestions for improving this article, let us know!