Request Structure
Top-Level Fields
List of shifts to be filled with employees. See Shift.
List of available employees. See Employee.
Labor rules and constraints. See Rule.
Skill requirements across shifts. See Requirement.
Workload distribution groups. See FairnessBucket.
Rest period constraints. See Rest.
Shift sequence patterns. See Pattern.
Coverage requirements. See Demand.
Pre-assigned employee-shift pairs. See Assignment.
Solver configuration. See Options.
Custom constraint weights. See Weights.
Shift
Shifts represent time slots that need employees assigned.Shift importance; the solver’s penalty for leaving the shift unassigned scales with this value, so a higher value means higher priority (more likely to be filled). Must be ≥ 0. No fixed upper bound.
Shift tags for grouping in rules and patterns. See ShiftTag.
Geographic location of the shift (
{lat, lon}). Used with an employee’s home location to optimize/penalize travel time.Rest requirements after this shift. See Rest.
ShiftTag
Employee
Employees are the workforce available for shift assignments.Employee capabilities. Each skill has a
name, optional weight (proficiency), and optional expiry date.Rule
Rules define labor constraints using counters or sequences.What to measure:
DAYS_WORKED, DAYS_IDLE, WEEKENDS_WORKED, WEEKENDS_IDLE, SHIFT_TYPES_WORKED, SHIFT_TYPES_HOURS_WORKED, HOURS_WORKED, MAX_CONSECUTIVE_DAYS.min or max must be provided; a Rule cannot omit both.
Requirement
Skill requirements across multiple shifts.FairnessBucket
Groups for equitable workload distribution.Pattern
Shift sequence preferences or restrictions.Demand
Coverage requirements independent of shifts.Assignment
Pre-defined employee-shift pairings.Options
Solver configuration settings.Explanation settings. See ExplanationOptions.
Weekend definition. See IdleWeekendDefinition.
Whether to always score shared skill requirements, even when not otherwise triggered.