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.0).

The ADD_CONTACTS event is required to create an order in Sitecore CDP. The contact is the owner of the order, meaning orders can not exist in Sitecore CDP without a contact. The contact on the order must be a customer guest_type.

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)

"spinflight.com", "spinair.com"

Required

browser_id

The ID of a browser generated by Sitecore CDP.

string (UUID)

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

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"

Required

contact.firstname

The first name of the contact.

string (suggest title case)

"Jack"

Required

contact.lastname

The last name of the contact.

string (suggest title case)

"Smith"

Required

contact.email

The email address of the contact.

string (suggest lowercase)

"jack.smith@gmail.com"

Required: If your organisation uses the email attribute to determine guest identity. Optional: If your organisation uses identifier(s) to determine guest identity.

contact.identifiers

The array of identifiers.

array of strings (suggest title case)

N/A

Required: If your organisation uses identifier(s) to determine guest identity. Optional: If your organisation uses the email attribute to determine Guest identity.

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.gender

The gender of the contact.

string (lowercase)

"male", "female", "rather_not_say"

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": "spinair.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@boxever.com",
        "gender": "male"
    }]
}

Notice

You do not have to include both the contact.identifiers array and contact.email attribute when sending an ADD_CONTACTS event. Your organization either uses the contact.identifiers array or the contact.email attribute to determine the identity of the guest. If your organization uses the contact.email attribute to determine the guest's identity, then the contact.identifiers array is ignored. If your organization uses the contact.identifiers array to determine the guest's identity, then sending the contact.email attribute is optional.

The following are identifier model attributes:

Attribute

Description

Type

Example(s)

Required/optional

provider

The identifier provider.

string

"ProfileSystem"

Required

id

The identifier ID.

string

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

Required

expiryDate

The expiry date of the identifier.

ISO 8601 Date/Time UTC

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

Optional