Change the order of third-party carrier calculated shipping rates

5 0 2

Hi Shopify

The CarrierService documentation shows how to create your own custom shipping rates for the Shopify checkout.

I've developed a custom carrier rates application to suit my business which in real time calculates several shipping rates for the customer based on the current day, and shows a number of shipping rates which represent a specific delivery day and the rate for that day.

My business relies on customers choosing their own nominated delivery date for their order and while there are third party apps on the Shopify marketplace that allow customers to do this before reaching the Shopify checkout, none of these can modify the shipping rates the customer will be offered.

Through my own testing, I've seen that the shipping rates available to customers are automatically ordered by total_price, from lowest to highest. If two shipping rates are the same total_price, then each character in the service_name of the shipping rate will be used to sort them from A-Z.

Please see my screenshot below/attached as an example of this.

I'd hope that a Shopify development team can review this post and possibly triage this request to change how shipping rates are ordered on the checkout. I feel that the carrier service should be the one that determines which order the shipping rates should appear in as the carrier service outputs a JSON array containing the rates. The order of the rates in this array should be the order that the rates appear during checkout.

Please see my JSON which gives the output in my checkout screenshot below.


From searching the community forum, it appears some people are asking for similar requests when using Shopify default shipping rates feature (not a CarrierRates service) so I hope that this request is not confused with this as it applies primarily to the CarrierService