Pattern Types
patterns is a top-level array in the request body (alongside shifts, employees, rules, etc.). Each pattern is automatically applied to every employee in the request — patterns cannot currently be scoped to a subset of employees.Satisfiability Levels
Single-Day Patterns
Prevent an employee from working both early and late shifts on the same day:For
SINGLE_DAY patterns, the number of ON elements must exactly match the total number of shifts assigned to the employee that day (matched in chronological order). If the employee has additional shifts beyond the ON elements listed, the pattern will not match.Multi-Day Patterns
Prohibit early shifts immediately after late shifts (next day):This prevents “clopening” scenarios where an employee closes late and opens early the next day.
Pattern Elements
ON - Employee works a shift with matching tags
OFF - Employee does not work a shift with matching tagsIf omitted, type defaults to ON.List of shift tags that this element matches (e.g.,
["EARLY"], ["NIGHT"])Omit tags (or pass an empty array) to match/require any shift regardless of tag — there is no special "ALL" tag.Setting Up Shift Tags
Patterns use tags defined on shifts. Add tags to group shifts:Pattern Weight
Adjust the importance of any pattern —PREFERRED, UNPREFERRED, or PROHIBITED — with weight:
Common Patterns
No back-to-back shifts
No back-to-back shifts
Day off after night shift
Day off after night shift
Consistent shift type per week
Consistent shift type per week