Skip to content

Commit

Permalink
fix: add missing field for pinterest_tag single product events
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSudip authored and Sai Sankeerth committed Nov 5, 2024
1 parent b6274de commit 5057c2e
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 8 deletions.
6 changes: 5 additions & 1 deletion src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ steps:
"content_ids": (props.product_id ?? props.sku ?? props.id)[],
"contents": {
"quantity": Number(props.quantity) || 1,
"item_price": String(props.price)
"item_price": String(props.price),
"item_name": String(props.name),
"id": props.product_id ?? props.sku,
"item_category": props.category,
"item_brand": props.brand
}[]
};
- name: combineAllEcomFields
Expand Down
8 changes: 8 additions & 0 deletions test/apitests/data_scenarios/cdk_v2/failure.json
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down Expand Up @@ -679,6 +683,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down
12 changes: 12 additions & 0 deletions test/apitests/data_scenarios/cdk_v2/success.json
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down Expand Up @@ -634,6 +638,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down Expand Up @@ -712,6 +720,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down Expand Up @@ -466,6 +470,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down Expand Up @@ -544,6 +552,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down Expand Up @@ -466,6 +470,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down Expand Up @@ -285,6 +289,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down Expand Up @@ -781,6 +785,10 @@
"content_ids": ["123"],
"contents": [
{
"id": "123",
"item_brand": "Gamepro",
"item_category": "Games",
"item_name": "Game",
"quantity": 11,
"item_price": "13.49"
}
Expand Down
13 changes: 10 additions & 3 deletions test/integrations/destinations/pinterest_tag/processor/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,9 @@ export const data = [
order_id: '50314b8e9bcf000000000000',
num_items: 2,
content_ids: ['123'],
contents: [{ quantity: 2, item_price: '25' }],
contents: [
{ id: '123', item_name: 'undefined', quantity: 2, item_price: '25' },
],
},
},
JSON_ARRAY: {},
Expand Down Expand Up @@ -2405,7 +2407,9 @@ export const data = [
order_id: '50314b8e9bcf000000000000',
num_items: 0,
content_ids: ['1234'],
contents: [{ quantity: 1, item_price: 'undefined' }],
contents: [
{ id: '1234', item_name: 'undefined', quantity: 1, item_price: 'undefined' },
],
},
},
JSON_ARRAY: {},
Expand Down Expand Up @@ -2666,7 +2670,7 @@ export const data = [
advertiser_id: '123456',
app_id: '429047995',
custom_data: {
contents: [{ item_price: 'undefined', quantity: 1 }],
contents: [{ item_price: 'undefined', quantity: 1, item_name: 'undefined' }],
currency: 'USD',
num_items: 0,
order_id: '50314b8e9bcf000000000000',
Expand Down Expand Up @@ -3497,6 +3501,7 @@ export const data = [
subtotal: 22.5,
affiliation: 'Google Store',
checkout_id: 'fksdjfsdjfisjf9sdfjsd9f',
category: 'Apparel',
},
anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1',
integrations: { All: true },
Expand Down Expand Up @@ -3563,6 +3568,8 @@ export const data = [
{
quantity: 1,
item_price: 'undefined',
item_name: 'undefined',
item_category: 'Apparel',
},
],
currency: 'USD',
Expand Down
4 changes: 3 additions & 1 deletion test/integrations/destinations/pinterest_tag/router/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,9 @@ export const data = [
order_id: '50314b8e9bcf000000000000',
num_items: 2,
content_ids: ['123'],
contents: [{ quantity: 2, item_price: '25' }],
contents: [
{ id: '123', item_name: 'undefined', quantity: 2, item_price: '25' },
],
},
},
{
Expand Down
11 changes: 8 additions & 3 deletions test/integrations/destinations/pinterest_tag/step/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,9 @@ export const data = [
order_id: '50314b8e9bcf000000000000',
num_items: 2,
content_ids: ['123'],
contents: [{ quantity: 2, item_price: '25' }],
contents: [
{ id: '123', item_name: 'undefined', quantity: 2, item_price: '25' },
],
},
},
JSON_ARRAY: {},
Expand Down Expand Up @@ -2420,7 +2422,9 @@ export const data = [
order_id: '50314b8e9bcf000000000000',
num_items: 0,
content_ids: ['1234'],
contents: [{ quantity: 1, item_price: 'undefined' }],
contents: [
{ id: '1234', item_name: 'undefined', quantity: 1, item_price: 'undefined' },
],
},
},
JSON_ARRAY: {},
Expand Down Expand Up @@ -2685,7 +2689,7 @@ export const data = [
advertiser_id: '123456',
app_id: '429047995',
custom_data: {
contents: [{ item_price: 'undefined', quantity: 1 }],
contents: [{ item_name: 'undefined', item_price: 'undefined', quantity: 1 }],
currency: 'USD',
num_items: 0,
order_id: '50314b8e9bcf000000000000',
Expand Down Expand Up @@ -3605,6 +3609,7 @@ export const data = [
num_items: 0,
contents: [
{
item_name: 'undefined',
quantity: 1,
item_price: 'undefined',
},
Expand Down

0 comments on commit 5057c2e

Please sign in to comment.