Skip to main content

Demand relevant shift templates

Shift-Templates-are-demand-relevant-check

This check identifies the minimum number of demand intervals that cannot be met due to the absence of applicable * *shift_templates**.

ℹ️ A small note

While we are migrating from XML to JSON, and releasing ver. 2 of the feasibility checker, we noticed that this check seems to be a duplicate of the Demand-covered-by-shift-templates-check.

Although we are still investigating, we have decided to retain this check in our documentation for the time being, as it may still be useful for certain users. We will provide updates on this page as more details become available.

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
  • numberOfEmployees
  • missingMinutes
Example

This payload contains two shift templates, each with a different start and end time.

For the demand definition, it requires 1 employee from 11:00 to 13:00, 3 employees from 13:00 to 15:00, and 2 employees from 15:00 to 18:00, all on day 0.

Given that both shift templates must conclude by 17:00 at the latest, neither can accommodate the demand from 17:00-18:00, resulting in a warning.

Payload example
{
"jobInfo": {
"id": "xxx",
"organisationId": "xxx",
"scheduleType": "RECURRING",
"demandType": "TIME_DEMAND",
"planningHorizon": {
"startDate": "2022-01-01",
"nrOfWeeks": 1,
}
},
"shiftTemplates": [
{
"id": "ShiftTemplate1",
"workTypeId": "1",
"dayIndicatorRule": "MOST_HOURS",
"startTimeWindow": {
"start": "11:00",
"end": "12:00"
},
"endTimeWindow": {
"start": "15:00",
"end": "16:00"
},
"workDuration": {
"min": {
"hours": 0,
"minutes": 5
},
"max": {
"hours": 6,
"minutes": 0
}
}
},
{
"id": "ShiftTemplate2",
"workTypeId": "1",
"dayIndicatorRule": "MOST_HOURS",
"startTimeWindow": {
"start": "11:00",
"end": "13:00"
},
"endTimeWindow": {
"start": "17:00",
"end": "17:00"
},
"workDuration": {
"min": {
"hours": 0,
"minutes": 5
},
"max": {
"hours": 6,
"minutes": 0
}
}
}
],
"employees": [
{
"id": "1",
"workTime": {
"maxHoursInFTECountPeriod": 37,
"weekHoursRules": {
"minWeekHours": 12,
"maxWeekHours": 40
}
},
"attributes": [
{
"id": "competences",
"values": ["Competence1", "Competence2", "Competence3"]
}
]
},
{
"id": "2",
"workTime": {
"maxHoursInFTECountPeriod": 38,
"weekHoursRules": {
"minWeekHours": 12,
"maxWeekHours": 40
}
},
"attributes": [
{
"id": "competences",
"values": ["Competence1", "Competence3"]
}
]
},
{
"id": "3",
"workTime": {
"maxHoursInFTECountPeriod": 37,
"weekHoursRules": {
"minWeekHours": 13,
"maxWeekHours": 42
}
},
"attributes": [
{
"id": "competences",
"values": ["Competence1", "Competence2", "Competence3"]
}
]
}
],
"timeSlots": [
{
"id": "time-slot-1",
"startTime": "06:00",
"endTime": "13:00",
"workTypeId": "1"
},
{
"id": "time-slot-2",
"startTime": "11:00",
"endTime": "13:00",
"workTypeId": "1"
},
{
"id": "time-slot-3",
"startTime": "13:00",
"endTime": "15:00",
"workTypeId": "1"
},
{
"id": "time-slot-4",
"startTime": "15:00",
"endTime": "18:00",
"workTypeId": "1"
}
{
"id": "time-slot-5",
"startTime": "06:00",
"endTime": "13:00",
"workTypeId": "1"
}
],
"demands": [
{
"days": {
"dayIndexes": [
0
]
},
"timeDemands": [
{
"timeSlotId": "time-slot-2",
"ideal": 1
},
{
"timeSlotId": "time-slot-3",
"ideal": 3
},
{
"timeSlotId": "time-slot-4",
"ideal": 2
}
]
}
],
"constraints": {
},
"configuration": {
"workTypes": [
{
"id": "1",
"name": "WORK",
"factor": 1.0
},
{
"id": "2",
"name": "ON_CALL",
"factor": 0.5
}
],
"tasks": [
{
"id": "Task1",
"name": "Intern revision"
}
],
"weekend": {
"startWeekDay": 5,
"startTime": "19:00",
"endWeekDay": 1,
"endTime": "07:00"
}
}
}