Custom Event Schema

Use the event data models provided by the Engagement Mobile SDK for cart event, catalog event, and order event to use the unified data model across Salesforce. You can create and capture a custom event.
Define the custom event in the Mobile Connector schema:
Source Event Property Target Schema Developer Name Field Type Description CIM Object / Attribute
<Automatically Assigned> eventId text Required. Typically the primary key for the engagement events. -
<Automatically Assigned> dateTime datetime Required. Used for data partitioning for engagement events. ISO8601 supported format. -
name eventType = <what the user defined in name property> text Required. The name defined in property suffixed with eventType. Example: The name Custom Event is transformed to: "eventType": "Custom Event". -
<Automatically Assigned> sessionId text Required. The identifier of the session. -
<Automatically Assigned> deviceId text Required. Typically the primary key for profile events. -
<Automatically Assigned> category = "Engagement" text Required. Possible values are:
  • Engagement
  • Profile
-
<Automatically Assigned> channel = "mobile" text The SDK event channel. For Engagement Mobile SDK the value is mobile. -
<user defined attributes array>

Attributes array can contain nested arrays.

Note

<attributes as defined by user> <user defined> Custom Event -
<Automatically Assigned when Location Tracking is allowed> longitude number The longitudinal coordinate in decimal degrees reported by the device at the time the event was captured. Device Longitude
<Automatically Assigned when Location Tracking is allowed> latitude number The latitudinal coordinate in decimal degrees reported by the device at the time the event was captured. Device Latitude

If eventType isn’t provided but name is then eventType defaults to the value of name. For example, the schema could look like:

1{
2  "masterLabel": "CustomEvent",  
3  "developerName": "Custom Event",  
4  "category": "Engagement",  
5  "externalDataTranFields": [
6    {
7      "masterLabel": "category",     
8      "developerName": "category",      
9      "dataType": "Text",      
10      "isDataRequired": true    
11    },    
12    {
13      "masterLabel": "channel",      
14      "developerName": "channel",      
15      "dataType": "Text",      
16      "isDataRequired": false    
17    },    
18    {
19      "masterLabel": "dateTime",      
20      "developerName": "dateTime",      
21      "dataType": "DateTime",      
22      "isDataRequired": true    
23    },    
24    {
25      "masterLabel": "deviceId",      
26      "developerName": "deviceId",      
27      "dataType": "Text",      
28      "isDataRequired": true,      
29      "primaryIndexOrder": 1    
30    },    
31    {
32      "masterLabel": "eventId",      
33      "developerName": "eventId",      
34      "dataType": "Text",      
35      "isDataRequired": true    
36    },    
37    {
38      "masterLabel": "eventType",      
39      "developerName": "eventType",      
40      "dataType": "Text",      
41      "isDataRequired": true    
42    },    
43    {
44      "masterLabel": "latitude",      
45      "developerName": "latitude",      
46      "dataType": "Number",      
47      "isDataRequired": false    
48    },    
49    {
50      "masterLabel": "longitude",      
51      "developerName": "longitude",      
52      "dataType": "Number",      
53      "isDataRequired": false    
54    },        
55    {
56      "masterLabel": "sessionId",      
57      "developerName": "sessionId",      
58      "dataType": "Text",      
59      "isDataRequired": true    
60    },
61    {
62      "masterLabel": "giftMessage",      
63      "developerName": "giftMessage",      
64      "dataType": "Text",      
65      "isDataRequired": false   
66    },
67    {
68      "masterLabel": "giftWrap",      
69      "developerName": "giftWrap",      
70      "dataType": "Text",      
71      "isDataRequired": false   
72    },
73    {
74      "masterLabel": "giftWrapOptionsPaperColor",      
75      "developerName": "giftOptionsPaperColor",      
76      "dataType": "Text",      
77      "isDataRequired": false   
78    },
79    {
80      "masterLabel": "giftWrapOptionsRibbon",      
81      "developerName": "giftOptionsRibbon",      
82      "dataType": "bool",      
83      "isDataRequired": false   
84    }
85  ]
86}