Sitecore CDP guest data model extensions for REST API

Abstract

Provides attributes for using Sitecore CDP guest data model extensions for REST API (Data model 2.0).

A guest data extension is a collection of schema-less JSON objects that enable you to specify name/value pairs.

The guest data extension collection is linked to a Guest object that enables you to extend your own requirements and custom attributes onto the Guest object that would not normally exist using the predefined standard guest attributes.

Do not use the reserved extension names listed in the following section.

When you name a guest data extension you must use the following naming conventions:

  • Plural form

  • Alphanumeric format [A-Z,a-z,0-9]

  • Use camelCase according to JSON rfc7159

For example, good names for a guest data extension are preferences, propensities, or coreValues. Bad names for a guest data extension are Preference, Propensity, preferences, propensities, or Core-Values.

The following are name/value pairs best practices:

  • Alphanumeric format for attribute names [A-Z,a-z,0-9]

  • Use camelCase according to JSON rfc7159

For example, good names for attribute values are "format", "acceptedTermsAndConditions", or "fifty9". Bad names for attribute values are "AcceptedTermsAndConditions", "Accepted Terms And Conditions".

The following are supported attribute values:

  • String: "Hello"

  • Boolean: true or false

  • Number integer: 9

  • Number double: 99.9

The following are unsupported attribute values:

  • Complex objects: {"description": "A complex object", "enabled":true}

  • Array of primitives: ["Hello", "World"] or [9, 632, 86, 55] or [true, true, false]

Use the following attribute for guest data extensions:

Attribute

Description

Type

Example(s)

key

The key of the data extension.

string

"email"

The following JSON example contains:

{
    "href": "https://{apiEndpoint}/v2/guests/9d94ee11-7043-4b71-980c-a777d00a7b46/extPreferences/0349654D-5DB7-4103-8C9E-88953648EE18",
    "ref": "0349654D-5DB7-4103-8C9E-88953648EE18",
    "createdAt": "2010-03-07T16:15:11.000Z",
    "modifiedAt": "2012-08-23T16:17:16.000Z",
    "key": "email",
    "format": "HTML",
    "acceptedTermsAndConditions": true,
    "shortDescription": "email preferences",
    "longDescription": "The email preferences for this guest"
}
  • The guest data extension collection name is preferences.

  • The guest data extension collection name is always prefixed with ext.

  • The guest data extension collection is in the Uniform Resource Indicator (URI): https://{apiEndpoint}/v2/guests/9d94ee11-7043-4b71-980c-a777d00a7b46/extPreferences

  • The individual guest data extension is in the URI: https://{apiEndpoint}/v2/guests/9d94ee11-7043-4b71-980c-a777d00a7b46/extPreferences/0349654D-5DB7-4103-8C9E-88953648EE18

  • The individual guest data extension has the following custom name/value pairs:

    • format

    • acceptedTermsAndConditions

    • shortDescription

    • longDescription

Reserved data extension names

The following is a list of reserved names for Sitecore CDP standard extensions. You must not use any of the following names for sending guest data extensions:

  • EMAILS

  • REF

  • CLIENT_KEY

  • CREATED_AT

  • MODIFIED_AT

  • FIRST_SEEN

  • LAST_SEEN

  • GUEST_TYPE

  • TITLE

  • FIRST_NAME

  • LAST_NAME

  • GENDER

  • DATE_OF_BIRTH

  • EMAIL

  • PHONE_NUMBERS

  • LANGUAGE

  • STREET

  • CITY

  • COUNTRY

  • POST_CODE

  • NATIONALITY

  • IDENTIFIERS

  • PASSPORT_NUMBER

  • PASSPORT_EXPIRY

  • SUBSCRIPTIONS

  • SMART_SCORES

  • ORDER_SMART_SCORES

  • ACTIVITY_STATUS

  • ARREARS_STATUS

  • CURRENT_INCOME_RANGE

  • CJA_STATUS

  • NET_MONTHLY_PAY

  • PAY_FREQUENCY

  • IS_STAFF_INDICATOR

  • AVERAGE_ACCOUNT_BALANCE

  • PRODUCTS

  • STATE

  • DATA_EXTENSIONS

  • DATA_EXTENSION_MAP

  • IDENTITY_STATUS

  • ZIP_CODE