Skip to main content

Limit local delivery to the areas you serve

Check a customer's postal code or address before they can choose local delivery, using postal codes, distance or a zone you draw.

Delivery validation checks that a customer is inside your delivery area before they can choose local delivery. You pick one method for your store in Settings → Local delivery, then set the area on each location: a list of postal codes, a maximum distance, or a zone you draw on a map. Customers outside every location's area can't select local delivery.


Before you start

  • Turn on local delivery in Settings → Local delivery and on each location that delivers.

  • For the distance and zone methods, you need your own Google Maps API key, with billing active in Google Cloud and the Maps JavaScript API, Geocoding API and Places API (New) turned on. Driving distance also needs the Distance Matrix API.

  • For the radius and driving distance methods, make sure each location's address is complete. The widget finds each location on Google Maps from its address.


Choose a validation method

Each method asks customers for something different and needs a different setting on each location.

Method

Customers enter

You set on each location

Google Maps key

No validation

Nothing

Nothing

No

Exact postal code match

Postal code

The postal codes you deliver to

No

Partial postal code match

Postal code

The start of the postal codes you deliver to

No

Customer within maximum radius

Address

A maximum straight-line distance

Yes

Customer within maximum driving distance

Address

A maximum driving distance

Yes

Customer within a custom-drawn zone

Address

A zone drawn on a map

Yes

To set the method:

  1. In the app, go to Settings → Local delivery.

  2. Under Validation, select a method.

  3. If you chose a distance or zone method and haven't added a Google Maps API key, the Google Maps integration window opens. Check Enable Google Maps Integration, paste your Google API key, click Validate, then click Save.

  4. Set the method's options, described below.

  5. Click Save at the top of the page.

Partial postal code options

Turn on Advanced postal code match to use patterns: _ stands for a space and * for any single character. For example, AB1_2** matches AB1 2CD, but not AB10 2CD or AB1 2CDE.

Without *, a pattern only has to match the start of the code: SW2_ matches SW2 1AA, but not SW20 1AA. Because _ needs a real space, a customer who types SW21AA doesn't match SW2_***. Add a second pattern without the _, such as SW2***, to cover both.

Distance and zone options

  • Enable address autocompletion: suggests addresses as customers type, which makes distance checks more accurate.

  • Ask customers to use their current location: a pop-up asks customers if the app can use their current location. It needs Enable address autocompletion turned on.

  • Driving distance only: Avoid highways, Avoid tolls and Avoid ferries change the route used to measure the driving distance.


Add the delivery area to each location

  1. Go to Locations and open a location that delivers.

  2. In the Local delivery card, click Show settings.

  3. Add the area for your method, as described below.

  4. Click Save.

Repeat for every location that delivers.

Postal codes

In Distance validation, type the postal codes in Eligible postal codes (exact matching), separated by commas, then click Add tag. Each code appears as a tag below the field. For partial matching, enter the start of each code, for example 112 to cover 11201 to 11249.

The field label says "exact matching" for both postal code methods.

Radius or driving distance

In Distance validation, enter the Maximum distance in a straight line from the location's address. The unit (km or miles) follows Settings → Standards and formats → Distance format. The field is labelled "in a straight line" for both methods, but with driving distance the app measures the route by road.

Custom-drawn zone

In Custom delivery zone, click the map to add boundary points around your delivery area. Add at least 3 points. Click a point to remove it, drag a point to move it, or click Clear zone to start again.


What customers see

In the cart widget's local delivery tab, customers enter their postal code, or their address for the distance and zone methods. The widget then lists only the locations that deliver to them. If none do, customers see a message that delivery isn't available in their area and can choose pickup or shipping instead. You can change this wording in Settings → Text and translations.


Things to know

  • Postal codes can't overlap. Each location needs its own set of postal codes.

  • Partial matching checks the start of the code. A location code of 112 matches a customer's 11249, but a location code of 11249 doesn't match a customer who types 112. Letter case and spaces at either end are ignored.

  • Locations Google can't find are skipped. If Google Maps can't find a location's address, the radius and driving distance methods don't offer that location. Check the address on the location page.

  • Checkout re-checks postal codes only. If a customer changes their address at checkout, postal code methods are checked again. Distance and zone methods are checked only in the widget, not again at checkout.

  • Google bills Maps usage to your own Google Cloud account, because the app uses your API key.

  • New Google Cloud projects can't always turn on the Distance Matrix API. If yours can't, use the radius or zone method instead of driving distance.

  • This is separate from rate postal codes. A delivery rate's own Zip code validation decides which delivery fee a customer sees. See Set up pickup and delivery rates.

  • See what customers searched for. Reports → Postal code logs lists the postal codes customers checked in the Delivery validator and the product page widget, and whether each was Validated or Out of range. Codes entered in the cart widget aren't logged.

  • The Delivery validator checks postal codes only. With the radius, driving distance or zone method, it tells every shopper you deliver to them. The real check happens in the cart widget.


FAQs

Why can't a customer in my area choose local delivery?

Check that their postal code is on the location's list, or starts with one of your codes for partial matching. Make sure local delivery is enabled on that location. For the distance methods, check that the location's address is complete and that your Google Maps API key validates.

Can each location cover a different area?

Yes. Each location has its own postal codes, distance or zone. Customers only see the locations that deliver to them.

What happens with No validation?

Customers aren't asked for a postal code or address before checkout, so every location that offers delivery can be chosen. This isn't recommended if you have more than one location.

Did this answer your question?