Skip to content

Sort shipping rates

A sort shipping rate operation changes the order in which shipping rates are listed to the customer at checkout. Shopify normally lists rates in a fixed order; a sort operation lets you control that order — by price, by name, by rate code, or by a custom priority you define.

Use a sort operation when:

  • You want your cheapest or fastest option at the top of the list every time.
  • You want to group certain carriers together (e.g. all UPS rates first, then USPS).
  • You want to put a slower-but-cheaper option ahead of a faster-but-pricier one for certain carts.

A sort operation has three parts:

  1. Sort configuration — the sort kind, the field (or buckets), and the direction.
  2. Conditions — a list of if clauses. All must be true for the sort to apply.
  1. Open Shipping → Sort Operations in the app.
  2. Click Create Operation.
  3. Give the operation a name.
  4. Sort type — pick Field Sort or Custom Sort. See below.
  5. Conditions — add as many as you need. All must be true.
  6. Click Save. The operation publishes through the background job.

Field Sort orders rates by a single field on the rate itself. Choose:

  • Sort fieldPrice, Rate Title, or Rate Code.
  • Sort directionAscending or Descending.

The sort is stable: rates with the same value for the chosen field keep their relative order.

Example: “always show the cheapest rate first” → Field Sort by Price, Ascending.

Custom Sort lets you define a priority order by grouping rate names or codes into buckets. Each bucket is a set of values that get the same priority. A wildcard bucket, * (shown as “Everything Else”), catches any rate that didn’t match a specific bucket.

The form’s + Add Bucket creates a new bucket. Drag and drop buckets to set their order. The first bucket in the list has the highest priority.

Example: “show UPS rates first, then USPS, then everything else” →

  • Bucket 1: UPS Ground, UPS 2nd Day Air, UPS Next Day Air
  • Bucket 2: USPS Priority, USPS First Class
  • Bucket 3 (wildcard *): everything else

Sort operations have the same condition shape as hide and rename. All conditions must be true for the sort to apply. If conditions are false, the rate list falls back to Shopify’s default order.

A common pattern is to combine a sort with a destination condition: “sort rates this way for Canadian customers, leave them alone elsewhere.”

Sort operations count toward the plan’s operations limit.

Goal: for carts over $100, always show the cheapest rate at the top.

  • Operation name: Cheapest first for big carts
  • Sort type: Field Sort
  • Sort field: Price
  • Sort direction: Ascending
  • Conditions:
    • shipment_value greater than 100 (Shipment)
  • Save.