Plan with AI

Get started →

Frontline Access Control

Overview

Use the Frontline Status API to dynamically grant or revoke Workvivo access based on real-time workforce data - such as clock-in/clock-out status from a time & attendance system.

Frontline and shift-based workers don't follow the same patterns as desk-based employees. They may only need Workvivo access during active shifts, or their access may depend on employment status changes that happen daily. Managing this manually - toggling access for hundreds or thousands of workers as shifts start and end - is operationally impossible at scale.

The Workvivo Frontline Status API solves this by letting external workforce management systems (time & attendance platforms, shift scheduling tools, HR systems) programmatically control frontline access when user access control is enabled for the organisation. A single API call can update up to 50 users at once, marking them as frontline workers and granting or revoking their access based on whatever logic your workforce system dictates - clock-in events, shift schedules, employment status, or seasonal workforce changes.

This means organisations can tie Workvivo access directly to real-world workforce activity: workers get access when they clock in and lose it when their contract ends, without anyone in IT or HR lifting a finger.

Value & Benefits

Automate access for shift-based workforces. Grant Workvivo access when workers clock in and revoke it when they clock out or leave - no manual admin intervention required.

Reduce access drift. Ensure only eligible frontline employees have access at any given time, aligning platform availability with actual workforce activity rather than static headcount.

Close security gaps instantly. When a frontline worker's employment ends or their shift status changes, access is revoked programmatically - eliminating the delay between HR action and platform lockout.

Scale to thousands of workers without overhead. Batch updates of up to 50 users per request mean even large shift changes (factory floor rotations, seasonal workforce ramps) can be processed in seconds.

Integrate with any workforce system. Any platform that can make an HTTP request - Kronos, ADP, Deputy, When I Work, or a custom time & attendance system - can drive Workvivo access decisions in real time.

Applications

Clock-in/clock-out access control. Integrate with your time & attendance system so that when a frontline worker clocks in, their Workvivo access is granted automatically. When they clock out or end their shift, access is revoked until their next shift.

Seasonal workforce onboarding. During peak seasons (retail holidays, harvest periods, event staffing), bulk-grant access to temporary workers as they're activated in your workforce management system, and revoke it when their contracts end.

Employment status-driven access. Connect to your HRIS so that when a frontline worker is placed on leave, suspended, or terminated, their Workvivo access is immediately revoked without waiting for a manual admin action.

Shift schedule pre-provisioning. Use upcoming shift schedule data to grant access slightly before a shift starts (e.g., 15 minutes prior), ensuring workers can access Workvivo communications and safety briefings as they arrive on site.

Compliance-driven access windows. In regulated industries (healthcare, manufacturing), restrict platform access to approved working hours only, ensuring communications and training materials are accessed within compliant timeframes.

Onboarding milestone access. Keep onboarding workers marked as frontline but without Workvivo access until they complete the required training or HR milestones in your LMS or HR system.

Technical Details

Before using these examples, complete Quick Start to create an app and API key and find your Base URL and Workvivo-Id.

Update Frontline Status and Access

A single PUT request updates both the frontline designation and access status for up to 50 users at once. Users can be identified by either Workvivo id or external_id (but not both types in the same request).

curl -X PUT https://api.workvivo.com/v1/users/frontline-status \
  -H "Authorization: Bearer $WORKVIVO_TOKEN" \
  -H "Workvivo-Id: $WORKVIVO_ORG_ID" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "users": [
      {
        "external_id": "emp-1001",
        "is_frontline": 1,
        "has_access": 1
      },
      {
        "external_id": "emp-1002",
        "is_frontline": 1,
        "has_access": 1
      }
    ]
  }'
curl -X PUT https://api.workvivo.com/v1/users/frontline-status \
  -H "Authorization: Bearer $WORKVIVO_TOKEN" \
  -H "Workvivo-Id: $WORKVIVO_ORG_ID" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "users": [
      {
        "id": 7,
        "is_frontline": 1,
        "has_access": 1
      },
      {
        "id": 8,
        "is_frontline": 1,
        "has_access": 1
      }
    ]
  }'
{
    "data": [
        {
            "id": 7,
            "external_id": "emp-1001",
            "email": "maria.garcia@company.com",
            "name": "Maria Garcia",
            "first_name": "Maria",
            "last_name": "Garcia",
            "display_name": "Maria Garcia",
            "job_title": "Warehouse Associate",
            "has_logged_in": true,
            "is_frontline": true,
            "has_access": true,
            "created_at": "2025-01-01T00:00:00Z",
            "permalink": "https://yourcompany.workvivo.com/people/7"
        },
        {
            "id": 8,
            "external_id": "emp-1002",
            "email": "james.wilson@company.com",
            "name": "James Wilson",
            "first_name": "James",
            "last_name": "Wilson",
            "display_name": "James Wilson",
            "job_title": "Shipping and Receiving Clerk",
            "has_logged_in": true,
            "is_frontline": true,
            "has_access": true,
            "created_at": "2025-01-01T00:00:00Z",
            "permalink": "https://yourcompany.workvivo.com/people/8"
        }
    ],
    "status": "success",
    "meta": {}
}

The response from the update request includes is_frontline and has_access fields for each updated user, confirming the state that was applied.

JavaScript Integration Example

Receive clock events from a workforce system and update Workvivo access in batches of up to 50 users.

import express from 'express';

const app = express();
const apiUrl = 'https://api.workvivo.com/v1';
const headers = {
    Authorization: `Bearer ${process.env.WORKVIVO_TOKEN}`,
    'Workvivo-Id': process.env.WORKVIVO_ORG_ID,
    'Content-Type': 'application/json',
    Accept: 'application/json',
};

app.use(express.json());

app.post('/webhooks/clock-events', async (request, response) => {
    const users = request.body.events.map((event) => ({
        external_id: event.employee_id,
        is_frontline: 1,
        has_access: event.event_type === 'clock_in' ? 1 : 0,
    }));

    await updateFrontlineAccess(users);

    return response.status(200).json({ updated: users.length });
});

async function updateFrontlineAccess(users) {
    for (let offset = 0; offset < users.length; offset += 50) {
        const response = await fetch(`${apiUrl}/users/frontline-status`, {
            method: 'PUT',
            headers,
            body: JSON.stringify({ users: users.slice(offset, offset + 50) }),
        });

        if (!response.ok) {
            throw new Error(`Workvivo API request failed: ${response.status}`);
        }
    }
}

app.listen(3000);