Send an ADD CONTACTS event to Sitecore CDP

Abstract

Provides the required attributes and a JSON example of how to send an ADD_CONTACTS event to Sitecore CDP (Data model 2.1).

If your organization uses order assembly, the ADD_CONTACTS event is required to identify the guest. You do not use the ADD_CONTACTS event if your organization uses order submission.

To send an ADD_CONTACTS event, use the following attributes:

Attribute

Description

Type

Example(s)

Required/optional

channel

The channel captured on each page the guest visited.

string (uppercase)

"WEB", "MOBILE_WEB", "MOBILE_APP"

Required

type

The type of event.

string (uppercase)

"ADD_CONTACTS"

Required

language

The language captured on each page the guest visited.

string (uppercase) (2 letter ISO 639 language code)

"EN", "FR", "DE"

Required

currency

The type of currency.

string (3 letter ISO 4217)

"EUR", "USD", "GBP"

Required

page

The name of the webpage the guest visited.

string

"home page", "search page", "/home", "/confirm"

Required

pos

The point of sale (storefront) captured on each page the guest visited.

string (predefined by client)

"myretailsite.com"

Required

browser_id

The ID of a browser generated by Sitecore CDP.

string (UUID)

"56860bff-94ba-4d84-aa37-2b5a83d5411b"

Required

contact

The array of contact attributes.

JSON array of JSON objects

N/A

Required

contact.title

The title of the contact.

string (title case)

"Br", "Brigadier", "Capt", "Colonel", "Dame", "Dr", "Elder", "Fr", "General", "Hon", "Judge", "Lady", "Lord", "Master", "Miss", "Mr", "Mrs", "Ms", "Mstr", "Prof", "Rabbi", "Rev", "Shaikha", "Sheikh", "Sir", "Sister", "Sr"

Optional

contact.firstname

The first name of the contact.

string (suggest title case)

"Jack"

Optional

contact.lastname

The last name of the contact.

string (suggest title case)

"Smith"

Optional

contact.mobile

The mobile number of the contact.

string

"+35387123456"

Optional

contact.phone

The phone number of the contact.

string

"+35387123456"

Optional

contact.street

The street address of the contact.

array of strings (suggest title case)

"123 Fake Street"

Optional

contact.city

The city address of the contact.

string (suggest title case)

"Dublin"

Optional

contact.state

The state address of the contact.

string (suggest title case)

"Oregon"

Optional

contact.country_code

The country code of the contact.

string (uppercase) ISO 3166-1 country code

"IE"

Optional

contact.postal_code

The postcode of the contact.

string (suggest uppercase)

"D15"

Optional

contact.dob

The date of birth of the contact.

string (ISO 8601 date time) ‘YYYY-MM-DD’T’hh:mm’

"1990-08-23T00:00"

Optional

contact.email

The email address of the contact.

string (suggest lowercase)

"jack.smith@gmail.com"

Optional

contact.gender

The gender of the contact.

string (lowercase)

"male", "female", "rather_not_say"

Optional

contact.identifiers

The array of identifiers.

array of strings (suggest title case)

N/A

Required

contact.identifiers.provider

The identifier provider.

string

"CUST_ID"

Required

contact.identifiers.id

The identifier ID.

string

"B7524AE6-CF1C-440F-B1A2-0C9D42F5CB41"

Required

contact.identifiers.expiryDate

The expiry date of the identifier.

ISO 8601 Date/Time UTC

"2023-01-01T16:17:16.000Z"

Optional

The following JSON code example demonstrates how to send an ADD_CONTACTS event:

{
   "channel":"WEB",
   "type":"ADD_CONTACTS",
   "language":"EN",
   "currency":"EUR",
   "page":"home page",
   "pos":"myretailsite.com",
   "browser_id":"56860bff-94ba-4d84-aa37-2b5a83d5411b",
   "contact":[
      {
         "title":"Mr",
         "firstname":"Jack",
         "lastname":"Smith",
         "mobile":"(+353)1234567",
         "phone":"(+353)1234568",
         "street":[
            "123 Fake Street"
         ],
         "city":"Dublin",
         "country_code":"IE",
         "postal_code":"1234",
         "dob":"1975-04-23T00:00",
         "email":"jack.smith@gmail.com",
         "gender":"male",
         "identifiers":[
            {
               "provider":"CUST_ID",
               "id":"a9557c9a-4443-4aed-a902-b9da69d5c0c9",
               "expiryDate":"2023-01-01T16:17:16.000Z",
            }
         ]
      }
   ]
}