Skip to main content

Blocked employee feasibility check

Employee-availability-check

Checks if there are enough employees available to cover the demand during blocked times. If there is a demand segment that cannot be covered due to employees being blocked or simply not having enough employees, it's returned as a warning in the feasibility response.

Warning Response Schema
title
required
string
Enum: "Employee-availability-check" "Demand-weekend-covered-by-employees-check" "Employee-minutes-weekly-check" "Employee-minutes-entire-roster-check" "Demand-covered-by-shift-templates-check" "Shift-is-covered-by-demand-check" "Employee-assigned-to-shift-covers-demand-check" "Shift-Templates-are-demand-relevant-check" "Shift-utilization-minimum-occurrence-check" "Locked-shift-task-requirements-check"
category
required
string

This category is always set to WARNING

description
required
string
required
Array of objects (violation)
{
  • "title": "Employee-availability-check",
  • "category": "string",
  • "description": "string",
  • "violations": [
    ]
}

The following fields are used in the "violation" object:

  • day
  • demandSegment
    • startTime
    • endTime
    • minDemand
    • timestamp
  • missingEmployees

The following payload illustrates how the response might look for a payload with blocked time.

Example

In this example, we illustrate a payload that will cause a warning in the feasibility check. The payload contains a blocked time constraint for employee 2, which will cause a warning for missing employees during the blocked hours.

Not only does the payload contain a blocked time constraint, but it also has a demand definition that requires 4 employees from 08:00 to 17:00 and 2 employees from 15:00 to 17:00. The demand definition is set for Monday to Friday, and the blocked time constraint is set for Monday (11:00-11:30) and Tuesday (09:00-13:15) (highlighted below).

The response will contain warnings for each day where the demand cannot be covered, which is both days that employee 2 is blocked, as it means she cannot work the demand from 08:00-17:00, but additionally, since all employees, in this check, must work demand, it is impossible to work the demand from 15:00-17:00, which also gets highlighted as a warning on all days.

Payload example
{
"jobInfo": {
"id": "xxx",
"organisationId": "xxx",
"scheduleType": "RECURRING",
"demandType": "TIME_DEMAND",
"planningHorizon": {
"startDate": "2022-01-01",
"nrOfWeeks": 1,
}
},
"shifts": [
{
"id": "Shift1",
"shiftTypes": [
"DAY_W"
],
"intervals": [
{
"startTime": "08:00",
"endTime": "17:00",
"dayIndicator": 0,
"workTypeId": "1",
"breakMinutes": 60
}
]
}
],
"employees": [
{
"id": "1",
"workTime": {
"maxWeekHours": 40
}
},
{
"id": "2",
"workTime": {
"maxWeekHours": 40
}
},
{
"id": "3",
"workTime": {
"maxWeekHours": 40
}
},
{
"id": "4",
"workTime": {
"maxWeekHours": 40
}
}
],
"timeSlots": [
{
"id": "08_17",
"startTime": "08:00",
"endTime": "17:00",
"workTypeId": "1",
},
{
"id": "15_17",
"startTime": "15:00",
"endTime": "17:00",
"workTypeId": "1",
}
],
"demands": [
{
"days": {
"dayIndexes": [
0,
1,
2,
3,
4
]
},
"timeDemands": [
{
"timeSlotId": "08_17",
"ideal": 4,
},
{
"timeSlotId": "15_17",
"ideal": 2,
}
]
}
],
"constraints": {
"blockedTimeConstraints": [
{
"id": "BlockedTimeConstraint1",
"blockedTime": [
{
"startTime": "11:00",
"endTime": "11:30",
"scheduleDays": {
"weekDays": [
2
]
}
},
{
"startTime": "09:00",
"endTime": "13:15",
"scheduleDays": {
"dayIndexes": [
0
]
}
}
],
"employeeIds": [
"2"
]
}
]
},
"configuration": {
"workTypes": [
{
"id": "1",
"name": "WORK",
"factor": 1.0
}
]
}
}