Skip to main content
Solved

New segment from "Placed order event" with case "where [items] contains"....

  • November 29, 2023
  • 5 replies
  • 140 views

Forum|alt.badge.img+3
  • Problem Solver I
  • 8 replies

Hello,

I have just made custom integration and imported web shop orders to klaviyo profiles and they are visible in profiles activity feed:
 

 

When creating new segment when someone has “Placed order” i get no autocomplete-options if i select where “Items”. All other cases(brands, categories….) works fine and offer some options.

I’m new to klaviyo and I’m not sure what should even appear here? Is everything ok or am I missing something?

I would appreciate any help.

Thanks

Best answer by saulblum

You could loop through the Items array in an email and pull out properties such as productID and SKU (and do catalog lookups too with those properties, to, say, include thumbnails).

View original
Did this topic or the replies in the thread help you find an answer to your question?

5 replies

Forum|alt.badge.img+3
  • Author
  • Problem Solver I
  • 8 replies
  • November 29, 2023

EDIT: I have found some other options/conditions are not up to date. I was importing and deleting profiles with history events a lot. It looks like segmentation options/conditions are still cached and showing old data. How long does it take for conditions to update from imported events?


Forum|alt.badge.img+7
  • Klaviyo Employee
  • 169 replies
  • November 29, 2023

Hi! It’s because Items is an array of JSON objects, vs. an array if strings, like Categories and Item Names. You can see in the example event body in the integration guide — https://developers.klaviyo.com/en/docs/guide_to_integrating_a_platform_without_a_pre_built_klaviyo_integration#placed-order — that you can have top-level string arrays of any order values you want, and you can then segment on those top-level properties.


Forum|alt.badge.img+3
  • Author
  • Problem Solver I
  • 8 replies
  • November 29, 2023

  

saulblum wrote:

Hi! It’s because Items is an array of JSON objects, vs. an array if strings, like Categories and Item Names. You can see in the example event body in the integration guide — https://developers.klaviyo.com/en/docs/guide_to_integrating_a_platform_without_a_pre_built_klaviyo_integration#placed-order — that you can have top-level string arrays of any order values you want, and you can then segment on those top-level properties.

 

Hi!

I noticed the difference between “array of objects” vs “array of strings”. I included “Items” as array of objects in my API call because it is documented in example in the link you’ve sent me. I thought I could use that data somehow. I’m a bit confused what is its use then? 

How often do segmentation options/conditions update from recorded events?

thank you!


Forum|alt.badge.img+7
  • Klaviyo Employee
  • 169 replies
  • Answer
  • November 29, 2023

You could loop through the Items array in an email and pull out properties such as productID and SKU (and do catalog lookups too with those properties, to, say, include thumbnails).


Forum|alt.badge.img+3
  • Author
  • Problem Solver I
  • 8 replies
  • November 29, 2023
saulblum wrote:

You could loop through the Items array in an email and pull out properties such as productID and SKU (and do catalog lookups too with those properties, to, say, include thumbnails).

Thank you Saul.

The more I work with Klaviyo the more i love it :)