New Shopify Certification now available: Liquid Storefronts for Theme Developers

Check if orders contain 7 or more products from a specific collection

2 0 0



Now I want to create a flow to check if my customer's order contains 7 or more products from a specific collection.


Sometimes, an order will contain different products from different collections at the same time.

For example, the order contain product A from Collection 1, product B from Collection 1, and product C from Collection 2. And now I want to check if the order contains 7 or more products from Collection 1.


How can I set the condition? I just found that I can set conditions to check the collection id ( , but I can't check there have how many line items from the collection.


Thank you very much!

Replies 2 (2)
Shopify Staff
Shopify Staff
614 98 158

There isn't currently a way to count in the condition step. If Flow has a filter step, you could take a list (like the lineItems) and then filter that list by the same kind of condition and then count afterwards.


For now, if you need to count you have to do it via Liquid in an action. What action do you need to do with that count?

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
2 0 0


I need to add a product to this order after counting.