Skip to main content

What3Words address

Written by Arthur Ashdown

In MaxOptra it is possible to use the What3Words address standard as an option to specify customer location and order location. If you need this functionality enabled for you, contact the MaxOptra Support Team. You will need to provide your own API key from what3words. Sign-up here https://developer.what3words.com/public-api and quote ‘MaxOptra’ in the project name on sign-up.

What3Words (w3w) is a geocoding system that uses three permanently fixed words to identify any location with a resolution of 3x3 square meters. For example, the front door of 10 Downing Street in London is identified by ///slurs.this.shark. To see how What3Words geocoding works, see the official site https://what3words.com/.

Using What3Words address in API

The What3Words functionality is implemented only for APIv6.

There is a separate field for w3w data in APIv6 request ("w3wAddress") as part of customerLocation section, along with the field for regular customer location address ("address") and for geocoding coordinates ("latitude", "longitude").

Example of API request with fully populated fields:

"customerLocation": {
	"referenceNumber": "Order 4",
	"name": "Order 4",
	"address": "B3107, Melksham, SN12 8, United Kingdom",
	"w3wAddress": "///topped.scars.purple",
	"latitude": 50.937269,
	"longitude": -3.201134
}

The logic is as follows.

  • If only CL address is supplied - then latitude/longitude coordinates are derived from this address by reverse geocoding.

  • If CL address + w3w address are supplied - then w3w is taken priority by converting it to latitude/longitude. The CL address is not updated by reverse geocoding of w3w address. If there is a discrepancy between CL address and w3w address, w3w is taken priority.

  • If CL address, w3w address and latitude/longitude are supplied at the same time - then latitude/longitude is taken priority. If there is a discrepancy between CL address, w3w address and latitude/longitude coordinates, the latitude/longitude will take priority. The CL and w3w addresses are not updated.

  • If the w3w address is wrong format (e.g. "//topped.purple"), the system will show an error:
    { "code": "FIELD_NOT_VALID",
    "name": "Field is not valid",
    "details": "The w3wAddress should be in correct format",
    "field": "customerLocation.w3wAddress"}.

Using What3Words address in CSV file

There is a separate field for w3w data in .csv import file ("w3wAddress"), along with the field for regular customer location address ("customerLocationAddress") and for geocoding coordinates ("latitude", "longitude"). See Order Import File. Column Names and Requirements and Customer Location Import File. Column Names and Requirements.

Example of import file with fully populated fields:

The logic is as follows.

  • If only customerLocationAddress is supplied - then latitude/longitude coordinates are derived from CL address by reverse geocoding.

  • If customerLocationAddress + w3wAddress are supplied - then w3w is taken priority by converting it to latitude/longitude during import. The CL address is not updated by reverse geocoding of w3w address. If there is a discrepancy between CL address and w3w address, w3w is taken priority during import.

  • If customerLocationAddress, w3wAddress and latitude/longitude are supplied at the same time - then latitude/longitude is taken priority. If there is a discrepancy between CL address, w3w address and latitude/longitude coordinates, the latitude/longitude will take priority. The CL and w3w addresses are not updated.

  • If latitude/longitude coordinates are not provided, and the w3wAddress is invalid or wrong format (e.g. "//topped.purple"), the system will show a warning message "The address could not be found. Please locate it on the map.", and open the map dialog for you.

Using What3Words address on UI

When the w3w functionality is enabled for your account, the corresponding fields will appear on the Customer location form and Order form.

w3w field on the CL form

w3w field on the Order form

CSV and API is the best method for creating new customer locations and orders with a w3w address. However, when creating a customer location/order manually, it's better to specify address the following way:

  1. Find the correct w3w address on official web-site and copy it. For example: ///tunnel.melon.ashes or simply tunnel.melon.ashes

  2. Insert this address in the:
    - w3w address field, and then in the Address field - for Customer location form
    - w3w location field, and then in the Location field - for Order form.

    In the Address / Location field, the w3w address is automatically converted into a real postcode address. For example, ///tunnel.melon.ashes is converted into Northcote Crescent, Leatherhead, KT24 6, United Kingdom.

Or you can open the map (click the "pin" icon) and insert the w3w address in the search field. The system will automatically convert it into a real postcode address, which you can save.

  1. Click Save to save the changes.

Note

  • It is important that the location address is the same in both fields, as the system takes the address's latitude/longitude coordinates from w3w. If you change the address in the Address / Location field, and leave the w3w address unchanged, the system will still take the w3w address coordinates as priority. The same discrepancy happens if you change the w3w address and forget to update the location address. The system will take over the new w3w coordinates, regardless the actual location you specified.

  • When selecting the order address from the list of previously saved customer locations (using dropdown), which also have their w3w correspondences, the w3w field on the Order form will be read-only to prevent accidental change of the customer location address saved in the system.

If you really want to change the customer location address, go to the Customer Locations screen, find this address in the list, and update it manually, then save it.

Did this answer your question?