Hi @Prunella, happy to help. This is a great question!
Also welcome to the Community!
There are two ways i can think of doing this.
1. I think your best bet for this is shopify flow and pushing customer properties
It sounds like X,Y & Z products make up the Product Group/Collection A?
So then you can set a flow up to push “Buyer of Group X” property and then use that customer property to trigger a flow
2. You set up a ordered product triggered flow and filter by the product id from shopify.
So If ordered product ID = 123456 or 456789 then trigger.
The only issue with this route is that you would need to set up multiple flows, based on the product groups you want to use.
Hope that helps! Let me know if you need anything else.
Thank you @TimMartinHarvey for your response.
Regarding the first suggestion you made, I understand the idea but I also really need to count the amount of times a client buys product X (or A). It’s almost like I need it do be an event on its own. Something like when the Ordered Product event is created on Shopify, whenever the products x, y, z, etc are in the order, an event data is added to specify tampon_product = “product A”
I don’t know if it’s even possible
Hello @Prunella To add to what @TimMartinHarvey mentioned, instead of trying to restructure your shopify products or setting up multiple fows, one option is to create a custom event in klaviyo like bought product X grop- triggered when someone purchases any of those grouped products(x, y, z etc) you can hande this using shopify flow to detect the product IDs and then send a webhook to klaviyo using their track API.
The benefit of this is that klaviyo will start tracking that event seperately, and then you can build a segment or flow based on how many times someone has done that event like ''Has done ordered product X Group atleast 2 times in the last 60 days.
this avoids the issue of trying to count with profile properties since klaviyo doesn't supportbincrementing and you won't need to list all products manually everytime. it becomes a cleaner and more scalable setup. if you want,i can share how to structure that webhook or a sample shopify flow setup to get it running, let me know.
Hi, @MANSIR2094 !
Thanks for your answer, I also think it’s the best way to handle it. I would love an example of how to set it up, if you don’t mind.
Thanks again
Sure happy to help!
You can do this with shopify flow and klaviyo's track API. What you want us to create a custom event like "bought product X group" whenever someone buys any of the grouped products like x, y, z etc.
In shopify flow, set the trigger as order created then add a condition to check if the product ID matches any of those in the group. If it does, the action will be to send and http request.thw webhook will post to https; //a. klaviyo.com/API/track, and in the body you will include the klaviyo private API key, customer email , and any product/order details you want to track something like this:
{
"token": "YOUR_PRIVATE_API_KEY",
"event": "Bought Product X Group",
"customer_properties": {
"$email": "{{ customer.email }}"
},
"properties": {
"product_names": d"{{ line_items.title }}"],
"order_id": "{{ id }}"
}
}
This way, klaviyo will start tracking that event separately, and then you can build logic like " Has done event atleast 2 times in the last 60 days without the need to track profile properties.
But all this flow will depend on your product structure