What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: Help with Shopify Flow - Tag orders with out of stock inventory or change fulfilment to hold sta

Re: Help with Shopify Flow - Tag orders with out of stock inventory or change fulfilment to hold sta

linzal
Explorer
70 0 17

Hi @paul_n we currently have the following flow:

Order created> check if current quantity is less than 1 and tags does not include xxx (this filters digital products) then add order tag HOLD.

 

Ideally we would like to have a full flow that removes the tag when the item is in stock and the order can be fulfilled. I've tried but it says I need more data. Do you have any thoughts on this and whether the flow above suffices to at least show it as on hold.

Replies 5 (5)

paul_n
Shopify Staff
1445 157 334

I moved this to it's own thread because it's separate need. You cannot wait in a workflow until the product is in stock. Typically to track inventory changes you would use the inventory quantity changed trigger. However, that has no relation to an order. You could do something like:

 

Inventory qty changed

If previous qty <= 0 and current qty >= 1 

     Get orders that have SKU = variant.sku and are on hold

          For each order

                Remove hold

 

This is pretty complicated, so I can't really get you all of the way there via this community. Post back if you have questions as you try to build that

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.
Emamaco
New Member
6 0 0

Hey Paul I am trying to do the same thing.

but im struggling to implement your solution above in flows.

can you provide some more details around each step.

i just want my team to know which orders can go out… 

paul_n
Shopify Staff
1445 157 334

Which "More details" do you need? I'd recommend sharing where you are stuck

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.
Emamaco
New Member
6 0 0

Thanks for replying so fast! Here's what I have so far in detail, I am not sure if my query is right or if this will work at all?
This is just to tag orders that can be sent after inventory changes. Note we use tags rather than holds.

trigger - product inventory quantity changed
then
check if inv qty prior is less than or equal to 0
AND
inventory qty is greater than or equal to 1
THEN

Do this...

Get order data (max 100 orders)
advanced query is:
Query: sku:{{productVariant.sku}}
THEN
For each...
item in getOrderData

Do this for each item
Do this...
Add order tags
INSTOCK

Emamaco
New Member
6 0 0

Also to add to the below in the query how do i add to this so that we are only querying unfulfilled orders?

Thanks for replying so fast! Here's what I have so far in detail, I am not sure if my query is right or if this will work at all?
This is just to tag orders that can be sent after inventory changes. Note we use tags rather than holds.

trigger - product inventory quantity changed
then
check if inv qty prior is less than or equal to 0
AND
inventory qty is greater than or equal to 1
THEN

Do this...

Get order data (max 100 orders)
advanced query is:
Query: sku:{{productVariant.sku}}
THEN
For each...
item in getOrderData

Do this for each item
Do this...
Add order tags
INSTOCK