Mobile and Web SDK Schema Quick Guide for Data Cloud
A Mobile and Web SDK schema is a collection of event definitions used in Data Cloud. You can find more examples of the schema in the API Developer Guide for Data Cloud.
Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.
Edition Table |
---|
Available in: All Editions supported by Data Cloud. See Data Cloud edition availability. |
When you upload a JSON schema for your mobile or web application connector, populate the six mandatory fields. If these fields are empty or missing in your JSON file, an error message appears and you’re asked to reupload the schema with the correct data.
- deviceId
- eventId
- dateTime
- eventType
- category
- sessionId
For more information on how JSON data is structured, see the Data Cloud section of the Salesforce Interactions SDK.
Engagement and profile events are stored in the same structure. The event must contain a masterLabel, developerName, and category.
Field Name | Description |
---|---|
masterLabel |
|
developerName |
|
category | Engagement or Profile. |
This table shows the basic definition of the event field components.
Field Name | Required or Optional | Description |
---|---|---|
dataType | Required |
|
masterLabel | Required |
|
developerName | Required |
|
cdp_sys_DeviceManufacturer | Optional |
|
cdp_sys_IsBrowser | Optional |
|
cdp_sys_BrowserName | Optional |
|
cdp_sys_BrowserRenderEngine | Optional |
|
cdp_sys_BrowserVendor | Optional |
|
cdp_sys_BrowserVersion | Optional |
|
cdp_sys_DeviceManufacturer | Optional |
|
cdp_sys_DeviceModel | Optional |
|
cdp_sys_DeviceType | Optional |
|
cdp_sys_OSFamily | Optional |
|
cdp_sys_OSVendor | Optional |
|
cdp_sys_OSVersion | Optional |
|
cdp_sys_UserAgent | Optional |
|
isDataRequired | Optional |
|
primaryIndexOrder | Optional |
|
There are six specially named event fields that must be included for all engagement and profile event schemas. The schema fails to be imported without these field developer names. All field names are text except for dataTime.
Event Field | Field type | Notes |
---|---|---|
deviceId | text | Usually the primary key for profile events. |
eventId | text | Usually the primary key for engagement events. |
dateTime | datetime | Especially important for engagement events, which also are used for data partitioning. Supports ISO8601 format only. |
eventType | text | |
category | text | |
sessionId | text |
Schemas must be backwards-compatible. After a schema is uploaded, the user:
- Can't update their schema by adding a new required field (breaks backwards compatibility).
- Can't update or rename any existing field.
- Can add new optional (isDataRequired=false) fields to an existing schema.