Documentation
Employee scheduling data
The dataset format of the employee scheduling model: every table at its JSON path, every field the model reads, the model's parameters.
A dataset is one JSON document. These are its tables, each at its JSON path, with every field the model reads. The Workbench data editor shows the same tables with a typed editor per field. What each field does to the score is explained with the rules on the constraints page.
Employees employees
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
name |
Name | text | optional | |
skills |
Skills | json | optional | |
contracts |
Contracts | list | optional | an id from contracts |
tags |
Tags | list | optional | |
priority |
Priority | integer | optional | |
avoidRisks |
Must avoid | list | optional | |
unavailable |
Unavailable | list of objects: from, to, withTags, withoutTags, matchAll, weight |
optional | |
availableOnly |
Available only | list of objects: from, to, withTags, withoutTags, matchAll, weight |
optional | |
preferredTimes |
Would like to work | list of objects: from, to, withTags, withoutTags, matchAll, weight |
optional | |
unwantedTimes |
Would rather not work | list of objects: from, to, withTags, withoutTags, matchAll, weight |
optional | |
daysOff |
Days off | list | optional | |
requiredShifts |
May only work | object: withTags, withoutTags, matchAll |
optional | |
preferredShifts |
Likes | object: withTags, withoutTags, matchAll |
optional | |
pairings |
Works with | list of objects: stance, with, withTags, onTags |
optional | |
home |
Home | object: lat, lon |
optional | |
costGroup |
Cost group | text | optional | an id from costGroups |
loggedBefore |
Logged before | list of objects: date, minutes |
optional |
Shifts shifts
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
start |
Starts | date time | required | |
end |
Ends | date time | required | |
employee |
Employee | text | optional | an id from employees |
pinned |
Pinned | boolean | optional | |
breaks |
Breaks | list of objects: from, to, minutes |
optional | |
requiredSkills |
Needs skills | json | optional | |
anyRequiredSkill |
Any one skill is enough | boolean | optional | |
preferredSkills |
Would like skills | json | optional | |
tags |
Tags | list | optional | |
risks |
Risks | list | optional | |
optional |
Optional | boolean | optional | |
importance |
Importance | integer | optional | |
preferredEmployees |
Would like | list | optional | an id from employees |
unwantedEmployees |
Would rather not have | list | optional | an id from employees |
barredEmployees |
Never | list | optional | an id from employees |
location |
Place | object: lat, lon |
optional | |
costGroup |
Cost group | text | optional | |
alternativeOf |
Version of | text | optional | an id from alternatives |
published |
Published to | text | optional | an id from employees |
Contracts contracts
| Field | Label | Kind | Required | Values |
|---|
Contract rules contracts/*/rules
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
kind |
Rule | text | required | Minutes worked, Minutes logged, Days worked, Shifts worked, Weekends worked, Weekend minutes, Weekends worked in a row, Days worked in a row, Shifts in a row, Days off, Days off in a row, Minutes off in a row, Weekends off in a row, Shifts next to a day off, Overlapping shifts, Rest between shifts, Spread of start times, Split shifts, Shift pairs days apart, Pattern within a day, Pattern over days, Rotation, Shift types, Distinct tags, Travel, Locations worked, Cost, Changes to the published roster |
level |
Level | text | optional | Required, Preferred |
weight |
Weight | integer | optional | |
withTags |
With tags | list | optional | |
withoutTags |
Without tags | list | optional | |
matchAll |
Every tag | boolean | optional | |
period |
Period | text | optional | |
rollingDays |
Rolling days | integer (days) | optional | |
min |
At least | integer | optional | |
max |
At most | integer | optional | |
wholeShift |
Whole shift inside the window | boolean | optional | |
weekdays |
Weekdays | list | optional | |
categories |
Categories | list | optional | |
startDays |
Runs start on | list | optional | |
minGapMinutes |
Gap between categories | minutes | optional | |
compact |
Keep categories together | boolean | optional | |
linkMinutes |
Shifts this close are one run | minutes | optional | |
restAfterMinutes |
Rest after a run | minutes | optional | |
restAfterRunsOf |
Rest after runs of | integer (shifts) | optional | |
stance |
Stance | text | optional | Required, Preferred, Unwanted, Barred |
withinMinutes |
Pairs within | minutes | optional | |
paired |
Paired shift | object: withTags, withoutTags, matchAll |
optional | |
dayOffset |
Days later | integer (days) | optional | |
steps |
Steps | list of objects: withTags, withoutTags, matchAll |
optional | |
ordered |
Steps in order | boolean | optional | |
days |
Days | list of objects: work, withTags, withoutTags, matchAll |
optional | |
groups |
Groups | list of objects: withTags, withoutTags, matchAll |
optional | |
cycle |
Cycle | text | optional | Weekly, Blocks of days |
tagTypes |
Tag types | list | optional | |
maxMeters |
Farthest from home | integer (m) | optional | |
minChangeMinutes |
Time to change place | minutes | optional | |
hourly |
Hourly rate | number | optional | |
baseMinutes |
Minutes at the base rate | minutes | optional | |
overtime |
Overtime tiers | list of objects: hourly, minutes |
optional | |
keepTags |
Tags to keep | list | optional | |
before |
Shift before | object: withTags, withoutTags, matchAll |
optional | |
after |
Shift after | object: withTags, withoutTags, matchAll |
optional |
Calendar schedule
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
start |
Plans from | date time | required | |
end |
Plans until | date time | required | |
weekStart |
Weeks start on | text | optional | Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday |
weekend |
Weekend | list | optional | |
periods |
Periods | list of objects: id, ranges |
optional |
Demand scheduleRules/demand
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
level |
Level | text | optional | Required, Preferred |
slots |
Slots | list of objects: from, to, min, max |
optional | |
withTags |
With tags | list | optional | |
withoutTags |
Without tags | list | optional | |
matchAll |
Every tag | boolean | optional | |
employees |
Employees | object: withTags, withoutTags, matchAll |
optional |
Shift counts scheduleRules/shiftCounts
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
period |
Period | text | required | |
level |
Level | text | optional | Required, Preferred |
weight |
Weight | integer | optional | |
min |
At least | integer | optional | |
max |
At most | integer | optional | |
withTags |
With tags | list | optional | |
withoutTags |
Without tags | list | optional | |
matchAll |
Every tag | boolean | optional | |
employees |
Employees | object: withTags, withoutTags, matchAll |
optional |
Distinct tags scheduleRules/distinctTags
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
period |
Period | text | required | |
level |
Level | text | optional | Required, Preferred |
weight |
Weight | integer | optional | |
tagTypes |
Tag types | list | optional | |
withTags |
With tags | list | optional | |
withoutTags |
Without tags | list | optional | |
matchAll |
Every tag | boolean | optional | |
min |
At least | integer | optional | |
max |
At most | integer | optional |
At the same time scheduleRules/concurrency
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
max |
At most | integer | required | |
withTags |
With tags | list | optional | |
withoutTags |
Without tags | list | optional | |
matchAll |
Every tag | boolean | optional | |
from |
From | date time | optional | |
to |
Until | date time | optional |
Cost limits scheduleRules/costs
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
period |
Period | text | required | |
level |
Level | text | optional | Required, Preferred |
weight |
Weight | integer | optional | |
rates |
Hourly rates | list of objects: employeeGroup, shiftGroup, hourly |
optional | |
min |
At least | integer | optional | |
max |
At most | integer | optional | |
withTags |
With tags | list | optional | |
withoutTags |
Without tags | list | optional | |
matchAll |
Every tag | boolean | optional | |
employees |
Employees | object: withTags, withoutTags, matchAll |
optional |
Fairness scheduleRules/fairness
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
balance |
Balance | text | required | Shifts, Minutes |
history |
Already worked, by employee | json | optional | |
withTags |
With tags | list | optional | |
withoutTags |
Without tags | list | optional | |
matchAll |
Every tag | boolean | optional | |
employees |
Employees | object: withTags, withoutTags, matchAll |
optional |
Alternative shifts alternatives
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
count |
Versions to work | integer | required | |
atMost |
At most | boolean | optional |
Cost groups costGroups
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
activationCost |
Cost to bring in | integer | optional | |
share |
Share | integer | optional | |
fillUp |
Fill up who is in | boolean | optional |
Teams teams
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
leads |
Leads | list | optional | an id from employees |
members |
Members | list | optional | an id from employees |
tagType |
Members share a | text | optional | |
maxShiftsPerDay |
Shift times a day | integer | optional |
Tag types tags
| Field | Label | Kind | Required | Values |
|---|---|---|---|---|
type |
Type | text | required |