Request Structure
Top-Level Fields
Skill requirements across shifts. See Requirement.
Workload distribution groups. See FairnessBucket.
Pre-assigned employee-shift pairs. See Assignment.
Webhook URL for completion notification.
Label to identify the request (e.g. end customer id). Max 255 characters.
Optional metadata for tracking purposes (e.g. customerId, appId, userId). Max 10 entries.
Shift
Shifts represent time slots that need employees assigned.Unique identifier for the shift.
Shift start time (ISO 8601 format).
Shift end time (ISO 8601 format).
Required skill references. Employees must have matching skills.
Minimum employees required for this shift.
Maximum employees allowed for this shift.
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.
Employee names that cannot be assigned to this shift.
Financial cost for assigning this shift. Minimized in partial planning.
Geographic location of the shift (
{lat, lon}). Used with an employee’s home location to optimize/penalize travel time.ShiftTag
Tag identifier used in rules and patterns.
Employee
Employees are the workforce available for shift assignments.Unique identifier for the employee.
Employee capabilities. Each skill has a
name, optional weight (proficiency), and optional expiry date.Available time ranges (ISO 8601 interval format).
Preferred shift names.
List of employee contracts (working-time limits, shift-length limits, etc.).
Home location of the employee; the solver optimizes total travel time.
Hourly pay of the employee; the solver optimizes planning cost.
Rules scoped to a specific period, overriding contract defaults for that period.
Rule
Rules define labor constraints using counters or sequences.Rule type:
COUNTER or SEQUENCE.What to measure:
DAYS_WORKED, DAYS_IDLE, WEEKENDS_WORKED, WEEKENDS_IDLE, SHIFT_TYPES_WORKED, SHIFT_TYPES_HOURS_WORKED, HOURS_WORKED, MAX_CONSECUTIVE_DAYS.Minimum count or sequence length.
Maximum count or sequence length.
min or max must be provided; a Rule cannot omit both.
Time scope with
from/to or rolling duration.Filter to specific shift tags.
Conditional rule triggered when threshold exceeded.
Requirement
Skill requirements across multiple shifts.Shift names this requirement applies to.
Required skill name.
Number of employees with this skill required.
FairnessBucket
Groups for equitable workload distribution.Employees in this fairness group.
Shifts to distribute fairly.
Evaluation period with
from and to dates.Target workload per employee.
Pattern
Shift sequence preferences or restrictions.SINGLE_DAY or MULTI_DAY.PREFERRED, UNPREFERRED, or PROHIBITED.Sequence elements with
type (ON/OFF) and tags (tag list).Priority weight for preferred patterns.
Demand
Coverage requirements independent of shifts.Unique demand identifier.
Demand period start.
Demand period end.
Required skills for this demand period.
Minimum employees required.
Maximum employees allowed.
Assignment
Pre-defined employee-shift pairings.Shift name to assign.
Employee name to assign.
If
true, the solver cannot change this assignment.Options
Solver configuration settings.Enforce availability as hard constraint.
Enforce skill matching as hard constraint.
Enforce blocklist as hard constraint.
Allow unfilled shifts in solution.
Penalize employees with no assignments.
Explanation settings. See ExplanationOptions.
Weekend definition. See IdleWeekendDefinition.
Whether to use the location on employee availability windows when computing travel time.
Whether to always score shared skill requirements, even when not otherwise triggered.
ExplanationOptions
Enable alternative generation.
Exclude infeasible alternatives from response.
Compute alternatives only for unassigned shifts.
IdleWeekendDefinition
Weekend start day.
Weekend start time (HH:mm:ss).
Weekend end day.
Weekend end time (HH:mm:ss).
Minimum consecutive rest for idle weekend.
Rest
Rest period constraints.Shift tags that trigger this rest.
Shift tags excluded from rest calculation.
AFTER, BEFORE, or CUMULATIVE relative to the triggering shift.Fixed period for periodic rest rules.
Rolling period:
WEEKLY, DAILY.Minimum total rest.
Maximum total rest.
Minimum uninterrupted rest.
Maximum rest occurrences.