Configuring Postcodes
Table Of Contents
Postcodes are used throughout Khaos Control to determine how particular rules and settings should be applied. For example, postcode matching can be used with Courier Banding, Delivery Rates and Invoice Rules.
Khaos Control supports partial postcode matching, postcode ranges and, with the default matching method,
% wildcards.Warning: Delivery Rate configurations can be complex. Incorrect settings can result in the wrong delivery charge being applied to Sales Orders. Always test new or amended Delivery Rate configurations thoroughly in your test system before using them in your live system. Delivery Rates can be based on country, zone or postcode, as well as order weight and value.
Postcode matching methods
Khaos Control has two postcode matching methods:
- Default Postcode Matching: The standard method. Available from version 8.187, this supports
%wildcards and more flexible postcode ranges. - Original Postcode Matching: The older matching method, retained for compatibility with existing configurations.
New configurations should normally use the default method.
If you need to revert to the original postcode matching method, contact Support.
Countries and UK delivery zones
The Isle of Man is a separate country from the United Kingdom. Similar considerations apply when configuring delivery rules for the Channel Islands.
For courier banding and Delivery Rates, consider creating a UK zone containing:
- Guernsey
- Isle of Man
- Jersey
- United Kingdom
This can provide more reliable coverage than relying solely on the Country field.
Note: On a Delivery Rate record, Country, Zone and Postcodes are mutually exclusive. Only one can be used on each Delivery Rate entry.
Default Postcode Matching
Default Postcode Matching is available from Khaos Control version 8.187 onwards.
When used with the Postcodes field in
[ System Data | Courier Banding ], Khaos Control compares the first, or outward, part of the delivery postcode.For example:
NG31 7FZis matched using:
NG31Using letters
Use:
[A-Z]to represent a single uppercase letter.
You can also restrict this to a smaller range.
For example:
[B-G]matches a letter between B and G, but does not match A or Q.
Important: Postcode matching is case-sensitive. Use uppercase letters. For example,[a-z]will not match an uppercaseA.
Using numbers
Use:
[0-9]to represent a single digit.
You can also restrict the range. For example:
[3-6]matches:
- 3
- 4
- 5
- 6
but does not match 7.
Tip: Avoid[1-9]where0could legitimately form part of a postcode. Use[0-9]instead.
Combining ranges
You can combine letter and number ranges.
For example:
[B-G][D-G][1-3]can match an outward postcode such as:
DF1It would not match
DF14 because the expression defines three characters.Using wildcards
Use
% as a wildcard.For example:
NG3%can match values including:
NG3NG31NG3C
Wildcards can make postcode configurations much easier to maintain when several related postcode areas should follow the same rule.
Jersey, Guernsey and Isle of Man
To match these postcode prefixes, use:
GY%,JE%,IM%Original Postcode Matching
The original matching method provides more limited postcode matching.
Spaces are automatically removed from postcodes when matching.
Examples of postcode groups historically used in courier configurations include:
| Area | Example configuration |
|---|---|
| Channel Islands | GY, JE |
| Isles of Scilly | TR21[1-9], TR22[1-9], TR23[1-9], TR24[1-9], TR25[1-9] |
| Isle of Wight | PO30[1-9] through to PO41[1-9] |
| Isle of Man | IM |
| Northern Ireland | BT |
| Scottish Highlands and Islands | Prefixes including HS, IV, KA27, KA28, KW, selected PA and PH areas, and ZE |
Important: These are examples only. Do not rely on historical postcode lists when configuring your own delivery rules. Check the exact areas and postcode definitions required by your courier.
Entering postcode ranges
Do not enter conventional-looking ranges such as:
NG1-NG22or:
NG1-22These are not interpreted as postcode ranges.
Instead, either enter the individual areas you need:
NG1, NG2, NG3, NG8, NG22or use an appropriate postcode pattern.
For example:
NG[0-4]represents postcodes beginning:
NG0NG1NG2NG3NG4
This format can be used in the Courier Banding and Delivery Rates screens.
Matching more specific postcodes
You can also configure more precise postcode areas.
For example:
NG31 6can be used when you need to identify that particular postcode area. Full and partial postcode definitions can be used in Delivery Rates.
Important: Do not enter a single postcode digit inside square brackets when defining a specific area. For example, do not useNG31[6]. This can invalidate the Delivery Rate.
Postcode matching priorities
Careful ordering is particularly important where several postcode patterns could match the same address.
Put the most specific postcodes first
Khaos Control uses the first applicable postcode match it finds.
Always place your most detailed postcode rules before broader rules.
For example, imagine:
Nis configured for a London motorcycle courier.NGis configured for Nottingham.
If
N is checked before NG, an address such as NG31 7XY could match the broader N rule first.Configure the more specific
NG rule ahead of the general N rule.Use the Priority field
Where a numeric priority is entered, Khaos Control attempts to match entries in ascending numerical order.
A practical approach is to start at:
100and increase priorities in increments of 5 or 10:
100, 105, 110, 115, 120This leaves room to insert additional rules later without having to renumber the whole configuration.
Before using your postcode rules
Before introducing new postcode rules into your live delivery process:
- Check the latest postcode definitions supplied by your courier.
- Enter the required patterns in your test system.
- Check specific postcode areas as well as broader matches.
- Test boundary cases, including postcodes containing
0. - Test Channel Islands, Isle of Man and Northern Ireland requirements separately where applicable.
- Check overlapping postcode patterns in priority order.
- Create representative Sales Orders and confirm that the expected courier and delivery charge are selected.
- Only introduce the configuration into your live system once you are satisfied with the results.
This is particularly important because if Khaos Control cannot find a matching Delivery Rate, the Sales Order delivery charge can be set to £0.00.