Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi! It would be great if you could create a flow to reallocate an order to a new fulfillment location that has stock of the item when a fulfillment location can't fulfill the order and sets the order fulfillment on pause.
Also if the flow could only reallocate to a fulfillment location with stock it would be awesome.
I think that is possible, but there isn't a way to solve that for everyone. For example, you probably want to exclude certain locations regardless of inventory (like retail locations)
Hi Paul! Thanks - if you have a suggestion on how to do it I wouldn't mind if it included all locations - also retail locations - as long as they had stock of the item. 🙂
Sorry for delay...was on vacation..
Writing the condition first isn't going to help until you distill your problem a bit. I think I'd start with what would trigger the workflow. How do you know the fulfillment location can't fulfill the order?
I think what you are saying there would suggest using "Order ready to fulfill" as the trigger, as it guarantees the fulfillment orders (and locations) have already been assigned. It runs per fulfillment order / location when it is moved to "open".
I built at a quick test...this is fairly difficult because of how the API works for fulfillment orders. But I tested and it seems to work:
Query for get product variant data, which is needed because a fulfillment order doesn't have a way to directly access a variant:
{%- for lineItems_item in fulfillmentOrder.lineItems -%}
(sku:{{lineItems_item.sku}}){% if forloop.last != true %} OR {% endif -%}
{%- endfor -%}
Condition panel...I'll note that I'm checking if the quantity at the location is > 0 and I'm ignoring how many things were ordered. If you want to check the ordered quantity against what's available, you could add more logic to this.
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025