Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
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
Solved! Go to the solution
This is an accepted solution.
Hi!
I have gotten this to work for me! I'll attach a screenshot of what my flow looks like, I have other parts to it that's more specific to my purposes but I took a screenshot of the basic part to add the "Multi" tag. Hopefully it works for you. Let me know if you have any questions and I'll do my best to help!
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.
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.
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.
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.
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.
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.
Hi Paul_n!
Came across this thread and found it super helpful! I was able to get my orders tagged by fulfillment location but have now run into another issue. We have 4 different locations and I'm trying to add a "Multi" tag to an order if the order has items being fulfilled from more than one location. I've created flows that say "if fulfillment order assigned location is 1 and 2 then add a Multi tag", "if fulfillment order assigned location is 1 and 3...", "if fulfillment order location assigned is 1 and 4...", "if fulfillment order assigned location is 2 and 3...", and so on to cover all scenarios. So far I haven't been able to get the "Multi" tag added and I'm thinking it could be because when the flow starts, it looks at each line item in the order so it'll pass for one criteria but fail for the next since one single item can only be fulfilled from one location (if that makes sense). Can you think of a way I can get the flow logic to look at all items in the order and check all of their fulfillment locations so that I can add that "Multi" tag? I need that to filter off of for another platform we will be using. Any help would be much appreciated!
Personally, I would use the Run code task instead as you can do all of that in one task, and it would handle if you opened another location in the future.
What trigger are you using? How are you accessing the locations in your conditions?
I'm triggering off of Order ready to fulfill and grabbing the location by fulfillmentOrder.assignedLocation.name. However, once the workflow is triggered, it checks one item against both conditions I have set (fulfillment location is a and b then add tag) but I'd like it to check all fulfillment locations for the order instead of by item. Is that possible with the workflows? Or do you think using the Run code would be best?
That trigger runs per fulfillment order so you will run that logic multiple times per order (not necessarily bad but something to watch out for).
You could use order created -> wait 5 minutes to give fulfillment orders time to be populated.
I would use Run code to check for the number of fulfillment locations, unless you can assume each fulfillment order is different. If so, you could just count the number of `order / fulfillment orders` with a count step.
I'm not sure what line item logic you are referring to, but if you wanted logic for the order / lineItems, this would be a better approach too.
Can you take a look at this workflow set up I have currently? I've edited this so many times and I'm not sure really what to do next. I'm no coder but if you think using Run code would work best then I'll look into that.
A fulfillment is a shipment. You want fulfillment order / assigned location / id to check the location. Use the ID field and you'll get a picker to choose the location
Thank you for catching that! I will make that change on all of my workflows now and hope it works! 🙂
Hi Lena, did it work? Tried the same but so far can not get it working correctly.
This is an accepted solution.
Hi!
I have gotten this to work for me! I'll attach a screenshot of what my flow looks like, I have other parts to it that's more specific to my purposes but I took a screenshot of the basic part to add the "Multi" tag. Hopefully it works for you. Let me know if you have any questions and I'll do my best to help!
Hello, could you please share the whole workflow, Thankyou.
Hi!
The rest of my workflow are specific steps for my purposes, which is removing certain tags (naming specific to our business and locations). What I had attached before is the actual workflow that I use to add the Multi tag. After the "check if count is great than 1" then I have the "add order tag" step to add the "Multi" tag to the order. Hope that helps!
Hello, 😄
I actually did this, and it worked so thx for ur help 🙂
Yay! So glad you got yours working! 🙂
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024