| Variable | Purpose | Status |
|---|---|---|
| MICROSOFT_CLIENT_ID | MS365 SSO + email sending | ✅ Set |
| MICROSOFT_TENANT_ID | MS365 SSO + email sending | ✅ Set |
| MICROSOFT_CLIENT_SECRET | MS365 SSO + email sending | ✅ Set |
| UPSTASH_REDIS_REST_URL | Distributed rate limiting | ⬜ Add from upstash.com |
| UPSTASH_REDIS_REST_TOKEN | Distributed rate limiting | ⬜ Add from upstash.com |
| CRON_SECRET | Email-to-ticket ingest security | ⬜ Generate random string |
| Migration | How to run | Status |
|---|---|---|
| Add job_id to tickets table | Run POST /api/tickets?action=migrate-job-link in browser console (admin session) | ✅ Done |
| Variable | Purpose | Status |
|---|---|---|
| TRACCAR_API_TOKEN | Traccar API bearer token used by the fleet map and reports. Traccar auth is Bearer, not a query token. | ⬜ Set in Vercel |
One-time database migrations. Each is run once by an admin via an authenticated POST — the Bearer token comes from the logged-in admin session. A plain browser tab is anonymous and will be rejected.
| Migration | Creates | Endpoint |
|---|---|---|
| Geofence tables | geofence_state, geofence_events, geofences.vehicle_ids | POST /api/dashboard?action=tracking-geo-migrate |
| Patrol requirements | patrol_requirements table | POST /api/dashboard?action=tracking-patrol-migrate |
| Vehicle share tokens | vehicle_share_tokens table (required before the "Live link" share button works) | POST /api/vehicle-share?action=migrate |
Weekly SLA reports
sla_reports feature flag. Off by default — no client is emailed until it is enabled.CRON_SECRET to be set (shared by all TrakNet cron endpoints).| Permission | Type | Status |
|---|---|---|
| Mail.Send | Application | ✅ Granted |
| Mail.Read | Application | ✅ Granted |
| User.Read | Delegated | ✅ Granted |
| Sites.ReadWrite.All | Application | ✅ Granted |
infotech@copelandgroup.co.uk
Microsoft Graph API — uses existing MS365 credentials, no extra cost
Ticket created, ticket reply, ticket resolved/closed, job completed