@@ -4,8 +4,9 @@ export const dtm_fid: InputField = {
4
4
label : 'Form ID' ,
5
5
description : 'Form ID used in Epsilon’s system to identify app visits vs. conversions.' ,
6
6
type : 'string' ,
7
- required : true
8
- }
7
+ required : true ,
8
+ default : { '@path' : '$.properties.form_id' }
9
+ }
9
10
10
11
export const dtm_promo_id : InputField = {
11
12
label : 'Promo ID' ,
@@ -84,12 +85,14 @@ export const identifiers: InputField = {
84
85
} ,
85
86
dtm_email_hash : {
86
87
label : 'Email address' ,
87
- description : 'Accepts hashed or unhashed emails. Segment will ensure that a non hashed email is hashed before being sent to Epsilon' ,
88
+ description :
89
+ 'Accepts hashed or unhashed emails. Segment will ensure that a non hashed email is hashed before being sent to Epsilon' ,
88
90
type : 'string'
89
91
} ,
90
92
dtm_mobile_hash : {
91
93
label : 'Mobile Hash' ,
92
- description : 'Accepts hashed or unhashed mobile numbers. Segment will ensure that a non hashed mobile number is hashed before being sent to Epsilon' ,
94
+ description :
95
+ 'Accepts hashed or unhashed mobile numbers. Segment will ensure that a non hashed mobile number is hashed before being sent to Epsilon' ,
93
96
type : 'string'
94
97
} ,
95
98
dtm_user_id : {
@@ -128,11 +131,12 @@ export const dtmc_department: InputField = {
128
131
default : { '@path' : '$.properties.department' } ,
129
132
depends_on : {
130
133
conditions : [
131
- {
132
- fieldKey : 'dtm_event' ,
133
- operator : 'is' ,
134
- value : [ 'custom' , 'department' , 'category' , 'subcategory' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
135
- } ]
134
+ {
135
+ fieldKey : 'dtm_event' ,
136
+ operator : 'is' ,
137
+ value : [ 'custom' , 'department' , 'category' , 'subcategory' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
138
+ }
139
+ ]
136
140
}
137
141
}
138
142
@@ -143,11 +147,12 @@ export const dtmc_category: InputField = {
143
147
default : { '@path' : '$.properties.category' } ,
144
148
depends_on : {
145
149
conditions : [
146
- {
147
- fieldKey : 'dtm_event' ,
148
- operator : 'is' ,
149
- value : [ 'custom' , 'category' , 'subcategory' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
150
- } ]
150
+ {
151
+ fieldKey : 'dtm_event' ,
152
+ operator : 'is' ,
153
+ value : [ 'custom' , 'category' , 'subcategory' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
154
+ }
155
+ ]
151
156
}
152
157
}
153
158
@@ -158,26 +163,28 @@ export const dtmc_sub_category: InputField = {
158
163
default : { '@path' : '$.properties.sub_category' } ,
159
164
depends_on : {
160
165
conditions : [
161
- {
162
- fieldKey : 'dtm_event' ,
163
- operator : 'is' ,
164
- value : [ 'custom' , 'subcategory' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
165
- } ]
166
+ {
167
+ fieldKey : 'dtm_event' ,
168
+ operator : 'is' ,
169
+ value : [ 'custom' , 'subcategory' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
170
+ }
171
+ ]
166
172
}
167
173
}
168
174
169
175
export const dtmc_product_id : InputField = {
170
- label : 'Product ID' ,
176
+ label : 'Product ID' ,
171
177
description : 'Unique identifier for the product' ,
172
178
type : 'string' ,
173
179
default : { '@path' : '$.properties.product_id' } ,
174
180
depends_on : {
175
181
conditions : [
176
- {
177
- fieldKey : 'dtm_event' ,
178
- operator : 'is' ,
179
- value : [ 'custom' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
180
- } ]
182
+ {
183
+ fieldKey : 'dtm_event' ,
184
+ operator : 'is' ,
185
+ value : [ 'custom' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
186
+ }
187
+ ]
181
188
}
182
189
}
183
190
@@ -188,11 +195,12 @@ export const dtmc_brand: InputField = {
188
195
default : { '@path' : '$.properties.brand' } ,
189
196
depends_on : {
190
197
conditions : [
191
- {
192
- fieldKey : 'dtm_event' ,
193
- operator : 'is' ,
194
- value : [ 'custom' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
195
- } ]
198
+ {
199
+ fieldKey : 'dtm_event' ,
200
+ operator : 'is' ,
201
+ value : [ 'custom' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
202
+ }
203
+ ]
196
204
}
197
205
}
198
206
@@ -203,11 +211,12 @@ export const dtmc_upc: InputField = {
203
211
default : { '@path' : '$.properties.upc' } ,
204
212
depends_on : {
205
213
conditions : [
206
- {
207
- fieldKey : 'dtm_event' ,
208
- operator : 'is' ,
209
- value : [ 'custom' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
210
- } ]
214
+ {
215
+ fieldKey : 'dtm_event' ,
216
+ operator : 'is' ,
217
+ value : [ 'custom' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
218
+ }
219
+ ]
211
220
}
212
221
}
213
222
@@ -218,11 +227,12 @@ export const dtmc_mpn: InputField = {
218
227
default : { '@path' : '$.properties.mpn' } ,
219
228
depends_on : {
220
229
conditions : [
221
- {
222
- fieldKey : 'dtm_event' ,
223
- operator : 'is' ,
224
- value : [ 'custom' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
225
- } ]
230
+ {
231
+ fieldKey : 'dtm_event' ,
232
+ operator : 'is' ,
233
+ value : [ 'custom' , 'product' , 'addFavorites' , 'addSavedList' , 'cart' ]
234
+ }
235
+ ]
226
236
}
227
237
}
228
238
@@ -233,11 +243,12 @@ export const dtmc_transaction_id: InputField = {
233
243
default : { '@path' : '$.properties.order_id' } ,
234
244
depends_on : {
235
245
conditions : [
236
- {
237
- fieldKey : 'dtm_event' ,
238
- operator : 'is' ,
239
- value : [ 'custom' , 'conversion' ]
240
- } ]
246
+ {
247
+ fieldKey : 'dtm_event' ,
248
+ operator : 'is' ,
249
+ value : [ 'custom' , 'conversion' ]
250
+ }
251
+ ]
241
252
}
242
253
}
243
254
@@ -251,45 +262,47 @@ export const dtm_conv_val: InputField = {
251
262
} ,
252
263
depends_on : {
253
264
conditions : [
254
- {
255
- fieldKey : 'dtm_event' ,
256
- operator : 'is' ,
257
- value : [ 'custom' , 'conversion' ]
258
- } ]
265
+ {
266
+ fieldKey : 'dtm_event' ,
267
+ operator : 'is' ,
268
+ value : [ 'custom' , 'conversion' ]
269
+ }
270
+ ]
259
271
}
260
272
}
261
273
262
- export const dtm_items : InputField = {
274
+ export const dtm_items : InputField = {
263
275
label : 'Items Purchased' ,
264
276
description : 'An array of all items in the conversion.' ,
265
- type : 'object' ,
277
+ type : 'object' ,
266
278
multiple : true ,
267
279
additionalProperties : true ,
268
280
properties : {
269
- product_id : {
270
- label : 'Product ID' ,
271
- description : 'Unique identifier / SKU for the product.' ,
272
- type : 'string'
273
- } ,
274
- item_amount : {
275
- label : 'Item Amount' ,
276
- description : 'Unit cost / price for 1 unit of the item.' ,
277
- type : 'number'
278
- } ,
279
- item_quantity : {
280
- label : 'Item Quantity' ,
281
- description : 'number of SKU items in the transaction.' ,
282
- type : 'integer'
283
- } ,
284
- item_discount : {
285
- label : 'Item Discount' ,
286
- description : 'Discount value from the original amount.' ,
287
- type : 'number'
288
- }
281
+ product_id : {
282
+ label : 'Product ID' ,
283
+ description : 'Unique identifier / SKU for the product.' ,
284
+ type : 'string'
285
+ } ,
286
+ item_amount : {
287
+ label : 'Item Amount' ,
288
+ description : 'Unit cost / price for 1 unit of the item.' ,
289
+ type : 'number'
290
+ } ,
291
+ item_quantity : {
292
+ label : 'Item Quantity' ,
293
+ description : 'number of SKU items in the transaction.' ,
294
+ type : 'integer'
295
+ } ,
296
+ item_discount : {
297
+ label : 'Item Discount' ,
298
+ description : 'Discount value from the original amount.' ,
299
+ type : 'number'
300
+ }
289
301
} ,
290
302
default : {
291
303
'@arrayPath' : [
292
- '$.properties.products' , {
304
+ '$.properties.products' ,
305
+ {
293
306
product_id : { '@path' : '$.product_id' } ,
294
307
price : { '@path' : '$.price' } ,
295
308
quantity : { '@path' : '$.quantity' } ,
@@ -299,11 +312,12 @@ export const dtm_items : InputField = {
299
312
} ,
300
313
depends_on : {
301
314
conditions : [
302
- {
303
- fieldKey : 'dtm_event' ,
304
- operator : 'is' ,
305
- value : [ 'custom' , 'conversion' ]
306
- } ]
315
+ {
316
+ fieldKey : 'dtm_event' ,
317
+ operator : 'is' ,
318
+ value : [ 'custom' , 'conversion' ]
319
+ }
320
+ ]
307
321
}
308
322
}
309
323
@@ -317,16 +331,17 @@ export const dtm_conv_curr: InputField = {
317
331
} ,
318
332
depends_on : {
319
333
conditions : [
320
- {
321
- fieldKey : 'dtm_event' ,
322
- operator : 'is' ,
323
- value : [ 'custom' , 'conversion' ]
324
- } ]
334
+ {
335
+ fieldKey : 'dtm_event' ,
336
+ operator : 'is' ,
337
+ value : [ 'custom' , 'conversion' ]
338
+ }
339
+ ]
325
340
}
326
341
}
327
342
328
343
export const dtmc_conv_type : InputField = {
329
- label : 'Order Type' ,
344
+ label : 'Order Type' ,
330
345
description : 'Differentiate between types of online purchases (Delivery, Pickup, etc.)' ,
331
346
type : 'string' ,
332
347
default : { '@path' : '$.properties.order_type' } ,
@@ -335,11 +350,12 @@ export const dtmc_conv_type: InputField = {
335
350
} ,
336
351
depends_on : {
337
352
conditions : [
338
- {
339
- fieldKey : 'dtm_event' ,
340
- operator : 'is' ,
341
- value : [ 'custom' , 'conversion' ]
342
- } ]
353
+ {
354
+ fieldKey : 'dtm_event' ,
355
+ operator : 'is' ,
356
+ value : [ 'custom' , 'conversion' ]
357
+ }
358
+ ]
343
359
}
344
360
}
345
361
@@ -353,11 +369,12 @@ export const dtmc_conv_store_location: InputField = {
353
369
} ,
354
370
depends_on : {
355
371
conditions : [
356
- {
357
- fieldKey : 'dtm_event' ,
358
- operator : 'is' ,
359
- value : [ 'custom' , 'conversion' ]
360
- } ]
372
+ {
373
+ fieldKey : 'dtm_event' ,
374
+ operator : 'is' ,
375
+ value : [ 'custom' , 'conversion' ]
376
+ }
377
+ ]
361
378
}
362
379
}
363
380
@@ -389,7 +406,7 @@ export const deviceType: InputField = {
389
406
label : 'Device Type' ,
390
407
description : 'Type of the device (e.g., iOS, Android).' ,
391
408
type : 'string' ,
392
- required : true ,
409
+ required : true ,
393
410
choices : [
394
411
{ label : 'iOS' , value : 'ios' } ,
395
412
{ label : 'Android' , value : 'android' }
@@ -398,12 +415,12 @@ export const deviceType: InputField = {
398
415
}
399
416
400
417
export const standardFields = {
401
- id,
418
+ id,
402
419
appId,
403
420
dtm_event,
404
- version,
421
+ version,
405
422
dtm_fid,
406
423
dtm_promo_id,
407
424
identifiers,
408
425
deviceType
409
- }
426
+ }
0 commit comments