Skip to main content
Solved

Update profile property with purchased items

  • 23 January 2025
  • 1 reply
  • 25 views

Forum|alt.badge.img+5

Hi everyone!

I’m trying to set up a system that automatically updates a customer’s profile properties in Klaviyo based on the products they’ve purchased in an order. My goal is to create a property that dynamically includes all purchased products (e.g., ["Product A", "Product B"]), without needing to manually configure every possible product in a flow.

This would allow me to use the property to set up product-specific conditional blocks within emails.

I came across this post, which seems very similar to my use case, but it doesn’t seem to provide a complete solution 

Here’s what I’d like to achieve:

for every product in the order, add it to a property (e.g., Purchased Products: ["Product A", "Product B"]).
The solution should work dynamically, handling any product in the catalog, including new ones, without requiring a manual conditional split for each product in the flow.
Manually adding conditional splits or individual profile property updates for each product is a bit too complicated. Instead, I’m looking for a method that can automatically loop through the products in an order and update the profile accordingly.

Has anyone successfully implemented something like this?

Thank you so much!

Best answer by Byrne C

Hi ​@Woodhope!

Thanks for posting this question! This can be done, and would take a couple steps.

  • First, add a profile property update block at the beginning of the flow, so the property is added to people’s profiles. It won’t add the items yet, but that’s okay. We just want the property on the profile first.
  • From there, you’d add a webhook to a flow that updates the profile in the flow by appending to that property. You’d use the Create or Update Profile endpoint to achieve this.

Have you used webhooks before? They do require a bit of coding, so you may want to check out our guides on webhooks, or alternatively reach out to your developer to help you out! In short, you’d drag a webhook into the flow, add https://a.klaviyo.com/api/profile-import as the destination URL, and enter the event variables for the purchased items into the JSON payload as a list property (in the APPEND OBJECT section).

The end result of this would be a flow that uses a webhook to add the item names as property values on a person’s profile.

Let me know if I can answer any additional questions regarding this!

-Byrne

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

1 reply

Byrne C
Community Manager
Forum|alt.badge.img+10
  • Community Manager
  • 56 replies
  • Answer
  • January 27, 2025

Hi ​@Woodhope!

Thanks for posting this question! This can be done, and would take a couple steps.

  • First, add a profile property update block at the beginning of the flow, so the property is added to people’s profiles. It won’t add the items yet, but that’s okay. We just want the property on the profile first.
  • From there, you’d add a webhook to a flow that updates the profile in the flow by appending to that property. You’d use the Create or Update Profile endpoint to achieve this.

Have you used webhooks before? They do require a bit of coding, so you may want to check out our guides on webhooks, or alternatively reach out to your developer to help you out! In short, you’d drag a webhook into the flow, add https://a.klaviyo.com/api/profile-import as the destination URL, and enter the event variables for the purchased items into the JSON payload as a list property (in the APPEND OBJECT section).

The end result of this would be a flow that uses a webhook to add the item names as property values on a person’s profile.

Let me know if I can answer any additional questions regarding this!

-Byrne