Introduction
Shifts (Work Sessions) are intervals of time for performing work. They have a data dependency on the following:
- A Shift
- A Position
- A Client site
- An Employee
- A Clock-In Method
Business Rules
Clock in restrictions
- Reject clock-in when LAT and LONG do not match
- Reject when an employee is not assigned to a location.
- Allow and generate an exception when an employee is clocked in from outside the LAT and LON.
Clock out restrictions
- No restrictions to clock out are set in the system.
Managed vs unmanaged breaks
- Break notice for breaks to be taken and reminder.
Break compliance
- The break summary at the end of the shift will be shared from the app only. The employee will acknowledge the details of the records.
Clock IN/OUT Methods
| Method | Context |
| LIVE | Work session is either in progress or is a continuous shift |
| DEVICE | Clocked in/out using the Mobile Application |
| ADMIN | Clocked in/out by an Admin |
| PHONE | Clocked in/out on IVR |
| BROWSER | Clocked in/out on Onsite license |
| BATCH | Clocked out by System Auto Clock out or Clocked in via Batch interface |
| KIOSK | Clocked in/out on the Kiosk |
| SHIFT_APP | Clocked in/out manually via the TT-Shift mobile application. |
| GUARD_APP | Clocked in/out manually via the Guard Tour mobile application. |
| API | Created/edited via API. |
| DELAYED | |
| SYSTEM | When an employee clocks in to a shift but doesn't clock out, the system auto-clocks them out after a certain time (after their scheduled shift ends or through inactivity.) |
Starting a Shift (Work Session)
Once the unique IDs and Method (ENUM) are known, a Work Session can be created that links to them, and causes the Shift to enter a status of "Working" (web UI term) and "OPEN" (API term):
[POST] /work-sessions
{
"startedOn": "2022-12-16 15:17:00",
"clockInMethod": "API",
"status": "OPEN",
"employee": 1053,
"shift": 100594,
"position": 382,
"account": 687
}The success of this posting of new work session data will then become visible in the TrackTik web portal under the shift tool-tip, and the log in the Dashboard:
The response will contain information about the now active Work Session, most importantly the Work Session's ID, which will need to be known to end the shift via API call as well:
{
"startedOn": "2022-12-16T15:17:00+00:00",
"endedOn": null,
"startDateTime": "2022-12-16T15:17:00+00:00",
"endDateTime": null,
"initiationMethod": "API",
"clockInMethod": "API",
"terminationMethod": "LIVE",
"clockOutMethod": "LIVE",
"status": "OPEN",
"employee": 1053,
"shift": 100594,
"position": 382,
"account": 687,
⇒ "id": 4592
}Ending a Shift (Work Session)
To end an active Shift, you only need to call the action to end it using the unique ID of the Work Session created earlier and by specifying what the Cloud Out Method is:
[POST] /work-sessions/4592/actions/clock-out
{
"clockOutMethod": "API"
}Visibility in the TrackTik web application:
Now the Work Session will contain all data connected to start and stop methods and times, along with a status of "CLOSED":
{
"startedOn": "2022-12-16T15:17:00+00:00",
"endedOn": "2022-12-16T20:39:43+00:00",
"startDateTime": "2022-12-16T15:17:00+00:00",
"endDateTime": "2022-12-16T20:39:43+00:00",
"initiationMethod": "API",
"clockInMethod": "API",
"terminationMethod": "API",
"clockOutMethod": "API",
"status": "CLOSED",
"employee": 1053,
"shift": 100594,
"position": 382,
"account": 687,
"id": 4592
}