Hey There, I'd like to double check something you...
# support
a
Hey There, I'd like to double check something you. looking at this code: https://github.com/rudderlabs/rudder-transformer/blob/b3e5d82ca24015e84ad401e86f5334886082c72c/src/v0/destinations/tiktok_ads/transform.js#L32 It looks like it is not mapping the currency code in the product object, am I right? I am trying to add it to tiktok and currency would be helpful but is missing when I send it through rudderstack. Thank you.
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
q
Currency is not part of the product object but the event object itself. You might add multiple products as part of the product object and adding currency to each of those would not be the best use of it. an example here
Copy code
rudderanalytics.track("Order Completed", {
  checkout_id: "12345",
  order_id: "1234",
  affiliation: "Apple Store",
  total: 20,
  revenue: 15.0,
  shipping: 22,
  tax: 1,
  discount: 1.5,
  coupon: "ImagePro",
  currency: "USD",
  contentType: "product",
  products: [{
      product_id: "123",
      sku: "G-32",
      name: "Monopoly",
      price: 14,
      quantity: 1,
      category: "Games",
      url: "https://www.website.com/product/path",
      image_url: "https://www.website.com/product/path.jpg",
    },
    {
      product_id: "345",
      sku: "F-32",
      name: "UNO",
      price: 3.45,
      quantity: 2,
      category: "Games",
    },
  ],
})
a
Hey @quiet-wolf-72320, Thank you for this answer, I applied the changes but I am still seeing the error on tiktok saying that the currency is not mapped correctly. We are now sending, the currency and the amount at the root level of the property with the content_type
product
but it still looks like the mapping doesn't match the expected event for TikTok. To give you more details here is an exemple of the properties we send to the tiktok destination after transformation:
Copy code
{
 "event": "checkout step completed",
 "properties": {
  "currency": "USD",
  "value": "39.99",
  "content_type": "product",
  "quantity": "1",
 }
If there anything you can think of that we forgot to do to make it work?
q
@acceptable-continent-82228 can you share the payload that you see in live events tab for source and destination? It will help to narrow down the difference
a
@quiet-wolf-72320 It is fairly hard for me to manually trigger this events. I will see what I can do. In the meantime, could you point me to the source code for the destination?
Did you try sending a product array in this payload?
Copy code
{
 "event": "checkout step completed",
 "properties": {
  "currency": "USD",
  "value": "39.99",
  "content_type": "product",
  "quantity": "1",
products: [{
      product_id: "123",
      sku: "G-32",
      name: "Monopoly",
      price: 14,
      quantity: 1,
      category: "Games",
      url: "https://www.website.com/product/path",
      image_url: "https://www.website.com/product/path.jpg",
    },
    {
      product_id: "345",
      sku: "F-32",
      name: "UNO",
      price: 3.45,
      quantity: 2,
      category: "Games",
    },
  ],
 }