The first 5 columns in the CSV file are used to define the destination filtering. Using this it’s possible to set different rates for Hawaii and Utah, London and the Shetlands, Perth or Sydney, to name just a few.
Destination filtering can include a combination of one or more of country, state, city, or zip code.
All our shipping extensions work on a “best match” basis. It will try to match on all the address initially; if rates are found it will stop searching, if not then it will reduce the search criteria and search again.
The search will attempt to match the entered destination as follows:
- Country, State, City, Zipcode
- Country, State, City
- Country, State, Zipcode
- Country, State
- Country
- Worldwide (* in country)
Once a match is found it will stop searching.
Example of Best Match in Practice
The shipping rules are:
- $10 Ground Shipping to US lower 48
- $20 Next Day Shipping to all of USA
- $15 Ground Shipping to Alaska, Hawaii
This example is using Premium Matrix.
The solution for this would be to replicate our shipping options, as seen below:
By comparison, the CSV below would not work:
However, if you try this out you will see that if you specify a zip code from Alaska (AK) or Hawaii (HI) you will see the option for “Ground ” only – the “Next Day” option will be missing. The extension will only match on the line that specifies Alaska/Hawaii, not the one with the asterisk. This is the “best match”.
Explanation
Our shipping extensions work on a “best match” basis. It will try to match on all the address initially; if rates are found it will stop searching, if not then it will reduce the search criteria and search again.
An asterisk within the destination conditions means “everything else”. Because we have specified that AK and HI have their own “Ground” delivery type, this affects all of the other rows.
For example, in row 4 of the top CSV, as AK and HI have already been specified (in row 3), AK and HI will not be matched on this row, therefore we also have to specify that AK and HI have a “Next-Day” delivery type.