"WishlistItemIDs" - What's the point?

  • 29 July 2021
  • 1 reply

  • New Participant
  • 3 replies

Sorry for click-baity title, but hear me out.


We can add wishlist items as an event via:

   _learnq.push(["track", "Added to Wishlist", {
"$value": 29.98,
"ProductName": "A Tale of Two Cities",
"ProductID": "1112",
"Categories": ["Fiction", "Classics"],
"ImageURL": "",
"URL": "",
"Price": 19.99,
"Quantity": 1

Unfortunately, I am being told by the engineers that only the single product in the event is usable.


But according to the documentation found here,

If you want an up-to-date record of the items in a given person’s wishlist, you can send this to Klaviyo using our server-side Identify API and our Catalog Feed feature.

"token": "PUBLIC_API_KEY",
"properties": {
"$email": "",
"WishlistItemIDs": ["1111","1112","1113"],
"WishlistItemNames": ["Winnie the Pooh","A Tale of Two Cities","Alice in Wonderland"]

You can use these IDs to set up a catalog lookup tag within an email template to display the items on the person’s wishlist in any campaign or flow email. You can use the names or IDs to segment based on which items are in a person’s wishlist.


Here is the problem, using a catalog lookup you end up with a string like so:


Not an actual array like,

[0] => 1111,
[1] => 1112,
[2] => 1113

So from what I hear from the engineers, there is actually no way of using the IDs stored in WishlistItemIDs.


Then what is the point of maintaining an up-to-date record of items in a given person’s wishlist?


What is the missing piece here?


Best answer by odp 30 July 2021, 12:55

View original

1 reply


Well look at silly me.

It was right there, very well hidden. Identify API

After changing my API call from an event to Identify, products are rolling in as custom properties. ready to be looped through in your template and flow.


{% for item in person|lookup:'WishlistItemIDs' %}
{% catalog item unpublished="cancel" %}
{{ catalog_item.title }}
{% endcatalog %}
{% endfor %}