Skip to main content
Demand-based scheduling is not yet enforced by the solver. Submitting a demands array is currently a no-op — use per-shift min/max staffing levels on shifts instead.
Demands let you specify coverage requirements without creating explicit shifts. The solver assigns employees to existing shifts that best satisfy the demand constraints.
Demand vs supply of shifts

Demand-based scheduling optimizes the overlap between shift supply and staffing demand

Use Cases

  • Peak hour coverage - Ensure minimum staffing during busy periods
  • Event staffing - Temporary increased coverage for special events
  • Flexible scheduling - Define needs without rigid shift boundaries

Basic Demand

Define a demand period with minimum and maximum staffing levels:
This example describes the intended behavior once demand-based scheduling is enforced: the solver would assign employees to shifts that overlap with the demand period, ensuring at least 2 people cover the lunch rush from 11:00-14:00. Currently, the demands array has no effect on the solution — use per-shift min/max staffing levels instead.

Demand Properties

name
string
required
Unique identifier for the demand period
from
datetime
required
Start time of the demand period (ISO 8601 format)
to
datetime
required
End time of the demand period (ISO 8601 format)
skills
array
required
Required skills for this demand period
min
integer
Minimum number of employees required during this period. Optional — omit for no lower bound.
max
integer
Maximum number of employees allowed during this period. Optional — omit for no upper bound.

Demand vs Shifts

Use demands when you care about coverage during a time window but don’t want to micromanage which specific shifts provide that coverage.