Last Mile Fleet Solution is currently available only to select customers. Contact sales to learn more.

Fleet Tracking architecture and components

Implementing Fleet Tracking involves working with several Last Mile Fleet Solution components -- Fleet Engine, the JavaScript Fleet Tracking Library, and the Driver SDK:

  • Fleet Engine is the Last Mile Fleet Solution backend service. It is responsible for managing tasks and vehicle state. It handles the interaction between the Driver SDK, the JavaScript Fleet Tracking Library, and your backend service -- which can communicate with the Fleet Engine by making either REST or gRPC calls.
  • The JavaScript Fleet Tracking Library can be integrated into your internal fleet management applications, and lets you to provide a visualization of the vehicle locations and other shipment information.
  • The Driver SDK is a library that you integrate into your driver app. It is responsible for updating the Fleet Engine with the driver’s location, route, distance remaining, and ETA. It also wraps the Navigation SDK, which provides turn-by-turn navigation instructions for the driver. For more information, see Navigation with Google Maps.

The following diagram shows the relationship between these components:

Architecture

Delivery vehicles and tasks

Creating a Fleet Performance application to model the pickup and delivery of shipments involves:

  • The delivery vehicle used to transport the shipment.
  • The shipment pickup and delivery tasks.

Delivery vehicles

Delivery vehicles transport shipments from a depot to a delivery location, and from a pickup location to the depot. In certain cases, they may also transport a shipment directly from the pickup location to the delivery location.

Tasks

Each vehicle has tasks assigned to it. These can include pickup or delivery tasks, required breaks for drivers, or scheduled stops at drop boxes or other locations. Each task must have a unique task ID, but may share the same tracking ID. The tasks and the order in which they are scheduled are used to calculate ETAs for each task.

Shipment tasks are related to the pickup or the dropoff of the shipment. You must specify a tracking number or ID when you create a shipment task. You must also specify a dwell time to account for additional time to complete the task, look for parking, or walk to the handoff location.

  • Create a pickup task for picking up a shipment, specifying the pickup location and tracking number or ID.
  • Create a delivery task for delivering a shipment, specifying the delivery location and tracking number or ID.

You can also create an unavailability task for a time period when the vehicle will not be available for pickups or deliveries, and scheduled stop tasks to model stops to be made by a delivery vehicle. However, you can't assign a tracking_id to an unavailability task or scheduled stop. As a result, you can't directly perform fleet tracking on an unavailability task or scheduled stop.

Sample flow

The following sequence diagram shows the typical fleet tracking flow.

Flow Diagram

To begin implementing Shipment Tracking, see Track your fleet with the JavaScript Fleet Tracking Library.