Optimize delivery routes with Google Maps ​

A Delivery Trip lists the stops that a driver makes. With a Google Maps API key, ERPNext can calculate the arrival time at each stop and reorder the stops into an optimized route.

Prerequisites ​

  • An API Key in Google Settings, with the Directions API enabled in Google Cloud.
  • A Driver on the Delivery Trip, and an address for the driver (Driver Address). Google Maps uses it as the start and end point.
  • An address on each delivery stop.

Calculate arrival times and optimize the route ​

  1. Open the Delivery Trip.
  2. Select Optimize Route to reorder the stops into the order that Google Maps suggests.
  3. Select Calculate Estimated Arrival Times to fill in the estimated arrival time of each stop. ERPNext uses the Departure Time of the trip as the start.

Calculating arrival times and optimizing stops in a Delivery Trip

Troubleshooting ​

MessageCauseFix
Enter API key in Google Settings.Google Settings has no API keyAdd the API key, see Set up Google Settings
Cannot Optimize Route as Driver Address is Missing.The driver has no addressSet the Driver Address on the Delivery Trip
Cannot Calculate Arrival Time as Driver Address is Missing.The driver has no addressSet the Driver Address on the Delivery Trip