Send an ADD CONTACTS event to Sitecore CDP
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 |
---|---|---|---|---|
| The channel captured on each page the guest visited. | string (uppercase) |
| Required |
| The type of event. | string (uppercase) |
| Required |
| The language captured on each page the guest visited. | string (uppercase) (2 letter ISO 639 language code) |
| Required |
| The type of currency. | string (3 letter ISO 4217) |
| Required |
| The name of the webpage the guest visited. | string |
| Required |
| The point of sale (storefront) captured on each page the guest visited. | string (predefined by client) |
| Required |
| The ID of a browser generated by Sitecore CDP. | string (UUID) |
| Required |
| The title of the contact. | string (title case) |
| Required |
| The first name of the contact. | string (suggest title case) |
| Required |
| The last name of the contact. | string (suggest title case) |
| Required |
| The email address of the contact. | string (suggest lowercase) |
| Required: If your organisation uses the email attribute to determine guest identity. Optional: If your organisation uses identifier(s) to determine guest identity. |
| 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. |
| The mobile number of the contact. | string |
| Optional |
| The phone number of the contact. | string |
| Optional |
| The street address of the contact. | array of strings (suggest title case) |
| Optional |
| The city address of the contact. | string (suggest title case) |
| Optional |
| The state address of the contact. | string (suggest title case) |
| Optional |
| The country code of the contact. | string (uppercase) ISO 3166-1 country code |
| Optional |
| The postcode of the contact. | string (suggest uppercase) |
| Optional |
| The date of birth of the contact. | string (ISO 8601 date time) ‘YYYY-MM-DD’T’hh:mm’ |
| Optional |
| The gender of the contact. | string (lowercase) |
| 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 |
---|---|---|---|---|
| The identifier provider. | string |
| Required |
| The identifier ID. | string |
| Required |
| The expiry date of the identifier. | ISO 8601 Date/Time UTC |
| Optional |