Request an attendance correction
A staff member requests a correction to their own clock-in and clock-out times from My profile. In the GB demo, Olivia Hart at Harbor Soho opens the fixed-staff form and sends the request for manager review.
In this article
Use this guide when an employee's clock-in or clock-out needs correcting and the employee can request it themselves. The flow starts from My profile, keeps the staff member fixed, and records the correction for manager review.
The request is self-service only when it is opened for the signed-in employee with `asCorrection=true` and `returnStaffId` matching their own staff id. Antylogic stores the request as a `staff_shift` calendar event with pending correction statuses.
Before you start
- Sign in to Harbor Demo Group with Harbor Soho selected.
- Use a user linked to staff at the selected location; in the GB demo this is Olivia Hart with `STAFF_ID=91dde52c-dd5f-4bb2-9d45-be187689822a`.
- Open My profile or the self-service correction route with `kind=staff_shift`, `preset=mine`, `asCorrection=true`, and `returnStaffId` equal to the signed-in staff id.
- To create a new closed correction request, the employee must not have an open shift.
- The corrected exit time must be in the past and later than the corrected entry time.
Instructions
- 1.
Open My profile
From Harbor Soho, open the signed-in staff user's own profile. Use the My profile route so the page treats the action as self-service.
- 2.
Start the correction request
In Attendance this month, select Request correction. The app opens the staff shift correction form with the employee fixed to Olivia Hart.
- 3.
Enter corrected entry and exit
Enter the corrected clock-in date and time, then the corrected clock-out date and time. Same-day exits use `exit_day_offset=0`; overnight exits use `exit_day_offset=1`.
- 4.
Submit for manager review
Select Request correction. The app sends the self-service request for the signed-in staff member and returns to My profile after a successful submission.
- 5.
Handle blocked cases
If an error appears, correct the form values or check the current shift state. A new closed correction is blocked while the employee has an open shift.
Validations and limits
- The page must be the signed-in staff user's own profile; another employee profile follows the manager path.
- `asCorrection=true` is not enough by itself; `returnStaffId` must be present and match the signed-in user's own staff id.
- The employee field is fixed on the self-service correction form and cannot be changed to another staff member.
- Entry and exit date/time values must be present, parse correctly, and satisfy `startsAt < endsAt`.
- The corrected exit cannot be in the future.
- The self-service request is sent to `POST /api/app/me/staff/{staffId}/shifts`, not to the calendar event creation endpoint.
- If an open shift exists, the backend marks that open shift as requiring an exit correction and returns a conflict instead of creating a separate closed correction.
- Managers with `staff-shifts:manage` receive a `staff_shift_correction_requested` notification and can review the pending correction.
Expected result
After successful submission, Antylogic records a `calendar_events.kind = "staff_shift"` correction with `payload.source = "correction"` and pending correction statuses for manager review.