From 56d24ec74c0c21bcdcdf262b4feec6edd1dff51c Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Wed, 31 Jan 2024 01:44:46 +0530 Subject: [PATCH] fix: purchsse events for reddit --- src/cdk/v2/destinations/reddit/procWorkflow.yaml | 2 +- test/integrations/destinations/reddit/processor/data.ts | 5 ++++- test/integrations/destinations/reddit/router/data.ts | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/cdk/v2/destinations/reddit/procWorkflow.yaml b/src/cdk/v2/destinations/reddit/procWorkflow.yaml index 65b466bc7cc..652ee2f7842 100644 --- a/src/cdk/v2/destinations/reddit/procWorkflow.yaml +++ b/src/cdk/v2/destinations/reddit/procWorkflow.yaml @@ -56,7 +56,7 @@ steps: const event_type = (eventNames.length === 0 || eventNames[0]==="") ? ({"tracking_type": "Custom", "custom_event_name": event}): ({tracking_type: eventNames[0]}); - name: customFields - condition: $.outputs.eventType.tracking_type === "Purchase" + condition: $.outputs.prepareTrackPayload.eventType.tracking_type === "Purchase" template: | const customFields = .message.().({ "currency": .properties.currency, diff --git a/test/integrations/destinations/reddit/processor/data.ts b/test/integrations/destinations/reddit/processor/data.ts index 91da5fbe67e..09bbd3e5875 100644 --- a/test/integrations/destinations/reddit/processor/data.ts +++ b/test/integrations/destinations/reddit/processor/data.ts @@ -126,7 +126,10 @@ export const data = [ screen_dimensions: {}, }, event_metadata: { - item_count: 3, + item_count: 2, + currency: 'USD', + value: 15, + value_decimal: 0.15, products: [ { id: '123', diff --git a/test/integrations/destinations/reddit/router/data.ts b/test/integrations/destinations/reddit/router/data.ts index 317bb41a149..1ce7d24abfc 100644 --- a/test/integrations/destinations/reddit/router/data.ts +++ b/test/integrations/destinations/reddit/router/data.ts @@ -234,7 +234,10 @@ export const data = [ screen_dimensions: {}, }, event_metadata: { - item_count: 3, + item_count: 2, + currency: 'USD', + value: 15, + value_decimal: 0.15, products: [ { id: '123',