Send an ADD CONSUMERS event to Sitecore CDP

Abstract

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

Use the ADD_CONSUMERS event to capture the guest's action of adding consumers to the product. Each consumer is associated to a guest. A consumer can be a traveler guest_type (if there is insufficient identity information). Alternatively, a consumer can be a customer guest_type if there is sufficient identity information on the current order and there is a previous order.

To send an ADD_CONSUMERS 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_CONSUMERS"

Required

language

The language captured on each page the guest visited.

string (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)

"boxever.com", "spinair.com"

Required

browser_id

The ID of a browser generated by Sitecore CDP.

string (UUID)

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

Required

consumer

The JSON object that contains the consumer entity data.

JSON object

N/A

consumer.title

The title of the consumer.

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

consumer.firstname

The first name of the consumer.

string (suggest title case)

"Jack"

Required

consumer.lastname

The last name of the consumer.

string (suggest title case)

"Smith"

Required

consumer.dob

The date of birth of the consumer.

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

"1990-08-23T00:00"

Optional

consumer.gender

The gender of the consumer.

string (lower case)

"male", "female", "rather_not_say"

Optional

consumer.nationality

The nationality of the consumer.

string (title case)

"Irish", "Spanish", "Chinese"

Optional

consumer.mobile

The mobile number of the consumer.

string

"+35387123456"

Optional

consumer.reference_id

The reference ID of the consumer.

string

"1", "2"

Optional

consumer.item_id

A list of item IDs of core and dependent products that belong to the consumer.

A JSON array of Strings

["FLIGHT_1", "FLIGHT_2", "BAG_1", "SEAT_1" "HOTEL_1"]

Optional

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

{
    "channel": "WEB",
    "type": "ADD_CONSUMERS",
    "language": "EN",
    "currency": "EUR",
    "page": "payment page",
    "pos": "spinair.com",
    "browser_id": "56860bff-94ba-4d84-aa37-2b5a83d5411b",
    "consumer": [{
        "title": "Mr",
        "firstname": "Jack",
        "lastname": "Smith",
        "dob": "1975-04-23T00:00",
        "gender": "male",
        "mobile": "+353123456",
        "nationality": "Irish",
        "reference_id": "1",
        "item_id": [
            "FLIGHT_1",
            "FLIGHT_2",
            "BAG_1",
            "SEAT_1"
        ]
    }, {
        "title": "Ms",
        "firstname": "Lily",
        "lastname": "Smith",
        "dob": "1980-01-15T00:00",
        "gender": "female",
        "mobile": "+353123458",
        "nationality": "Irish",
        "reference_id": "2",
        "item_id": [
            "FLIGHT_1",
            "FLIGHT_2",
            "BAG_2",
            "SEAT_2"
        ]
    }]
}