Antylogic
DemoApp login

399 operational guides

Docs sections
DocsTeam
Device

Archive an employee

Archive an active employee in the selected location. The employee leaves the active staff list, remains recoverable as an inactive record, and can be removed from future service assignments while historical schedules stay intact.

In this article

Use this guide when a team member should no longer appear in day-to-day staff operations but the business still needs their staff history.

Archiving is a soft delete: Antylogic sets `staff.deleted_at`, keeps the record available when inactive employees are shown, and does not hard-delete the employee.

Before you start

  • You are signed in with an organisation and location selected, for example Harbor Demo Group > Harbor Soho.
  • The employee exists in the current location and is active.
  • Your location permissions include `staff:manage`; `staff:view` lets you view staff but does not allow archiving.
  • For GB documentation captures, use `STAFF_ID` for Olivia Hart only in a disposable or restorable runtime.

Instructions

  1. 1.

    Open Employees

    Go to `location/staff?tab=staff`. The table shows active employees for the selected location; archived employees are hidden by default.

  2. 2.

    Open the employee

    Open the employee detail page, for example `location/staff/detail/${STAFF_ID}?tab=staff` in the GB runtime. You can also start from the row action in the Employees table.

  3. 3.

    Start the archive

    Select Deactivate. Antylogic opens the Archive employee confirmation modal with the selected employee name plus Archive and Cancel actions.

  4. 4.

    Confirm Archive

    Select Archive. Antylogic sends `DELETE /api/app/{orgId}/{locationId}/staff/{staffId}` with no payload; a successful request returns `204 No Content`, refreshes staff and related schedule data, shows Employee archived, and returns from detail to the staff tab.

  5. 5.

    Verify inactive status

    Return to Employees and enable Show inactive employees. The archived employee appears with Inactive status when `staff_show_deleted=true` is used.

  6. 6.

    Review schedule impact

    If the employee has future staff schedules linked to service events, Antylogic tries to remove that employee from future service bundles. Past schedules and already-started services remain unchanged.

Validations and limits

  • Archiving requires `staff:manage`, a selected location, a non-empty staff ID, and an active employee that belongs to the current location.
  • The Deactivate action is not available for inactive staff rows; their available lifecycle action is Restore.
  • An already archived, missing, or cross-location employee is treated as not found by the backend.
  • The action has no reason field, comment field, dry-run mode, or confirmation payload.
  • Schedules without a service parent, with a non-service parent, or without future editable occurrences do not block archiving.
  • The API does not return the number of future assignments removed; that information is only logged server-side.
  • Restoring the employee later does not automatically recreate future service assignments removed during archiving.

Expected result

The employee is hidden from the active staff list, remains available as an inactive soft-deleted record, and future service assignments may be updated while historical schedules remain unchanged.

Related articles