Skip to main content

Shift demand cover

Shift-is-covered-by-demand-check

This process identifies the minimum number of demand intervals that can't be covered due to the unavailability of relevant shifts.

If there are any demand intervals that cannot be covered due to the unavailability of relevant shifts, this is 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
  • startTime
  • endTime
  • workType

The following example demonstrates a scenario where the provided shifts do not meet the demand requirements.

❗Actual shifts this time❗

In the previous example, we used shifts to illustrate shift templates. In this example, we use actual shifts (as this is how this check works).

The same principles apply - and the response will stay the same.

Example

In this example, we illustrate a payload that will cause a warning in the feasibility check. There are two shifts.

Shift 1 spans from 08:00 to 15:00, while Shift 2 covers 13:00 to 15:00.

The demand requires one employee from 09:00 to 15:00, applicable to all days of the week.

Given that Shift 1 can never be used, as the interval goes from 08:00, and not from 09:00, the demand can never be covered from 9-13 (when the second shift starts).

Payload example
{
"jobInfo": {
"id": "xxx",
"organisationId": "xxx",
"scheduleType": "RECURRING",
"demandType": "TIME_DEMAND",
"planningHorizon": {
"startDate": "2022-01-01",
"nrOfWeeks": 1,
}
},
"shifts":[
{
"id":"Shift1",
"shiftTypes":[
"Day"
],
"intervals":[
{
"startTime":"08:00",
"endTime":"15:00",
"dayIndicator":0,
"workTypeId":"1",
"breakMinutes":30
}
]
},
{
"id":"Shift2",
"shiftTypes":[
"Day"
],
"intervals":[
{
"startTime":"13:00",
"endTime":"15:00",
"dayIndicator":0,
"workTypeId":"1"
}
]
}
],
"employees":[
{
"id":"1",
"workTime":{
"weekHoursRules":{
"minWeekHours":36,
"maxWeekHours":36
}
}
}
],
"timeSlots":[
{
"id":"time-slot-1",
"startTime":"09:00",
"endTime":"15:00",
"workTypeId":"1",
}
],
"demands":[
{
"days":{
"dayIndexes":[
0,
1,
2,
3,
4,
5,
6
]
},
"timeDemands":[
{
"timeSlotId": "time-slot-1",
"ideal": 1
}
]
}
],
"configuration":{
"workTypes":[
{
"id":"1",
"name":"WORK",
"factor":1
}
]
}
}