New Shopify Certification now available: Liquid Storefronts for Theme Developers

How to automatically tag order based on fulfilment location?

Fed-Graphics
Visitor
3 0 0

Hi, Does someone know how to automatically tag an order based on the fulfilment location? I have looked at all Shopify Flow conditions and can't find something suitable. 

 

Many thanks, 

Alex

Replies 7 (7)
G-L
Shopify Staff (Retired)
Shopify Staff (Retired)
29 4 10

This template tags an order's Customer based on Order.physicalLocation which might be what you are looking for. 

I found it in the template view of Flow searching for "location".

 

To learn more visit the Shopify Help Center or the Community Blog.

G-L
Shopify Staff (Retired)
Shopify Staff (Retired)
29 4 10

I also received another suggestion which is to use https://shopify.dev/api/admin-graphql/2021-10/objects/FulfillmentOrder#field-fulfillmentorder-assign... which might be more appropriate for online orders.

To learn more visit the Shopify Help Center or the Community Blog.

Fed-Graphics
Visitor
3 0 0

Thanks for this but it's not really what I'm after. We have an online store with 2 different locations and sometimes location 1 doesn't have the product so location 2 needs to dispatch it. Based on this, how can Flow automatically tag an order depending on which store needs to dispatch it? I hope this makes sense. 

G-L
Shopify Staff (Retired)
Shopify Staff (Retired)
29 4 10

I wonder if this template can help: this implied there is a fulfillment order in existence and you have to create N condition paths for the locations you want to be tagged. 

To learn more visit the Shopify Help Center or the Community Blog.

JoesIdeas
Shopify Expert
2039 184 538

@Fed-Graphics  if you don't have any luck achieving this with Flow, as a backup option you can use Order Automator app. It can tag orders based on fulfillment location (and many other criteria), optionally notify someone by email, and even change the location if you want, depending on inventory.

 

If you need any help with it feel free to reach out to orderautomator.com/contact, we do customizations too.

• Creator of Order Automator (automate tagging, fulfillment, Amazon, notifications + more)
• Shopify developer for 10+ years, store owner for 7 years
• I also make guides like Shopify Automation Tips and How to Deal with Fraud / Chargebacks
paulnguyen
Shopify Partner
45 0 3

Hi @Fed-Graphics  May I know why you want to tag order based on fulfillment location? 'Cause I often see merchant mark order by fulfillment status.

paul_n
Shopify Staff
Shopify Staff
614 98 158

Just to give a little more clarity to how things work...when an order is created a background job kicks off to assign the lineItems to one or more fulfillment locations. Because the locations are not ready at the time Order Created is fired, this is why you need to use "Order Ready to Fulfill" as the trigger. This trigger fires for each fulfillmentOrder (a set of lineItems assigned to a single location). 

 

As per the template you can then check "fulfillmentOrder / assignedLocation / name" for a location, or use that same variable in the tag action to output the location name to a customer or order tag. 

 

If you need to check inventory for lineItems in the order at a specific location, that is also possible in Flow, but quite a bit more complicated.  If so, please provide more details about what you want to have happen. 

 

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.