Skip to main content

Hi,

When I view events under a profile, I only see one Ordered Product event even though I sent 3 different ones.

e.g.

But I sent 2 others that did not show up, here is what I see in DEV logs:

All were accepted 202.

The 3 payloads were (all have unique id):

{
  "data": {
    "type": "event",
    "attributes": {
      "properties": {
        "Store ID": "123",
        "Store Location": "555 Home Street, Boston, MA 02110",
        "OrderId": "1234567890",
        "ProductID": "1111",
        "SKU": "WINNIEPOOH",
        "ProductName": "Winnie the Pooh",
        "Quantity": 1,
        "ProductURL": "http://www.example.com/path/to/product",
        "ImageURL": "http://www.example.com/path/to/product/image.png",
        "Categories": [
          "Fiction",
          "Children"
        ],
        "ProductBrand": "Kids Books"
      },
      "time": "2025-09-22T10:00:00",
      "value": 9.99,
      "metric": {
        "data": {
          "type": "metric",
          "attributes": {
            "name": "Ordered Product"
          }
        }
      },
      "profile": {
        "data": {
          "type": "profile",
          "attributes": {
            "email": "frieren@klaviyo.com",
            "phone_number": "+15005550006"
          }
        }
      }
    },
    "unique_id": "a25e4c18-a8e0-4239-b140-f2afbf6de0d11111111111111111"
  }
}

{
  "data": {
    "type": "event",
    "attributes": {
      "properties": {
        "Store ID": "123",
        "Store Location": "555 Home Street, Boston, MA 02110",
        "OrderId": "1234567890",
        "ProductID": "2222",
        "SKU": "DEMON",
        "ProductName": "Demon Copperhead",
        "Quantity": 1,
        "ProductURL": "http://www.example.com/path/to/product1",
        "ImageURL": "http://www.example.com/path/to/product/image1.png",
        "Categories": [
          "Fiction",
          "Adult"
        ],
        "ProductBrand": "Adult Books"
      },
      "time": "2025-09-22T10:00:00",
      "value": 19.99,
      "metric": {
        "data": {
          "type": "metric",
          "attributes": {
            "name": "Ordered Product"
          }
        }
      },
      "profile": {
        "data": {
          "type": "profile",
          "attributes": {
            "email": "frieren@klaviyo.com",
            "phone_number": "+15005550006"
          }
        }
      }
    },
    "unique_id": "a25e4c18-a8e0-4239-b140-f2afbf6de0d11111111111111122"
  }
}

{
  "data": {
    "type": "event",
    "attributes": {
      "properties": {
        "Store ID": "123",
        "Store Location": "555 Home Street, Boston, MA 02110",
        "OrderId": "1234567890",
        "ProductID": "2233",
        "SKU": "DUNE",
        "ProductName": "Dune",
        "Quantity": 1,
        "ProductURL": "http://www.example.com/path/to/product2",
        "ImageURL": "http://www.example.com/path/to/product/image2.png",
        "Categories": [
          "Fiction",
          "Adult"
        ],
        "ProductBrand": "SF Books"
      },
      "time": "2025-09-22T10:00:00",
      "value": 12.99,
      "metric": {
        "data": {
          "type": "metric",
          "attributes": {
            "name": "Ordered Product"
          }
        }
      },
      "profile": {
        "data": {
          "type": "profile",
          "attributes": {
            "email": "frieren@klaviyo.com",
            "phone_number": "+15005550006"
          }
        }
      }
    },
    "unique_id": "a25e4c18-a8e0-4239-b140-f2afbf6de0d11111111111111123"
  }
}

 

Any idea why only 1 is showing up when there should be 3?

Thanks,

Amit

Hi Amit,

unique_id should be under “attributes”, alongside “time” and “value”. Right now, it’s top-level under “data”.

 


Hi there, it looks like the issue is due to “unique_id” being a top level attribute (meaning it’s under “data”), but it needs to be within the “attributes” object under “data”.

Additionally, this looks like example events from our documentation. I want to make sure the documentation examples are setup correct, could you confirm the URL that you got these events from?


 

This is indeed modified payload from documentation:

https://developers.klaviyo.com/en/docs/guide_to_integrating_a_business_with_brick_and_mortar_locations

I did not move the unique_id. However our code is placing unique_id at correct level I think (I will verify this).

The issue might be deduplication around timestamp?

Note that all payloads had same time.

 


I confirmed that moving the unique_id does fix the issue. Thank you!


I confirmed that moving the unique_id does fix the issue. Thank you!

Great!! We have updated the developer guide.