Shipping operations
Shipping zones and postcode prefixes
Group countries and postcode prefixes once, then reuse them in any scenario or rule.
A zone is a named list of countries and postcode prefixes. Scenarios and delivery option rules use it through the Zone condition, so one zone such as "Remote islands" can drive a surcharge, a free shipping rule and a hidden Express option at the same time.
Create a zone
- In Rulify, go to Shipping zones and click Create zone.
- Enter a Zone name.
- Under Countries, select the countries. Leave it empty to match any country.
- Under Postcode prefixes, one per line, enter the prefixes. Leave it empty to match the whole country.
- Click Save.
A zone needs at least one country or one prefix.
How a zone matches
Both checks must pass:
- The destination country is in the zone's country list, or the list is empty.
- The destination postcode starts with one of the prefixes, or the prefix list is empty.
Because the country is checked too, the prefix 94 in a Thailand zone does not match a French address with postcode 94200.
Prefixes match the start of the postcode
Each entry is compared with the beginning of the customer's postcode. The more characters you enter, the narrower the match.
| Entry | Matches |
|---|---|
94 |
Every postcode starting with 94, from 94000 to 94999 |
9411 |
94110 to 94119 |
94110 |
94110 only |
SW |
SW1, SW1A, SW19 and every other postcode starting with SW |
Case and spaces are ignored. sw1 a and SW1A are the same entry. Letters work as well as digits.
Turn a long list into a few prefixes
Carriers often send remote-area coverage as a list of full postcodes. This Thai list has 32 codes:
94000, 94110, 94120, 94130, 94140, 94150, 94160, 94170, 94180, 94190,
94220, 94230, 95000, 95110, 95120, 95130, 95140, 95150, 95160, 95170,
96000, 96110, 96120, 96130, 96140, 96150, 96160, 96170, 96180, 96190,
96210, 96220
Every code starts with 94, 95 or 96, so the zone needs three entries:
94
95
96
This also covers codes added by the postal service later.
Choose the length to fit what you ship:
| Goal | Entry |
|---|---|
| Everything in the 94, 95 and 96 ranges | 94, 95, 96 |
| Only 50260 to 50269 | 5026 |
| One postcode | 50260 |
| Every UK postcode in SW or EC | SW, EC |
A two-character entry is wide: 50 covers everything from 50000 to 59999.
What happens when you save
Rulify cleans the list:
- Spaces are removed and letters are upper-cased.
- Duplicates are removed.
- An entry already covered by a shorter one in the same zone is removed.
94and94110together become94.
No address that matched before the cleanup stops matching after it.
The 50-prefix limit
A store can hold 50 postcode prefixes in total across all zones. The Prefix budget under the list shows how many are used, for example "12 of 50 prefixes used across all zones". A save that would go over the limit is refused.
The limit comes from Shopify's delivery customizations. If older zones hold more than 50 prefixes, Rulify shows a warning on Shipping zones, and delivery option rules use only the first 50. Shipping rate scenarios are not affected.
To get back under the limit:
- Start with the zones that have the longest lists.
- Replace each run of codes with the prefix they share.
- Remove codes you no longer ship to, and zones marked Not used.
- Save. The warning clears when the total is 50 or less.
Delete a zone
Scenarios that use a deleted zone stop matching it. If the Safety fallback rate used the zone, the fallback is turned off.
Check your work
On Shipping rates, click Test a cart, enter the postcode you want to check, and see whether the scenario matches. The test reads the same zone data as checkout.
Common questions
Can I match the middle of a postcode? No. Matching always starts at the first character.
What about addresses without a postcode? They match only zones with no prefixes, where the country decides.
I need more than 50 individual codes. Most lists shrink to a few prefixes. Open a ticket at support.lisive.com with the list and we will help you shorten it.