Quantity Limit Of Certain Product Types | Draft Orders - Flow

Solved
CossetDataWiz
Excursionist
11 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)

Accepted Solutions
paul_nuschke
Shopify Staff
29 5 9

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`

 

 

View solution in original post

Replies 2 (2)
paul_nuschke
Shopify Staff
29 5 9

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`

 

 

View solution in original post

CossetDataWiz
Excursionist
11 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?