Overview
Fleet Management Job
The heart of the FM is the Fleet Management Job, which runs continuously every 15 minutes. It is a 15-pass batch process that performs the following functions. Entries in red (Pass 6, 7, and 8) only run once per day (after midnight).
PASS 1: Set Timezone for all shipping locations (1000 max per pass).
PASS 2: Sync Fleet Assets with Samsara Vehicles - VIN or ELD ID provide shared unique keys.
If Fleet Asset does not exist, create it.
If Fleet Asset Name or License are out of sync, update Samsara.
If Fleet Asset ELD ID is not populated, update it.
PASS 3: Get and Save the latest Vehicle statistics.
PASS 4: Sync Drivers - [CDL # + License State] or ELD ID provide shared unique keys.
Combine the TMS and Samsara Driver records in the start() method.
For ELD ID synced Drivers, update Samsara if needed.
For License synced Drivers, update TMS with ELD ID and update Samsara.
For TMS-only Drivers, create Driver on Samsara.
For Samsara-only Drivers, create Driver on TMS.
PASS 5: Get and Save the latest Driver HOS Clocks.
PASS 6: Get and Save the Driver Log Summaries for each day of the grace period.
PASS 7: Get and Save the Driver Log Entries for each day of the grace period.
PASS 8: Delete any obsolete Driver Log Entries not up-serted in Pass 7.
PASS 9: Sync shipper/consignee locations used by recent loads.
PASS 10: Get updates for all "active" routes and update stops and fleet assignments.
PASS 11: Up-sert/Delete new/changed/deleted routes and update Fleet Assignment distances.
PASS 12: Get all driver documents since last run.
PASS 13: Get all driver messages since last run.
PASS 14: Update Load current location from Fleet Asset geo updates.
PASS 15: Update Driver fields on relay Loads if "Started" Fleet Assignment has changed.
There is a one-time download (“Pass 0”) of ELD locations that are transformed into Account ELD records initiated via the ELD Location Download button on the TMS Configuration page.
Job Notes
You may run the Fleet Management Job even if you are not managing a fleet. The Timezone field on account records populates. If Fleet Management is not enabled, the job will run as a one-pass process which populates the Timezone field.
You may run one pass only of the Fleet Management Job by setting the Fleet Management Pass Counter configuration setting. DO NOT set this field unless you are debugging.
Timezone field population on the account record occurs for 1000 records per batch run, so it may take several hours for all accounts to populate.
If the Timezone field for an account cannot be calculated, the field is set to Unknown. You must correctly populate the Timezone manually for all these records.
If an account cannot be updated with the Timezone field due to custom code or validations, this pass of the batch process is disabled. The Timezone Update Disabled flag is set on TMS Admin → Configuration. You must correct the error that is preventing the update of account records, and then uncheck this field.
Samsara Vehicles are paired with Fleet Asset records via the ELD ID field. This match is initially established by matching the VIN field.
Samsara Drivers are paired with Driver records via the ELD ID field. This match is initially established by matching the [CDL # + CDL State/Province] fields.
Driver Logs are not retrieved for the current day as the data is constantly changing.
Samsara Locations/Addresses are paired with one or more Account records via the Account ELD record created for every Fleet shipping location.
Samsara driver Routes are paired with Fleet Assignment records via the ELD Route ID field.
If a driver uploads a document and the current load for that driver cannot be determined, the document is staged in the Inbound Email table (similar to other carrier documents).
Make sure that drivers submit all documents from the phone application from the route the document pertains to. Otherwise it cannot be associated with the load.
If a driver sends a text message and the current load for that driver cannot be determined, the message is dropped.
The Fleet Carrier Transportation Profile mileage API settings are used when calculating Fleet Asset distance fields. Make sure they are visible and set properly.