Using Shopify Flow to edit the shipping fee

Shopify Partner
14 0 6

I'm using the Shopify Flow app and am trying to create an automation that will either change the shipping fee or discount it when the order ships from two different locations. Our shipping rate is $10 but when the order is split between two locations, the customer gets charged $20. We would only like them to only be charged $10.


I set up a flow to access the order before it's completed by using Order Risk Analyzed as the trigger. It checks to see if the shipping fee is $20. The action is Update Order Metafield to change the price to $10.


Unfortunately this isn't working. I'm assuming my set-up for the metafields is incorrect, but I can't be sure.


Here's what it looks like.

Screenshot 2022-06-23 at 4.08.21 PM.png


And the details for Update Order Metafield

Screenshot 2022-06-23 at 4.09.20 PM.png











Thanks for any help!

Replies 2 (2)

Shopify Staff (Retired)
29 4 10

Hi @KarebouDesign it would be helpful to know how is it not working, if there is an error or simply the metafield appears different from what expected. 

A few points I noticed:

1) Order risk analyzed depends on a different set of events than order completion so I don't think it's guaranteed it will run before order completion.

2) Currently you are using liquid to define the namespace and key to the metafield you want to update or create. 

In the namespace field what will populate is the list of all existing metafield namespaces, and in the key definition the current shipping cost of the order.

Especially the namespace part seems counterintuitive as namespace and key are identifiers used to group metafields together. 

Usually I'd expect those 2 fields define a specific metafield you want to edit, so especially the namespace being an array of all existing namespaces might be an issue?



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

Shopify Partner
14 0 6

Hi @G-L thanks for your reply. The current set-up isn't throwing any errors, but it's also not changing the shipping rate which is what I meant by saying it wasn't working.


I was hoping to edit the existing shipping rate, not add a new metafield, but I don't think I'm going about it the right way. There are numerous posts in the forum about trying to fix the double shipping charge, but there doesn't seem to be a solution. If you can suggest an alternative method, I'd be happy to hear it!


Thank you