Skip to content

Commit 1e19f1a

Browse files
alanjcharlesoscb
authored andcommitted
fix: fix product Id to match ecommerce spec (#803)
Co-authored-by: Alan Charles <[email protected]>
1 parent ea35fca commit 1e19f1a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/plugins/plugin-braze/src/methods/__tests__/track.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ describe('#track', () => {
245245
revenue: '399.99',
246246
products: [
247247
{
248-
productId: '123',
248+
product_id: '123',
249249
price: '399.99',
250250
quantity: 4,
251251
},

packages/plugins/plugin-braze/src/methods/track.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default (payload: TrackEventType) => {
9090
);
9191
const productId =
9292
unknownToString(
93-
productDict.productId,
93+
productDict.product_id,
9494
true,
9595
undefined,
9696
undefined
@@ -102,7 +102,7 @@ export default (payload: TrackEventType) => {
102102
const productQuantity = isNumber(productDict.quantity)
103103
? productDict.quantity
104104
: 1;
105-
delete productDict.productId;
105+
delete productDict.product_id;
106106
delete productDict.price;
107107
delete productDict.quantity;
108108
const productProperties = Object.assign(

0 commit comments

Comments
 (0)