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
- 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
The solution for this would be to replicate our shipping options, as seen below:
By comparison, the CSV below would not work:
If you try out the bottom CSV, directly above, you will see that if you specify a zip code from Alaska (AK) or Hawaii (HI) the option for “Ground ” only will be displayed – 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”.
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 the first four rows of the top CSV, as AK and HI have already been specified, AK and HI will not be matched on the rows with asterisks (*), therefore we also have to specify that AK and HI have a “Next Day” delivery type.