@metarouter/ajs-starter-kit 1.0.152 → 1.0.153

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1414 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "default": {
4
+ "filters": [
5
+ {
6
+ "byEventNames": {
7
+ "action": "allow",
8
+ "events": [
9
+ ""
10
+ ]
11
+ }
12
+ }
13
+ ]
14
+ },
15
+ "eventSpecific": {
16
+ "identify": {
17
+ "mappings": [
18
+ {
19
+ "inputKey": "traits.phone",
20
+ "outputKey": "phone"
21
+ },
22
+ {
23
+ "inputKey": "traits.email",
24
+ "outputKey": "email"
25
+ },
26
+ {
27
+ "inputKey": "userId",
28
+ "outputKey": "clientUserId"
29
+ },
30
+ {
31
+ "inputKey": "input",
32
+ "outputKey": "customIdentifiers",
33
+ "transforms": [
34
+ {
35
+ "expression": {
36
+ "lang": "lua",
37
+ "body": "return {\n { name = \"username\", value = input.traits and input.traits.username or nil }\n}"
38
+ }
39
+ }
40
+ ]
41
+ }
42
+ ]
43
+ },
44
+ "product_viewed": {
45
+ "mappings": [
46
+ {
47
+ "inputKey": "traits.email",
48
+ "outputKey": "user.email"
49
+ },
50
+ {
51
+ "inputKey": "traits.phone",
52
+ "outputKey": "user.phone"
53
+ },
54
+ {
55
+ "inputKey": "input",
56
+ "outputKey": "items",
57
+ "transforms": [
58
+ {
59
+ "expression": {
60
+ "lang": "lua",
61
+ "body": "return\n {\n {\n productId = input.properties.product_id,\n productVariantId = input.properties.sku,\n productImage = input.properties.image_url,\n productUrl = input.properties.url,\n name = input.properties.name,\n price = { { value = input.properties.price, currency = UPPER(input.properties.currency) } },\n quantity = input.properties.quantity\n }\n }"
62
+ }
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "inputKey": "input",
68
+ "outputKey": "occurredAt",
69
+ "transforms": [
70
+ {
71
+ "expression": {
72
+ "lang": "lua",
73
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
74
+ }
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ "inputKey": "userId",
80
+ "outputKey": "user.externalIdentifiers.clientUserId"
81
+ },
82
+ {
83
+ "inputKey": "input",
84
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
85
+ "transforms": [
86
+ {
87
+ "expression": {
88
+ "lang": "lua",
89
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
90
+ }
91
+ }
92
+ ]
93
+ }
94
+ ]
95
+ },
96
+ "order_completed": {
97
+ "mappings": [
98
+ {
99
+ "inputKey": "traits.phone",
100
+ "outputKey": "user.phone"
101
+ },
102
+ {
103
+ "inputKey": "traits.email",
104
+ "outputKey": "user.email"
105
+ },
106
+ {
107
+ "inputKey": "input",
108
+ "outputKey": "items",
109
+ "transforms": [
110
+ {
111
+ "expression": {
112
+ "lang": "lua",
113
+ "body": "return MAP(input.properties.products, function(p)\n return {\n productId = p.product_id,\n productVariantId = p.sku,\n productImage = p.image_url,\n productUrl = p.url,\n name = p.name,\n price = { { value = p.price, currency = UPPER(p.currency) } },\n quantity = p.quantity,\n }\nend)"
114
+ }
115
+ }
116
+ ]
117
+ },
118
+ {
119
+ "inputKey": "properties.order_id",
120
+ "outputKey": "orderId"
121
+ },
122
+ {
123
+ "inputKey": "input",
124
+ "outputKey": "occurredAt",
125
+ "transforms": [
126
+ {
127
+ "expression": {
128
+ "lang": "lua",
129
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
130
+ }
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ "inputKey": "userId",
136
+ "outputKey": "user.externalIdentifiers.clientUserId"
137
+ },
138
+ {
139
+ "inputKey": "input",
140
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
141
+ "transforms": [
142
+ {
143
+ "expression": {
144
+ "lang": "lua",
145
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
146
+ }
147
+ }
148
+ ]
149
+ }
150
+ ]
151
+ },
152
+ "product_added": {
153
+ "mappings": [
154
+ {
155
+ "inputKey": "traits.phone",
156
+ "outputKey": "user.phone"
157
+ },
158
+ {
159
+ "inputKey": "traits.email",
160
+ "outputKey": "user.email"
161
+ },
162
+ {
163
+ "inputKey": "input",
164
+ "outputKey": "items",
165
+ "transforms": [
166
+ {
167
+ "expression": {
168
+ "lang": "lua",
169
+ "body": "return\n {\n {\n productId = input.properties.product_id,\n productVariantId = input.properties.sku,\n productImage = input.properties.image_url,\n productUrl = input.properties.url,\n name = input.properties.name,\n price = { { value = input.properties.price } },\n quantity = input.properties.quantity\n }\n }"
170
+ }
171
+ }
172
+ ]
173
+ },
174
+ {
175
+ "inputKey": "input",
176
+ "outputKey": "occurredAt",
177
+ "transforms": [
178
+ {
179
+ "expression": {
180
+ "lang": "lua",
181
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
182
+ }
183
+ }
184
+ ]
185
+ },
186
+ {
187
+ "inputKey": "userId",
188
+ "outputKey": "user.externalIdentifiers.clientUserId"
189
+ },
190
+ {
191
+ "inputKey": "input",
192
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
193
+ "transforms": [
194
+ {
195
+ "expression": {
196
+ "lang": "lua",
197
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
198
+ }
199
+ }
200
+ ]
201
+ }
202
+ ]
203
+ },
204
+ "page": {
205
+ "mappings": [
206
+ {
207
+ "inputKey": "traits.phone",
208
+ "outputKey": "user.phone"
209
+ },
210
+ {
211
+ "inputKey": "traits.email",
212
+ "outputKey": "user.email"
213
+ },
214
+ {
215
+ "inputKey": "userId",
216
+ "outputKey": "user.externalIdentifiers.clientUserId"
217
+ },
218
+ {
219
+ "inputKey": "type",
220
+ "outputKey": "type"
221
+ },
222
+ {
223
+ "inputKey": "properties.path",
224
+ "outputKey": "properties.path"
225
+ },
226
+ {
227
+ "inputKey": "properties.referrer",
228
+ "outputKey": "properties.referrer"
229
+ },
230
+ {
231
+ "inputKey": "properties.search",
232
+ "outputKey": "properties.search"
233
+ },
234
+ {
235
+ "inputKey": "properties.title",
236
+ "outputKey": "properties.title"
237
+ },
238
+ {
239
+ "inputKey": "properties.url",
240
+ "outputKey": "properties.url"
241
+ },
242
+ {
243
+ "inputKey": "messageId",
244
+ "outputKey": "properties.messageId"
245
+ },
246
+ {
247
+ "inputKey": "input",
248
+ "outputKey": "occurredAt",
249
+ "transforms": [
250
+ {
251
+ "expression": {
252
+ "lang": "lua",
253
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
254
+ }
255
+ }
256
+ ]
257
+ },
258
+ {
259
+ "inputKey": "input",
260
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
261
+ "transforms": [
262
+ {
263
+ "expression": {
264
+ "lang": "lua",
265
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
266
+ }
267
+ }
268
+ ]
269
+ }
270
+ ]
271
+ },
272
+ "checkout_started": {
273
+ "mappings": [
274
+ {
275
+ "inputKey": "traits.phone",
276
+ "outputKey": "user.phone"
277
+ },
278
+ {
279
+ "inputKey": "traits.email",
280
+ "outputKey": "user.email"
281
+ },
282
+ {
283
+ "inputKey": "userId",
284
+ "outputKey": "user.externalIdentifiers.clientUserId"
285
+ },
286
+ {
287
+ "inputKey": "event",
288
+ "outputKey": "type"
289
+ },
290
+ {
291
+ "inputKey": "messageId",
292
+ "outputKey": "properties.messageId"
293
+ },
294
+ {
295
+ "inputKey": "input",
296
+ "outputKey": "properties.products",
297
+ "transforms": [
298
+ {
299
+ "expression": {
300
+ "lang": "lua",
301
+ "body": "return MAP(input.properties.products, function(p)\n return {\n product_id = p.product_id,\n sku = p.sku,\n category = p.category,\n name = p.name,\n brand = p.brand,\n variant = p.variant,\n price = p.price,\n quantity = p.quantity or 1,\n coupon = p.coupon,\n position = p.position,\n url = p.url,\n image_url = p.image_url\n }\nend)"
302
+ }
303
+ }
304
+ ]
305
+ },
306
+ {
307
+ "inputKey": "properties.affiliation",
308
+ "outputKey": "properties.affiliation"
309
+ },
310
+ {
311
+ "inputKey": "properties.coupon",
312
+ "outputKey": "properties.coupon"
313
+ },
314
+ {
315
+ "inputKey": "properties.currency",
316
+ "outputKey": "properties.currency",
317
+ "transforms": [
318
+ {
319
+ "modifyString": "uppercase"
320
+ }
321
+ ]
322
+ },
323
+ {
324
+ "inputKey": "properties.discount",
325
+ "outputKey": "properties.discount"
326
+ },
327
+ {
328
+ "inputKey": "properties.order_id",
329
+ "outputKey": "properties.order_id"
330
+ },
331
+ {
332
+ "inputKey": "properties.revenue",
333
+ "outputKey": "properties.revenue"
334
+ },
335
+ {
336
+ "inputKey": "properties.shipping",
337
+ "outputKey": "properties.shipping"
338
+ },
339
+ {
340
+ "inputKey": "properties.tax",
341
+ "outputKey": "properties.tax"
342
+ },
343
+ {
344
+ "inputKey": "properties.value",
345
+ "outputKey": "properties.value"
346
+ },
347
+ {
348
+ "inputKey": "input",
349
+ "outputKey": "occurredAt",
350
+ "transforms": [
351
+ {
352
+ "expression": {
353
+ "lang": "lua",
354
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
355
+ }
356
+ }
357
+ ]
358
+ },
359
+ {
360
+ "inputKey": "input",
361
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
362
+ "transforms": [
363
+ {
364
+ "expression": {
365
+ "lang": "lua",
366
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
367
+ }
368
+ }
369
+ ]
370
+ }
371
+ ]
372
+ },
373
+ "product_list_viewed": {
374
+ "mappings": [
375
+ {
376
+ "inputKey": "traits.phone",
377
+ "outputKey": "user.phone"
378
+ },
379
+ {
380
+ "inputKey": "traits.email",
381
+ "outputKey": "user.email"
382
+ },
383
+ {
384
+ "inputKey": "userId",
385
+ "outputKey": "user.externalIdentifiers.clientUserId"
386
+ },
387
+ {
388
+ "inputKey": "event",
389
+ "outputKey": "type"
390
+ },
391
+ {
392
+ "inputKey": "messageId",
393
+ "outputKey": "properties.messageId"
394
+ },
395
+ {
396
+ "inputKey": "properties.category",
397
+ "outputKey": "properties.category"
398
+ },
399
+ {
400
+ "inputKey": "properties.list_id",
401
+ "outputKey": "properties.list_id"
402
+ },
403
+ {
404
+ "inputKey": "input",
405
+ "outputKey": "properties.products",
406
+ "transforms": [
407
+ {
408
+ "expression": {
409
+ "lang": "lua",
410
+ "body": "return MAP(input.properties.products, function(p)\n return{\n product_id = p.product_id,\n sku = p.sku,\n category = p.category,\n name = p.name,\n brand = p.brand,\n variant = p.variant,\n price = p.price,\n quantity = p.quantity or 1,\n coupon = p.coupon,\n position = p.position,\n url = p.url,\n image_url = p.image_url\n }\nend)"
411
+ }
412
+ }
413
+ ]
414
+ },
415
+ {
416
+ "inputKey": "input",
417
+ "outputKey": "occurredAt",
418
+ "transforms": [
419
+ {
420
+ "expression": {
421
+ "lang": "lua",
422
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
423
+ }
424
+ }
425
+ ]
426
+ },
427
+ {
428
+ "inputKey": "input",
429
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
430
+ "transforms": [
431
+ {
432
+ "expression": {
433
+ "lang": "lua",
434
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
435
+ }
436
+ }
437
+ ]
438
+ }
439
+ ]
440
+ },
441
+ "cart_viewed": {
442
+ "mappings": [
443
+ {
444
+ "inputKey": "traits.phone",
445
+ "outputKey": "user.phone"
446
+ },
447
+ {
448
+ "inputKey": "traits.email",
449
+ "outputKey": "user.email"
450
+ },
451
+ {
452
+ "inputKey": "userId",
453
+ "outputKey": "user.externalIdentifiers.clientUserId"
454
+ },
455
+ {
456
+ "inputKey": "event",
457
+ "outputKey": "type"
458
+ },
459
+ {
460
+ "inputKey": "messageId",
461
+ "outputKey": "properties.messageId"
462
+ },
463
+ {
464
+ "inputKey": "properties.cart_id",
465
+ "outputKey": "properties.cart_id"
466
+ },
467
+ {
468
+ "inputKey": "properties.currency",
469
+ "outputKey": "properties.currency",
470
+ "transforms": [
471
+ {
472
+ "modifyString": "uppercase"
473
+ }
474
+ ]
475
+ },
476
+ {
477
+ "inputKey": "input",
478
+ "outputKey": "properties.products",
479
+ "transforms": [
480
+ {
481
+ "expression": {
482
+ "lang": "lua",
483
+ "body": "return MAP(input.properties.products, function(p)\n return {\n product_id = p.product_id,\n sku = p.sku,\n category = p.category,\n name = p.name,\n brand = p.brand,\n variant = p.variant,\n price = p.price,\n quantity = p.quantity or 1,\n coupon = p.coupon,\n position = p.position,\n url = p.url,\n image_url = p.image_url\n }\n end)"
484
+ }
485
+ }
486
+ ]
487
+ },
488
+ {
489
+ "inputKey": "input",
490
+ "outputKey": "occurredAt",
491
+ "transforms": [
492
+ {
493
+ "expression": {
494
+ "lang": "lua",
495
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
496
+ }
497
+ }
498
+ ]
499
+ },
500
+ {
501
+ "inputKey": "input",
502
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
503
+ "transforms": [
504
+ {
505
+ "expression": {
506
+ "lang": "lua",
507
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
508
+ }
509
+ }
510
+ ]
511
+ }
512
+ ]
513
+ },
514
+ "order_updated": {
515
+ "mappings": [
516
+ {
517
+ "inputKey": "traits.phone",
518
+ "outputKey": "user.phone"
519
+ },
520
+ {
521
+ "inputKey": "traits.email",
522
+ "outputKey": "user.email"
523
+ },
524
+ {
525
+ "inputKey": "userId",
526
+ "outputKey": "user.externalIdentifiers.clientUserId"
527
+ },
528
+ {
529
+ "inputKey": "event",
530
+ "outputKey": "type"
531
+ },
532
+ {
533
+ "inputKey": "messageId",
534
+ "outputKey": "properties.messageId"
535
+ },
536
+ {
537
+ "inputKey": "properties.affiliation",
538
+ "outputKey": "properties.affiliation"
539
+ },
540
+ {
541
+ "inputKey": "properties.coupon",
542
+ "outputKey": "properties.coupon"
543
+ },
544
+ {
545
+ "inputKey": "properties.currency",
546
+ "outputKey": "properties.currency",
547
+ "transforms": [
548
+ {
549
+ "modifyString": "uppercase"
550
+ }
551
+ ]
552
+ },
553
+ {
554
+ "inputKey": "properties.discount",
555
+ "outputKey": "properties.discount"
556
+ },
557
+ {
558
+ "inputKey": "properties.order_id",
559
+ "outputKey": "properties.order_id"
560
+ },
561
+ {
562
+ "inputKey": "input",
563
+ "outputKey": "properties.products",
564
+ "transforms": [
565
+ {
566
+ "expression": {
567
+ "lang": "lua",
568
+ "body": "return MAP(input.properties.products, function(p)\n return {\n product_id = p.product_id,\n sku = p.sku,\n category = p.category,\n name = p.name,\n brand = p.brand,\n variant = p.variant,\n price = p.price,\n quantity = p.quantity or 1,\n coupon = p.coupon,\n position = p.position,\n url = p.url,\n image_url = p.image_url\n}\nend)"
569
+ }
570
+ }
571
+ ]
572
+ },
573
+ {
574
+ "inputKey": "properties.revenue",
575
+ "outputKey": "properties.revenue"
576
+ },
577
+ {
578
+ "inputKey": "properties.shipping",
579
+ "outputKey": "properties.shipping"
580
+ },
581
+ {
582
+ "inputKey": "properties.tax",
583
+ "outputKey": "properties.tax"
584
+ },
585
+ {
586
+ "inputKey": "properties.total",
587
+ "outputKey": "properties.total"
588
+ },
589
+ {
590
+ "inputKey": "input",
591
+ "outputKey": "occurredAt",
592
+ "transforms": [
593
+ {
594
+ "expression": {
595
+ "lang": "lua",
596
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
597
+ }
598
+ }
599
+ ]
600
+ },
601
+ {
602
+ "inputKey": "input",
603
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
604
+ "transforms": [
605
+ {
606
+ "expression": {
607
+ "lang": "lua",
608
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
609
+ }
610
+ }
611
+ ]
612
+ }
613
+ ]
614
+ },
615
+ "order_refunded": {
616
+ "mappings": [
617
+ {
618
+ "inputKey": "traits.phone",
619
+ "outputKey": "user.phone"
620
+ },
621
+ {
622
+ "inputKey": "traits.email",
623
+ "outputKey": "user.email"
624
+ },
625
+ {
626
+ "inputKey": "userId",
627
+ "outputKey": "user.externalIdentifiers.clientUserId"
628
+ },
629
+ {
630
+ "inputKey": "event",
631
+ "outputKey": "type"
632
+ },
633
+ {
634
+ "inputKey": "messageId",
635
+ "outputKey": "properties.messageId"
636
+ },
637
+ {
638
+ "inputKey": "properties.affiliation",
639
+ "outputKey": "properties.affiliation"
640
+ },
641
+ {
642
+ "inputKey": "properties.checkout_id",
643
+ "outputKey": "properties.checkout_id"
644
+ },
645
+ {
646
+ "inputKey": "properties.coupon",
647
+ "outputKey": "properties.coupon"
648
+ },
649
+ {
650
+ "inputKey": "properties.currency",
651
+ "outputKey": "properties.currency",
652
+ "transforms": [
653
+ {
654
+ "modifyString": "uppercase"
655
+ }
656
+ ]
657
+ },
658
+ {
659
+ "inputKey": "properties.discount",
660
+ "outputKey": "properties.discount"
661
+ },
662
+ {
663
+ "inputKey": "properties.order_id",
664
+ "outputKey": "properties.order_id"
665
+ },
666
+ {
667
+ "inputKey": "input",
668
+ "outputKey": "properties.products",
669
+ "transforms": [
670
+ {
671
+ "expression": {
672
+ "body": "return MAP(input.properties.products, function(p)\n return {\n product_id = p.product_id,\n sku = p.sku,\n category = p.category,\n name = p.name,\n brand = p.brand,\n variant = p.variant,\n price = p.price,\n quantity = p.quantity or 1,\n coupon = p.coupon,\n position = p.position,\n url = p.url,\n image_url = p.image_url\n }\n end)",
673
+ "lang": "lua"
674
+ }
675
+ }
676
+ ]
677
+ },
678
+ {
679
+ "inputKey": "properties.revenue",
680
+ "outputKey": "properties.revenue"
681
+ },
682
+ {
683
+ "inputKey": "properties.shipping",
684
+ "outputKey": "properties.shipping"
685
+ },
686
+ {
687
+ "inputKey": "properties.tax",
688
+ "outputKey": "properties.tax"
689
+ },
690
+ {
691
+ "inputKey": "properties.total",
692
+ "outputKey": "properties.total"
693
+ },
694
+ {
695
+ "inputKey": "input",
696
+ "outputKey": "occurredAt",
697
+ "transforms": [
698
+ {
699
+ "expression": {
700
+ "lang": "lua",
701
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
702
+ }
703
+ }
704
+ ]
705
+ },
706
+ {
707
+ "inputKey": "input",
708
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
709
+ "transforms": [
710
+ {
711
+ "expression": {
712
+ "lang": "lua",
713
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
714
+ }
715
+ }
716
+ ]
717
+ }
718
+ ]
719
+ },
720
+ "products_searched": {
721
+ "mappings": [
722
+ {
723
+ "inputKey": "traits.phone",
724
+ "outputKey": "user.phone"
725
+ },
726
+ {
727
+ "inputKey": "traits.email",
728
+ "outputKey": "user.email"
729
+ },
730
+ {
731
+ "inputKey": "userId",
732
+ "outputKey": "user.externalIdentifiers.clientUserId"
733
+ },
734
+ {
735
+ "inputKey": "event",
736
+ "outputKey": "type"
737
+ },
738
+ {
739
+ "inputKey": "input",
740
+ "outputKey": "occurredAt",
741
+ "transforms": [
742
+ {
743
+ "expression": {
744
+ "lang": "lua",
745
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
746
+ }
747
+ }
748
+ ]
749
+ },
750
+ {
751
+ "inputKey": "properties.query",
752
+ "outputKey": "properties.query"
753
+ },
754
+ {
755
+ "inputKey": "input",
756
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
757
+ "transforms": [
758
+ {
759
+ "expression": {
760
+ "lang": "lua",
761
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
762
+ }
763
+ }
764
+ ]
765
+ }
766
+ ]
767
+ },
768
+ "product_clicked": {
769
+ "mappings": [
770
+ {
771
+ "inputKey": "traits.phone",
772
+ "outputKey": "user.phone"
773
+ },
774
+ {
775
+ "inputKey": "traits.email",
776
+ "outputKey": "user.email"
777
+ },
778
+ {
779
+ "inputKey": "userId",
780
+ "outputKey": "user.externalIdentifiers.clientUserId"
781
+ },
782
+ {
783
+ "inputKey": "event",
784
+ "outputKey": "type"
785
+ },
786
+ {
787
+ "inputKey": "messageId",
788
+ "outputKey": "properties.messageId"
789
+ },
790
+ {
791
+ "inputKey": "properties.brand",
792
+ "outputKey": "properties.brand"
793
+ },
794
+ {
795
+ "inputKey": "properties.category",
796
+ "outputKey": "properties.category"
797
+ },
798
+ {
799
+ "inputKey": "properties.coupon",
800
+ "outputKey": "properties.coupon"
801
+ },
802
+ {
803
+ "inputKey": "properties.image_url",
804
+ "outputKey": "properties.image_url"
805
+ },
806
+ {
807
+ "inputKey": "properties.name",
808
+ "outputKey": "properties.name"
809
+ },
810
+ {
811
+ "inputKey": "properties.position",
812
+ "outputKey": "properties.position"
813
+ },
814
+ {
815
+ "inputKey": "properties.price",
816
+ "outputKey": "properties.price"
817
+ },
818
+ {
819
+ "inputKey": "properties.product_id",
820
+ "outputKey": "properties.product_id"
821
+ },
822
+ {
823
+ "inputKey": "properties.quantity",
824
+ "outputKey": "properties.quantity"
825
+ },
826
+ {
827
+ "inputKey": "properties.sku",
828
+ "outputKey": "properties.sku"
829
+ },
830
+ {
831
+ "inputKey": "properties.url",
832
+ "outputKey": "properties.url"
833
+ },
834
+ {
835
+ "inputKey": "properties.variant",
836
+ "outputKey": "properties.variant"
837
+ },
838
+ {
839
+ "inputKey": "input",
840
+ "outputKey": "occurredAt",
841
+ "transforms": [
842
+ {
843
+ "expression": {
844
+ "lang": "lua",
845
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
846
+ }
847
+ }
848
+ ]
849
+ },
850
+ {
851
+ "inputKey": "input",
852
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
853
+ "transforms": [
854
+ {
855
+ "expression": {
856
+ "lang": "lua",
857
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
858
+ }
859
+ }
860
+ ]
861
+ }
862
+ ]
863
+ },
864
+ "product_removed": {
865
+ "mappings": [
866
+ {
867
+ "inputKey": "traits.phone",
868
+ "outputKey": "user.phone"
869
+ },
870
+ {
871
+ "inputKey": "traits.email",
872
+ "outputKey": "user.email"
873
+ },
874
+ {
875
+ "inputKey": "userId",
876
+ "outputKey": "user.externalIdentifiers.clientUserId"
877
+ },
878
+ {
879
+ "inputKey": "event",
880
+ "outputKey": "type"
881
+ },
882
+ {
883
+ "inputKey": "messageId",
884
+ "outputKey": "properties.messageId"
885
+ },
886
+ {
887
+ "inputKey": "properties.brand",
888
+ "outputKey": "properties.brand"
889
+ },
890
+ {
891
+ "inputKey": "properties.cart_id",
892
+ "outputKey": "properties.cart_id"
893
+ },
894
+ {
895
+ "inputKey": "properties.category",
896
+ "outputKey": "properties.category"
897
+ },
898
+ {
899
+ "inputKey": "properties.coupon",
900
+ "outputKey": "properties.coupon"
901
+ },
902
+ {
903
+ "inputKey": "properties.image_url",
904
+ "outputKey": "properties.image_url"
905
+ },
906
+ {
907
+ "inputKey": "properties.name",
908
+ "outputKey": "properties.name"
909
+ },
910
+ {
911
+ "inputKey": "properties.position",
912
+ "outputKey": "properties.position"
913
+ },
914
+ {
915
+ "inputKey": "properties.price",
916
+ "outputKey": "properties.price"
917
+ },
918
+ {
919
+ "inputKey": "properties.product_id",
920
+ "outputKey": "properties.product_id"
921
+ },
922
+ {
923
+ "inputKey": "properties.quantity",
924
+ "outputKey": "properties.quantity"
925
+ },
926
+ {
927
+ "inputKey": "properties.sku",
928
+ "outputKey": "properties.sku"
929
+ },
930
+ {
931
+ "inputKey": "properties.url",
932
+ "outputKey": "properties.url"
933
+ },
934
+ {
935
+ "inputKey": "properties.variant",
936
+ "outputKey": "properties.variant"
937
+ },
938
+ {
939
+ "inputKey": "input",
940
+ "outputKey": "occurredAt",
941
+ "transforms": [
942
+ {
943
+ "expression": {
944
+ "lang": "lua",
945
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
946
+ }
947
+ }
948
+ ]
949
+ },
950
+ {
951
+ "inputKey": "input",
952
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
953
+ "transforms": [
954
+ {
955
+ "expression": {
956
+ "lang": "lua",
957
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
958
+ }
959
+ }
960
+ ]
961
+ }
962
+ ]
963
+ },
964
+ "payment_info_entered": {
965
+ "mappings": [
966
+ {
967
+ "inputKey": "traits.phone",
968
+ "outputKey": "user.phone"
969
+ },
970
+ {
971
+ "inputKey": "traits.email",
972
+ "outputKey": "user.email"
973
+ },
974
+ {
975
+ "inputKey": "userId",
976
+ "outputKey": "user.externalIdentifiers.clientUserId"
977
+ },
978
+ {
979
+ "inputKey": "event",
980
+ "outputKey": "type"
981
+ },
982
+ {
983
+ "inputKey": "messageId",
984
+ "outputKey": "properties.messageId"
985
+ },
986
+ {
987
+ "inputKey": "properties.checkout_id",
988
+ "outputKey": "properties.checkout_id"
989
+ },
990
+ {
991
+ "inputKey": "properties.order_id",
992
+ "outputKey": "properties.order_id"
993
+ },
994
+ {
995
+ "inputKey": "input",
996
+ "outputKey": "occurredAt",
997
+ "transforms": [
998
+ {
999
+ "expression": {
1000
+ "lang": "lua",
1001
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
1002
+ }
1003
+ }
1004
+ ]
1005
+ },
1006
+ {
1007
+ "inputKey": "input",
1008
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
1009
+ "transforms": [
1010
+ {
1011
+ "expression": {
1012
+ "lang": "lua",
1013
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
1014
+ }
1015
+ }
1016
+ ]
1017
+ }
1018
+ ]
1019
+ },
1020
+ "promotion_clicked": {
1021
+ "mappings": [
1022
+ {
1023
+ "inputKey": "traits.phone",
1024
+ "outputKey": "user.phone"
1025
+ },
1026
+ {
1027
+ "inputKey": "traits.email",
1028
+ "outputKey": "user.email"
1029
+ },
1030
+ {
1031
+ "inputKey": "userId",
1032
+ "outputKey": "user.externalIdentifiers.clientUserId"
1033
+ },
1034
+ {
1035
+ "inputKey": "event",
1036
+ "outputKey": "type"
1037
+ },
1038
+ {
1039
+ "inputKey": "messageId",
1040
+ "outputKey": "properties.messageId"
1041
+ },
1042
+ {
1043
+ "inputKey": "properties.creative",
1044
+ "outputKey": "properties.creative"
1045
+ },
1046
+ {
1047
+ "inputKey": "properties.name",
1048
+ "outputKey": "properties.name"
1049
+ },
1050
+ {
1051
+ "inputKey": "properties.position",
1052
+ "outputKey": "properties.position"
1053
+ },
1054
+ {
1055
+ "inputKey": "properties.promotion_id",
1056
+ "outputKey": "properties.promotion_id"
1057
+ },
1058
+ {
1059
+ "inputKey": "input",
1060
+ "outputKey": "occurredAt",
1061
+ "transforms": [
1062
+ {
1063
+ "expression": {
1064
+ "lang": "lua",
1065
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
1066
+ }
1067
+ }
1068
+ ]
1069
+ },
1070
+ {
1071
+ "inputKey": "input",
1072
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
1073
+ "transforms": [
1074
+ {
1075
+ "expression": {
1076
+ "lang": "lua",
1077
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
1078
+ }
1079
+ }
1080
+ ]
1081
+ }
1082
+ ]
1083
+ },
1084
+ "promotion_viewed": {
1085
+ "mappings": [
1086
+ {
1087
+ "inputKey": "traits.phone",
1088
+ "outputKey": "user.phone"
1089
+ },
1090
+ {
1091
+ "inputKey": "traits.email",
1092
+ "outputKey": "user.email"
1093
+ },
1094
+ {
1095
+ "inputKey": "userId",
1096
+ "outputKey": "user.externalIdentifiers.clientUserId"
1097
+ },
1098
+ {
1099
+ "inputKey": "event",
1100
+ "outputKey": "type"
1101
+ },
1102
+ {
1103
+ "inputKey": "messageId",
1104
+ "outputKey": "properties.messageId"
1105
+ },
1106
+ {
1107
+ "inputKey": "properties.creative",
1108
+ "outputKey": "properties.creative"
1109
+ },
1110
+ {
1111
+ "inputKey": "properties.name",
1112
+ "outputKey": "properties.name"
1113
+ },
1114
+ {
1115
+ "inputKey": "properties.position",
1116
+ "outputKey": "properties.position"
1117
+ },
1118
+ {
1119
+ "inputKey": "properties.promotion_id",
1120
+ "outputKey": "properties.promotion_id"
1121
+ },
1122
+ {
1123
+ "inputKey": "input",
1124
+ "outputKey": "occurredAt",
1125
+ "transforms": [
1126
+ {
1127
+ "expression": {
1128
+ "lang": "lua",
1129
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
1130
+ }
1131
+ }
1132
+ ]
1133
+ },
1134
+ {
1135
+ "inputKey": "input",
1136
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
1137
+ "transforms": [
1138
+ {
1139
+ "expression": {
1140
+ "lang": "lua",
1141
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
1142
+ }
1143
+ }
1144
+ ]
1145
+ }
1146
+ ]
1147
+ },
1148
+ "coupon_entered": {
1149
+ "mappings": [
1150
+ {
1151
+ "inputKey": "traits.phone",
1152
+ "outputKey": "user.phone"
1153
+ },
1154
+ {
1155
+ "inputKey": "traits.email",
1156
+ "outputKey": "user.email"
1157
+ },
1158
+ {
1159
+ "inputKey": "userId",
1160
+ "outputKey": "user.externalIdentifiers.clientUserId"
1161
+ },
1162
+ {
1163
+ "inputKey": "event",
1164
+ "outputKey": "type"
1165
+ },
1166
+ {
1167
+ "inputKey": "messageId",
1168
+ "outputKey": "properties.messageId"
1169
+ },
1170
+ {
1171
+ "inputKey": "properties.order_id",
1172
+ "outputKey": "properties.order_id"
1173
+ },
1174
+ {
1175
+ "inputKey": "properties.cart_id",
1176
+ "outputKey": "properties.cart_id"
1177
+ },
1178
+ {
1179
+ "inputKey": "properties.coupon_id",
1180
+ "outputKey": "properties.coupon_id"
1181
+ },
1182
+ {
1183
+ "inputKey": "input",
1184
+ "outputKey": "occurredAt",
1185
+ "transforms": [
1186
+ {
1187
+ "expression": {
1188
+ "lang": "lua",
1189
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
1190
+ }
1191
+ }
1192
+ ]
1193
+ },
1194
+ {
1195
+ "inputKey": "input",
1196
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
1197
+ "transforms": [
1198
+ {
1199
+ "expression": {
1200
+ "lang": "lua",
1201
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
1202
+ }
1203
+ }
1204
+ ]
1205
+ }
1206
+ ]
1207
+ },
1208
+ "product_added_to_wishlist": {
1209
+ "mappings": [
1210
+ {
1211
+ "inputKey": "traits.phone",
1212
+ "outputKey": "user.phone"
1213
+ },
1214
+ {
1215
+ "inputKey": "traits.email",
1216
+ "outputKey": "user.email"
1217
+ },
1218
+ {
1219
+ "inputKey": "userId",
1220
+ "outputKey": "user.externalIdentifiers.clientUserId"
1221
+ },
1222
+ {
1223
+ "inputKey": "event",
1224
+ "outputKey": "type"
1225
+ },
1226
+ {
1227
+ "inputKey": "messageId",
1228
+ "outputKey": "properties.messageId"
1229
+ },
1230
+ {
1231
+ "inputKey": "properties.wishlist_id",
1232
+ "outputKey": "properties.wishlist_id"
1233
+ },
1234
+ {
1235
+ "inputKey": "properties.wishlist_name",
1236
+ "outputKey": "properties.wishlist_name"
1237
+ },
1238
+ {
1239
+ "inputKey": "properties.product_id",
1240
+ "outputKey": "properties.product_id"
1241
+ },
1242
+ {
1243
+ "inputKey": "properties.sku",
1244
+ "outputKey": "properties.sku"
1245
+ },
1246
+ {
1247
+ "inputKey": "properties.category",
1248
+ "outputKey": "properties.category"
1249
+ },
1250
+ {
1251
+ "inputKey": "properties.name",
1252
+ "outputKey": "properties.name"
1253
+ },
1254
+ {
1255
+ "inputKey": "properties.brand",
1256
+ "outputKey": "properties.brand"
1257
+ },
1258
+ {
1259
+ "inputKey": "properties.variant",
1260
+ "outputKey": "properties.variant"
1261
+ },
1262
+ {
1263
+ "inputKey": "properties.price",
1264
+ "outputKey": "properties.price"
1265
+ },
1266
+ {
1267
+ "inputKey": "properties.quantity",
1268
+ "outputKey": "properties.quantity"
1269
+ },
1270
+ {
1271
+ "inputKey": "properties.coupon",
1272
+ "outputKey": "properties.coupon"
1273
+ },
1274
+ {
1275
+ "inputKey": "properties.position",
1276
+ "outputKey": "properties.position"
1277
+ },
1278
+ {
1279
+ "inputKey": "properties.url",
1280
+ "outputKey": "properties.url"
1281
+ },
1282
+ {
1283
+ "inputKey": "properties.image_url",
1284
+ "outputKey": "properties.image_url"
1285
+ },
1286
+ {
1287
+ "inputKey": "input",
1288
+ "outputKey": "occurredAt",
1289
+ "transforms": [
1290
+ {
1291
+ "expression": {
1292
+ "lang": "lua",
1293
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
1294
+ }
1295
+ }
1296
+ ]
1297
+ },
1298
+ {
1299
+ "inputKey": "input",
1300
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
1301
+ "transforms": [
1302
+ {
1303
+ "expression": {
1304
+ "lang": "lua",
1305
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
1306
+ }
1307
+ }
1308
+ ]
1309
+ }
1310
+ ]
1311
+ },
1312
+ "order_canceled": {
1313
+ "mappings": [
1314
+ {
1315
+ "inputKey": "traits.phone",
1316
+ "outputKey": "user.phone"
1317
+ },
1318
+ {
1319
+ "inputKey": "traits.email",
1320
+ "outputKey": "user.email"
1321
+ },
1322
+ {
1323
+ "inputKey": "userId",
1324
+ "outputKey": "user.externalIdentifiers.clientUserId"
1325
+ },
1326
+ {
1327
+ "inputKey": "event",
1328
+ "outputKey": "type"
1329
+ },
1330
+ {
1331
+ "inputKey": "messageId",
1332
+ "outputKey": "properties.messageId"
1333
+ },
1334
+ {
1335
+ "inputKey": "properties.affiliation",
1336
+ "outputKey": "properties.affiliation"
1337
+ },
1338
+ {
1339
+ "inputKey": "properties.order_id",
1340
+ "outputKey": "properties.order_id"
1341
+ },
1342
+ {
1343
+ "inputKey": "properties.total",
1344
+ "outputKey": "properties.total"
1345
+ },
1346
+ {
1347
+ "inputKey": "properties.revenue",
1348
+ "outputKey": "properties.revenue"
1349
+ },
1350
+ {
1351
+ "inputKey": "properties.shipping",
1352
+ "outputKey": "properties.shipping"
1353
+ },
1354
+ {
1355
+ "inputKey": "properties.tax",
1356
+ "outputKey": "properties.tax"
1357
+ },
1358
+ {
1359
+ "inputKey": "properties.discount",
1360
+ "outputKey": "properties.discount"
1361
+ },
1362
+ {
1363
+ "inputKey": "properties.coupon",
1364
+ "outputKey": "properties.coupon"
1365
+ },
1366
+ {
1367
+ "inputKey": "properties.currency",
1368
+ "outputKey": "properties.currency",
1369
+ "transforms": [
1370
+ {
1371
+ "modifyString": "uppercase"
1372
+ }
1373
+ ]
1374
+ },
1375
+ {
1376
+ "inputKey": "input",
1377
+ "outputKey": "properties.products",
1378
+ "transforms": [
1379
+ {
1380
+ "expression": {
1381
+ "lang": "lua",
1382
+ "body": "return MAP(input.properties.products, function(p)\n return {\n product_id = p.product_id,\n sku = p.sku,\n category = p.category,\n name = p.name,\n brand = p.brand,\n variant = p.variant,\n price = p.price,\n quantity = p.quantity or 1,\n coupon = p.coupon,\n position = p.position,\n url = p.url,\n image_url = p.image_url\n }\nend)"
1383
+ }
1384
+ }
1385
+ ]
1386
+ },
1387
+ {
1388
+ "inputKey": "input",
1389
+ "outputKey": "occurredAt",
1390
+ "transforms": [
1391
+ {
1392
+ "expression": {
1393
+ "lang": "lua",
1394
+ "body": "local date = input.timestamp or input.originalTimestamp or input.sentAt\nreturn REPLACE(date,'Z','+0000')"
1395
+ }
1396
+ }
1397
+ ]
1398
+ },
1399
+ {
1400
+ "inputKey": "input",
1401
+ "outputKey": "user.externalIdentifiers.customIdentifiers",
1402
+ "transforms": [
1403
+ {
1404
+ "expression": {
1405
+ "lang": "lua",
1406
+ "body": "return {\n { name = \"username\", value = input.traits.username }\n}"
1407
+ }
1408
+ }
1409
+ ]
1410
+ }
1411
+ ]
1412
+ }
1413
+ }
1414
+ }