Skip to main content

Shift Template Demand Cover

Demand-covered-by-Shift-Templates-Check

Identifies the minimal intervals of demand that cannot be covered due to missing shift templates.

If there are any demand intervals that cannot be covered due to missing shift templates, 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 payload illustrates how the response looks for a payload where the shift templates do not cover the demand.

Shifts generated from shift templates

In the example payload below, the shift templates have been replaced with shifts. This is to make it easier for the reader to follow along - but in a real-world scenario, the shifts would be generated from the shift templates, and not run for normal shifts.

Example

This example shows a payload causing a warning during the feasibility check, with two shifts.

Shift 1 is from 08:00 to 15:00, and Shift 2 is from 13:00 to 15:00.

The demand definition requires 1 employee from 09:00 to 15:00. The demand definition is set for all days of the week.

Given that Shift 1 can never be used, as the interval goes from 08, and not from 09, 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
}
]
}
}