Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi,
I'm trying to add the pickup location as a tag but it does not work right now. I'm doing this
{%- assign pickup_location = "" -%} {%- for li in order.lineItems -%} {%- if pickup_location == "" and li.fulfillmentService.location.name != blank -%} {%- assign pickup_location = li.fulfillmentService.location.name -%} {%- endif -%} {%- endfor -%} {{ pickup_location }}
But it is always adding the first location even though it's not the one selected for this order.
Can someone help ?
Thanks
First, I typically test code like this in "log output" so I don't mess up my shop data and I can see the variables.
A fulfillment service on a lineItem is one that stocks that particular product but not the one used for the order. Also this is deprecated, so I don't recommend using it at all.
If you want to know which location it was assigned to be fulfilled from, that info is on: order / fulfillment orders / assigned location
Note that fulfillment orders are assigned after an order is created, so you cannot use "order created" as the trigger (reliably, unless you add a wait step after it of ~ 10 min). Better to use "fulfillment order ready to fulfill".
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024