Fleet Freedom
Main Site
Overview
WebSocket
JavaScript
Behaviours
Provisioning
Pictures
Reports
Events
Return to site

Maintenance schedule progress

New Feature
New in 4.4
Wednesday, February 1, 2017
By Alex Lein

Maintenance schedules allow you to keep track of recurring maintenance work for vehicles and trailers such as inspections, oil changes, and tire replacement. Based on the schedules and vehicle activity, pending jobs are created automatically and reminders are sent by email about the new needed work.

Maintenance intervals

Each schedule targets a group of vehicles and trailers based on a search expression. However, once the pattern matches its targets, the schedule assumes the vehicle's current state as being the "last time work was completed". In order to set specific "last" details, you need to send the intervals object with individual MaintenanceIntervals. You can also send the intervals object when creating a new schedule.

Any assets targeted by the search expression will automatically be added using each asset's current state if no interval was given.

After the merge, any asset with a specified interval that is not targeted by the search expression will be removed.

Merging schedule intervals and patch semantics

Use the mergeMaintenanceSchedule method to update the intervals, where each key in the intervals object is the unique asset identifier, and the value is a MaintenanceInterval. This method supports patch semantics (similar to the HTTP PATCH verb), where only those values specified will be changed.

For each interval, the values will replace those in the schedule. Bare in mind that the lastJob, odometer, and engineHours will default to zero if not specified, and the date will revert to the current time. If value is null, the interval is removed for that asset. However, if the asset is still targeted, the interval will be reset using the asset's current state.

An example to add or update two and also remove or reset one would be: mergeMaintenanceSchedule {
  "id": 9876,
  "v": [21],
  "intervals": {
    "123456": {
      "date": "2017-01-18T21:33:37Z",
      "odometer": 52481,
      "engineHours": 7252.8,
      "lastJob": 12751
    },
    "456789": null,
    "987654": {
      "date": "2017-03-07T11:58:10Z",
      "odometer": 304679,
      "engineHours": 97351.49,
      "lastJob": 45123
    }
  }
}

If a new interval or null is not provided for a currently targeted asset, no change is made.

  • Back to Websocket Articles
  • Full Websocket Reference
Trak iT® Wireless and Fleet Freedom® are Trademarks of Trak iT® Wireless Inc.
All content contained within this site is the property of Trak iT® Wireless unless otherwise stated.