From 85354d0f9a75ea64a23e50b168a2b2515605c7b0 Mon Sep 17 00:00:00 2001 From: AnkitUnthinkable <117071411+AnkitUnthinkable@users.noreply.github.com> Date: Thu, 20 Jul 2023 23:20:06 +0530 Subject: [PATCH] STRATCONN-2828 Pinterest custom data value incorrect. (#1367) * STRATCONN-2828 changed custom data value number to string * Removed datatypes form properties and cascating when we are sending data to pinterest * removed test case * snapshorts of testcase added --------- Co-authored-by: Ankit Gupta --- .../__tests__/__snapshots__/index.test.ts.snap | 4 ++-- .../pinterest-conversions/reportConversionEvent/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/destination-actions/src/destinations/pinterest-conversions/reportConversionEvent/__tests__/__snapshots__/index.test.ts.snap b/packages/destination-actions/src/destinations/pinterest-conversions/reportConversionEvent/__tests__/__snapshots__/index.test.ts.snap index 9b118fbe47..78707fd8a5 100644 --- a/packages/destination-actions/src/destinations/pinterest-conversions/reportConversionEvent/__tests__/__snapshots__/index.test.ts.snap +++ b/packages/destination-actions/src/destinations/pinterest-conversions/reportConversionEvent/__tests__/__snapshots__/index.test.ts.snap @@ -16,7 +16,7 @@ Object { "opt_out_type": undefined, "order_id": undefined, "search_string": undefined, - "value": undefined, + "value": "undefined", }, "device_brand": undefined, "device_carrier": undefined, @@ -92,7 +92,7 @@ Object { "opt_out_type": undefined, "order_id": undefined, "search_string": undefined, - "value": undefined, + "value": "undefined", }, "device_brand": undefined, "device_carrier": undefined, diff --git a/packages/destination-actions/src/destinations/pinterest-conversions/reportConversionEvent/index.ts b/packages/destination-actions/src/destinations/pinterest-conversions/reportConversionEvent/index.ts index 296964a6d0..a2bc97f1e4 100644 --- a/packages/destination-actions/src/destinations/pinterest-conversions/reportConversionEvent/index.ts +++ b/packages/destination-actions/src/destinations/pinterest-conversions/reportConversionEvent/index.ts @@ -200,7 +200,7 @@ function createPinterestPayload(payload: Payload) { user_data: hash_user_data({ user_data: payload.user_data }), custom_data: { currency: payload?.custom_data?.currency, - value: payload?.custom_data?.value, + value: String(payload?.custom_data?.value), content_ids: payload.custom_data?.content_ids, contents: payload.custom_data?.contents, num_items: payload.custom_data?.num_items,