For a shipping rate, you can define the local delivery area an outlet using a GeoJSON file. The GeoJSON file contains the outlet's location together with one or more delivery zones, which are used during checkout to determine whether a customer's address is eligible for local delivery.
Note that you may need an integration with AutoAddress so that your customer can enter their Eircode or first line of address so that we can get their Longitude and Latitude coordinates. Contact the Help Desk for more information.
How to Create a GeoJSON File for an Outlet
GeoJSON files are used by AB Commerce to define the local delivery areas for an outlet. When a customer enters their address during checkout, the system determines whether their location falls within one of the outlet's delivery zones.
Each outlet has one GeoJSON file containing:
- The outlet's location.
- One or more delivery areas (polygons).
Step 1 - Open geojson.io
Open the free online editor:
No installation or account is required.
Step 2 - Locate the Outlet
Use the search box to find the outlet.
For example:
Your store address
Zoom in until the outlet is clearly visible.
Step 3 - Add the Outlet Location
Click the Point tool.
Click once on the exact location of the outlet.
In the Properties panel enter:
| Property | Value |
|---|---|
| StoreCode | Give your store a unique code |
| StoreName | Your Store Name |
| FeatureType | StoreLocation |
Example:
{
"StoreCode": "STORE01",
"StoreName": "Your Store Name",
"FeatureType": "StoreLocation"
}
Step 4 - Draw a Delivery Area
Click the Polygon tool.
Click around the outside of the delivery area.
When finished, click the first point again to close the polygon.
Do not leave the polygon open.
Example:
●────────────●
/ \
● ●
\ /
●────────────●
Step 5 - Name the Delivery Area
Select the polygon.
In the Properties panel enter:
| Property | Value |
|---|---|
| StoreCode | STORE01 |
| FeatureType | DeliveryArea |
| AreaCode | STORE01-01 |
| AreaName | Store 1 - Area 1 |
| Enabled | true |
| Priority | 1 |
Example
{
"StoreCode": "STORE01",
"FeatureType": "DeliveryArea",
"AreaCode": "STORE01-01",
"AreaName": "Store 1 - Area 1",
"Enabled": true,
"Priority": 1
}
Step 6 - Create Additional Areas
If the outlet delivers to multiple separate areas, simply draw another polygon.
Example:
Area 1
███████
Area 2
██████
Area 3
███████
Each polygon should have its own:
- AreaCode
- AreaName
- Priority
Step 7 - Export the GeoJSON File
Select
Save → GeoJSON
or
File → Save
(depending on the version of geojson.io)
Save the file as:
STORE01.geojson
Guidelines
Keep polygons simple
Use enough points to follow the delivery boundary, but avoid unnecessary detail.
Good
●──────● │ │ │ │ ●──────●
Not recommended
●─●─●─●─●─●─●─●─●
Do not draw self-intersecting polygons
Incorrect
\ / \ / \ / / \ / \ / \
Correct
██████████ █ █ █ █ ██████████
Include roads that should receive deliveries
If a road should be included, make sure it is inside the polygon.
Use one file per outlet
For example:
STORE01.geojson STORE02.geojson STORE01.geojson
Do not combine multiple outlets into a single file.
Before Uploading
Confirm that:
- ✓ The outlet location has been added.
- ✓ Every delivery area is a Polygon.
- ✓ Every polygon has a StoreCode.
- ✓ Every polygon has an AreaCode.
- ✓ Every polygon has an AreaName.
- ✓ Every polygon has Enabled = true.
- ✓ Every polygon has a Priority.
- ✓ The GeoJSON file has been exported successfully.
Uploading to AB Commerce
Once the GeoJSON file has been created:
- Log into the AB Commerce Administration System.
- ...
- ...
- ...
- ...
The delivery zones will then be used automatically during checkout to determine whether a customer's address qualifies for local delivery.
Comments
0 comments
Please sign in to leave a comment.