GPS tracking
When a tech starts a shift in the mobile app, their phone shares its location with the backoffice. Two views surface that data:
- GPS Tracking → Live View — every active tech's current position on a map, refreshed every few seconds.
- GPS Tracking → Path History — replay a specific tech's full path on a chosen day.
Org-wide settings
Settings → Field Service → GPS Tracking (or GPS → Path History which embeds the same controls). Three knobs:
- Enabled — master switch. When off, the mobile app won't record at all, even if a tech tries to start a shift. Default: off.
- Interval (seconds) — how often the phone reports a pinpoint. Default 60s; range 30–600s. Below 30 the OS may throttle anyway.
- Retention (days) — raw pinpoints auto-purge after this many days. Default 90; range 30–365. A daily cron handles the sweep.
Per-member consent
Even with the org switch on, each tech must consent at least once before their location is recorded. The first time they tap Start Shift after consent is wiped (or never granted), the app shows a modal with the policy text, a "Not now" button, and an "I agree, start shift" button. Accepting POSTs to the backend's consent log (insert-only — every grant + revoke is preserved for audit).
A tech can revoke from their profile screen at any time; the next Start Shift will re-prompt.
What gets recorded
Each pinpoint stores: latitude, longitude, accuracy (metres), speed (m/s), heading (0–359°), and battery level (0–100). Plus the shift id, timestamp, and the tech's auth-user id.
Live View — vehicles vs. employees
The Vehicles tab on Live View shows only vehicles that have an assigned technician. The vehicle's position IS the tech's position — there's no separate fleet hardware. A vehicle whose tech has never pinged shows as offline.
Path replay
In GPS Tracking → Path History:
- Pick a tech + a day. The map auto-fits to that day's path.
- Stats panel shows total distance (haversine), shift duration, and pinpoint count.
- Start and end of the day are marked green and red respectively.
Privacy reminders
- The mobile app shows a persistent "Shift active" banner whenever location is being recorded (iOS blue bar, Android foreground service notification).
- Consent is logged with the policy text snapshot at the time of grant — so a future policy change won't silently re-interpret prior consent.
- The retention sweep is hard delete (not soft); 91 days after a shift, those points are physically gone.