Create a flow to change the Shipping method

WilliamWolff
Shopify Partner
1 0 1

 

Is it possible to adjust the shipping method based on certain criteria, like the country in the shipping address?

 

I have a size exchange app for my customers that automatically generates new orders for product size exchanges. However, all the outgoing orders from this app have the same shipping method ("Free shipping for exchanges"). I need the shipping title to be unique for each country, so I can properly link the shipping title to the shipping method in my shipping app.




So I need to flow that works like this:
(Example)


If

Shipping method = Free shipping for exchanges

And
Receiver country = Finland

Then
Rename shipping method = UPS Finland



Replies 3 (3)

MastersHub
Shopify Partner
214 20 36

If you have Shopify Plus, you can do this. You can use APIs like Local Pickup Delivery Option Generator API, Delivery Customization Function API, and Shipping Discount Function API. 

 

If you don't have it, you can use a custom-made app for yourself.

Helpful ? Like and Accept Solution
Buy me a Coffee
Need a Shopify Developer?
Send Email or Chat on WhatsApp

paul_n
Shopify Staff
796 118 191

For checking the shipping method, check order / shippingLine / title (or one of the other fields on shippingLine): https://shopify.dev/docs/api/admin-graphql/2024-01/objects/ShippingLine

 

To check the country, you would check order / shippingAddress / country.

 

You cannot rename a shipping method. I'm not sure you can actually change the shipping line on the order.

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.
Kalen_Jordan
Shopify Partner
342 12 47

Seems you may not be able to change the shipping line :

https://community.shopify.com/c/payments-shipping-and/changing-shipping-method-on-existing-order/td-...

 

That said, there is a OrderStagedChangeAddShippingLine object in the api that could indicate it's possible:

https://shopify.dev/docs/api/admin-graphql/2024-01/objects/OrderStagedChangeAddShippingLine

 

Seems like it is possible in draft orders, though I'm not sure how useful that would be here.

Kalen Jordan
Platform Advocate
MESA - Shopify Automation You've Love