How can I set a variable limit for Get Order Data in Shopify Flow?

How can I set a variable limit for Get Order Data in Shopify Flow?

Sammy_S
Shopify Partner
1 0 0

Hi, 

 

I'm trying to use Shopify Flow to add and remove order tags relevant to product SKU's on backorder. I have everything that I need working for this apart from, I'm struggling to find a way to limit the number of orders the Get Order Data action gets using a variable. I was wondering if this is even possible? 

To expand on this, I'm starting the flow when a product quantity changes, triggering the get order data using an advanced query, and then using that data to remove certain tags. For example, if I have 5 on backorder but only 2 arrive, I want to only remove the oldest 2 tags. But without manually fixing the limit in the top setting, I can't find a line that will make this limit variable. 

My code for the get order data so far is: 

fulfillment_status:unshipped AND NOT status:cancelled AND tag:"BackOrder {{ productVariant.sku }}"

 

Sammy_S_1-1702231699246.png

 

Anyway! Any suggestions would be greatly appreciated, 

 

Thanks, 

Sam. 

Reply 1 (1)

paul_n
Shopify Staff
1336 151 305

You cannot currently set that limit dynamically. 

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.