Shipping zones & rate table
Grouping destinations into zones, then attaching a price table to each so checkout can quote delivery by where the box goes.
See it
What it is
A zone is a bucket of destinations you treat identically: a list of countries, states, or postcode ranges. A rate table is the set of rows attached to that zone, each row saying 'if the order falls in this band, offer this delivery method at this price'. Bands are usually keyed on order weight, order subtotal, or item count.
Three common shapes: flat rate per zone (simplest, you eat the variance), tiered rates (weight or price bands you priced from real carrier invoices), and carrier-calculated live rates (the carrier's API quotes at checkout, accurate but slow and dependent on clean product weights and box dimensions). Most stores start flat and graduate to tiers once the losses show up.
Gotcha: gaps and overlaps. A postcode that lands in no zone gets 'no shipping available' at checkout, which reads as a broken site, and a weight tier with no upper-bound row silently drops heavy orders the same way. Write a top band that runs to infinity, and test the addresses you assume nobody orders from: islands, territories, military addresses, and your own remote regions.
Ask AI for it
Build destination-based shipping rates for my checkout. Model a Zone as a named set of country, state, and postcode-prefix matchers, and a Rate as a row belonging to a zone with: method name, customer-facing delivery estimate, condition type (order weight, order subtotal, or item count), min and max for that condition, and price. At checkout, resolve the shipping address to exactly one zone (most specific match wins), return every rate whose band contains the order, and render them as selectable options sorted by price. Make the top band open-ended so heavy orders always match, and if no zone matches, show an explicit 'we do not ship here yet' message instead of an empty list.