I believe you can’t do this directly with Flow builder.
You’d need to use Liquid to do it.
Not sure what Action you want to perform with this count, but in the “Value” entry field you can enter Liquid similar to this:
{%- liquid
assign count = 0
for li in order.line_items
if li.product.handle == "handle-of-special-product"
assign count = count | plus: li.quantity
endif
endfor
-%}
In this order there is {{ count }} of our special product.
Thank you for the response. Im not sure if this helps clarify things but the logic Im trying to build is:
When an order is created If the order contains certain products Flow will add a line item [product] to the order (this is where the confusion starts for me) I want to add the line item quantity based on the number of products ordered