Region Rule Types
Define simple rules that target a whole postcode as an exact match
Define rules that target numerical postcodes within a given range
Define rules that will exactly match the first part of a postcode.
Define rules that match partial postcodes within a given range.
Define rules that match against various parts of the destination address.
There are a number of rule types that you can use when entering ‘Match Rules’ or ‘Exclusion Rules’ for a Region. Understanding how these rules work and when best to use them will allow you to quickly create sets of rules that target anything from individual postcodes to large regions of a country.
Before we take a look at the different rule types available, it’s useful to have an understanding of the three broad ‘types’ of postcode format.
Postcode format types
Whilst there are a large number of different postcode formats in use around the world, any given postcode format will fall into one of three main types:
This postcode format type is made up exclusively of numbers. In the vast majority of cases these numbers are sequential and describe specific areas.
Australia has a numerical postcode system - all postcodes are either three or four digits long e.g. 123 or 1234.
This format type contains a mix of numbers and letters (often these letters match the two-letter country code). However the letters are a ‘fixed’ portion of the format and apply to all postcodes. Ultimately it is the numbers within these postcodes that actually identify a given address.
Lithuania uses a pseudo-numerical postcode format e.g. LT12345. The LT at the start is ‘fixed’ and does not change between addresses. The 12345 at the end of this postcode is actually used for matching.
An alphanumeric format contains a mix of numbers and letters that follow a specific pattern but can be entirely random. Unlike pseudo-numeric postcodes, there is no ‘fixed’ portion of the postcode that is shared amongst all postcodes.
Canada has an alphanumeric postcode system that consists of a repeating pattern of letters and numbers e.g. A1A 1A1.
Being able to identify which postcode format type you are working with will help you to chose the correct rule types and write match rules that are easier to understand.
General tips on creating rules
The flexibility and variety of rules available should mean that most store owners can set up their rules quickly over a relatively small number of lines. Here are some tips to get you started:
Read the documentation: The overview of rules in this section is designed to help you decide which rule types are most relevant in your situation. Reading these guides will help you to write shipping rules than are concise and provide faster feedback for your customers.
Avoid copy/paste: A common mistake seen when entering rules is for a store owner to copy and paste hundreds of individual postcodes. Whilst it takes a little more work to input these postcodes as spans or wildcard span rules, the rules become a lot more readable and easier to refer to in future and also take less time to compute (meaning that your customers will get shipping rates returned faster).