AI-generated Key Takeaways
-
Fleet Engine's
SearchTripsRequesthelps find trips, useful for identifying active trips and reconciling vehicle availability. -
Use
SearchTripsRequestwithvehicle_idandactive_trips_onlyto find a specific vehicle's active trips. -
Discrepancies between your system and Fleet Engine's vehicle availability can be addressed by using
SearchTripsRequestto identify open trips and ensure trip statuses are synchronized. -
Trips older than 7 days are automatically deleted in Fleet Engine.
Fleet Engine provides the SearchTripsRequest endpoint that you can use to find
trips. This document describes two scenarios where you might use this feature.
See SearchTripsRequest for gRPC or trips.Search for REST.
Determine active trips for a vehicle
To do find the active trips for a specific fields, use the SearchTripsRequest
message to set the vehicle_id to the vehicle under consideration and set
active_trips_only to true.
Reconcile vehicle availability between your system and Fleet Engine
In some situations, you might see results returned by SearchVehicles that
don't correspond with the vehicles you know to be available in your system and
your fleet. This happens because SearchVehicles either doesn't show vehicles
with active trips, or pushes them down in the results ranking. One cause of this
is when vehicles have completed trips, but the trip status not been properly set
to either COMPLETE or CANCELED. By using SearchTrips to find open trips,
you can evaluate vehicles to ensure that TripStatus in your system matches
that of Fleet Engine.
To use SearchTrips in this way, set the following in the SearchTripsRequest
message:
vehicle_idshould be empty.active_trips_onlyshould betrue.minimum_stalenessshould be a time greater than most trip durations; for example, one hour.
The results of such a request include Trips that are neither COMPLETE nor
CANCELED, and have not been updated in over an hour. You can then examine
these trips to ensure that their status in Fleet Engine is properly updated.