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

Shopify Partner
1 0 0



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 }}"




Anyway! Any suggestions would be greatly appreciated, 




Reply 1 (1)

Shopify Staff
1011 133 242

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.