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 NameDescription
masterLabel
  • Convenient Event name for display purposes only.
  • Limited to 80 characters.
  • Allows spaces and most characters.
  • Generally is the same as the developer name but with spaces and special characters.
developerName
  • Name of the Event used throughout the system. The developer must use these names when submitting events to the beacon.
  • Must be a unique name across all events in the mobile, web, ingest API application.
  • Limited to 80 characters. When used in a data stream, anything longer than 40 characters gets truncated with a hash.
  • developerName is a Salesforce setup entity, so special characters aren’t allowed. Alphanumeric only. Must start with a letter.
  • Non-Salesforce supported developer names are updated to satisfy name requirements. Spaces are replaced with '_', and so on.
categoryEngagement or Profile.

This table shows the basic definition of the event field components.

Field NameRequired or OptionalDescription
dataTypeRequired
  • Three options: Text, DateTime, Number
  • date field values must be ISO8601 format (yyyy-MM-dd'T'HH:mm.SSS'Z')
masterLabelRequired
  • Convenient Event name for display purposes only.
  • Limited to 80 characters.
  • Allows spaces and most characters.
developerNameRequired
  • The name of the Event Field and must be unique across all fields in the same event.
  • Limited to 80 characters.
  • developerName is a Salesforce Setup entity, so special characters aren’t allowed.
  • Alpha numeric only. Must start with a letter.
  • Non-Salesforce supported developer names are updated to satisfy name requirements. That is, spaces are replaced with '_', and so on.
cdp_sys_DeviceManufacturerOptional
  • Derived from user agent string for device manufacturer
  • Apple or Samsung
cdp_sys_IsBrowserOptional
  • Derived from user agent string for browser
  • Boolean
cdp_sys_BrowserNameOptional
  • Derived from user agent string for browser name
  • Such as Safari or Microsoft Edge
cdp_sys_BrowserRenderEngineOptional
  • Derived from browser rendering engine for user agent data
  • WebKit, WebKit/Blink, or EdgeHTML/Blink
cdp_sys_BrowserVendorOptional
  • Derived from user agent string for browser vendor
  • Apple, Samsung, or Microsoft
cdp_sys_BrowserVersionOptional
  • Derived from user agent string for
  • browser version number
  • For example, 17.4.1
cdp_sys_DeviceManufacturerOptional
  • Derived from user agent string for device manufacturer
  • Apple or Samsung
cdp_sys_DeviceModelOptional
  • Derived from user agent string for device model
  • iPhone, Mac, or Galaxy S10
cdp_sys_DeviceTypeOptional
  • Derived from user agent string for device type
  • Smartphone or Desktop
cdp_sys_OSFamilyOptional
  • Derived from user agent string for OS family
  • iOS, macOS, or Android
cdp_sys_OSVendorOptional
  • Derived from user agent string for
  • OS vendor
  • Apple, Google, or Microsoft Corporation
cdp_sys_OSVersionOptional
  • Derived from user agent string for OS version number
  • Such as IOS 17 or Android 12
cdp_sys_UserAgentOptional
  • Derived from raw user agent for user agent data
isDataRequiredOptional
  • Defaults to false when not indicated
  • When true, it indicates that this field must be sent when the parent event is sent to the beacon.
primaryIndexOrderOptional
  • Value must be 1 for the event field that's used as a primary key.
  • Value is important when mapping data stream DLO to DMO entities.
  • Be careful with engagement events because all engagement events are combined into a single DLO. Set all engagement event schemas to the same field as primaryIndexOrder.

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 FieldField typeNotes
deviceIdtextUsually the primary key for profile events.
eventIdtextUsually the primary key for engagement events.
dateTimedatetimeEspecially important for engagement events, which also are used for data partitioning. Supports ISO8601 format only.
eventTypetext 
categorytext 
sessionIdtext 

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.