Quantity Limit Of Certain Product Types | Draft Orders - Flow

Solved
CossetDataWiz
Excursionist
21 1 2

Hello!

I am looking to create an email trigger if a Draft Order is placed with certain Product Types that are over a "Max" quantity.  The trigger I thought would work is:

"IF

(any of shop/product types) ProductType is equal to A

AND

(any of draft order/line items) Quantity is greater than 10

THEN"

The problem is if 'ProductType A' is in the order at under 10, but 'ProductType B' is over 10 (which is allowed), then it sends the trigger.  There doesn't seem to be a condition to check if a specific ProductType is over the limit and the dropbox for "any of draft order" won't point to the previous condition.  Any ideas?

Accepted Solution (1)
paul_n
Shopify Staff
Shopify Staff
313 59 97

This is an accepted solution.

This doesn't make sense because it's checking all of your Shop's products and not the Draft Order's products:

`(any of shop/product types) ProductType is equal to A`

There is a limitation in the current version of Flow that doesn't let you access product data for a lineItem. The version coming very soon (some merchants have already been moved over) allows access to all of that product data, so I'd recommend waiting for it. 

We are also working on an improvement for the new version of Flow that will allow you to write multiple conditions for a specific item in an array, which is I think was you want to do. Something like:

`if any of order / lineItems has a product.category = A and quantity > 10`

 

 

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.

View solution in original post

Replies 2 (2)
paul_n
Shopify Staff
Shopify Staff
313 59 97

This is an accepted solution.

This doesn't make sense because it's checking all of your Shop's products and not the Draft Order's products:

`(any of shop/product types) ProductType is equal to A`

There is a limitation in the current version of Flow that doesn't let you access product data for a lineItem. The version coming very soon (some merchants have already been moved over) allows access to all of that product data, so I'd recommend waiting for it. 

We are also working on an improvement for the new version of Flow that will allow you to write multiple conditions for a specific item in an array, which is I think was you want to do. Something like:

`if any of order / lineItems has a product.category = A and quantity > 10`

 

 

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.
CossetDataWiz
Excursionist
21 1 2

Thanks!

When I looked up Product Type, that was the only option.  I could not find anything in the Draft Order API that checks product type.

I just cracked open Flow yesterday so I'm still learning the nuances, but I'm excited for the new version.  How soon can we get moved over?