From 6425f5bbd0da14a943e9119afed4211edbf41fca Mon Sep 17 00:00:00 2001 From: sandeepdigumarty Date: Fri, 10 Nov 2023 12:40:17 +0530 Subject: [PATCH] feat: add delivery_category as part of contents --- src/v0/destinations/facebook_pixel/utils.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/v0/destinations/facebook_pixel/utils.js b/src/v0/destinations/facebook_pixel/utils.js index 3c9a5a2d51..8a63a0b0fe 100644 --- a/src/v0/destinations/facebook_pixel/utils.js +++ b/src/v0/destinations/facebook_pixel/utils.js @@ -59,7 +59,14 @@ const handleOrder = (message, categoryToContent) => { const contentType = getContentType(message, 'product', categoryToContent); const contentIds = []; const contents = []; - const { category, quantity, price, currency, contentName } = message.properties; + const { + category, + quantity, + price, + currency, + contentName, + delivery_category: deliveryCategory, + } = message.properties; if (products) { if (products.length > 0 && Array.isArray(products)) { products.forEach((singleProduct) => { @@ -72,6 +79,7 @@ const handleOrder = (message, categoryToContent) => { id: pId, quantity: singleProduct.quantity || quantity || 1, item_price: singleProduct.price || price, + delivery_category: singleProduct.delivery_category || deliveryCategory, }; contents.push(content); }