Pattern Constraint can be used to allow you to specify patterns that are desired or undesired for the employee to follow in the produced roster. Both possible use cases are discussed separately below.
Constraint schema
object
Used to define patterns of shifts that employees should follow or avoid.
Show properties
string
required
Unique identifier for the constraint.
array of string
Labels for the constraint. Labels can be used to group constraints together. For example, if multiple constraints are related to the same shift type, they can all be labeled with the same label.
string (enum: NONE | VERY_LOW | LOW | MEDIUM | HIGH | ...)
required
The importance of the constraint. The higher the importance, the more the solver will take the constraint into account. Under strict importance, the constraint may never be violated.
boolean
required
If set to true, the solver will try to make employees follow the specified patterns. Else, it will try to avoid making employees follow any of the specified patterns.
object
Filters to determine the scope of the constraint. Used to decide which employees the constraint should be applied to.
Show filters – properties
object
Used to filter which employees the constraint should be applied to. If not specified, the constraint applies to all employees.
Show employees – properties
array of string
List of employee ids that the constraint should be applied to.
array of string
List of employee labels that the constraint should be applied to.
object
Show matchTypes – properties
string (enum: NONE | ANY | ALL)
Used to indicate how to apply the id filters. For example, if set to NONE, entities with the specified ids will be excluded. Default: “ANY”.
string (enum: NONE | ANY | ALL)
Used to indicate how to apply the label filters. For example, if set to ANY, entities that have any of the specified labels will be included. Default: “ANY”.
object
List of periods in the schedule. Periods can either be defined explicitly using custom definitions, or through a recurrent definition. A recurrent definition can be used to easily generate a list of similar periods (such as weeks, months, etc.).
Show periods – properties
object
List of days in the schedule. Each day will become one period. By default, each period will last the entire day. If a startTime and/or endTime are specified, these will apply to each period.
Show days – properties
array of date (date)
List of dates in the schedule. Only allowed in CALENDAR payloads.
array of dayIndex
List of day indices in the schedule. Only allowed in RECURRING payloads.
array of dayOfWeek
List of days of the week. Will apply to all days in the schedule that match any of the specified weekdays.
string (time)
TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.
string (time)
TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.
array of object
List of custom period definitions. Each custom period definition defines one period in the schedule.
Show customDefinitions – item structure
object
Describes one day in the schedule. Can be defined as a date (in CALENDAR payloads) or as a day index (in RECURRING payloads).
Show startDay – properties
string (date)
Date is specified in ISO8601 format YYYY-MM-DD. Can only be used when schedule type is CALENDAR.
integer
Day index relative to the first day of the period (starts at 0). Can only be used when schedule type is RECURRING.
object
Describes one day in the schedule. Can be defined as a date (in CALENDAR payloads) or as a day index (in RECURRING payloads).
Show endDay – properties
string (date)
Date is specified in ISO8601 format YYYY-MM-DD. Can only be used when schedule type is CALENDAR.
integer
Day index relative to the first day of the period (starts at 0). Can only be used when schedule type is RECURRING.
string (time)
TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.
string (time)
TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.
boolean
If true, the startTime and endTime will be applied to each individual day in the period. If false, the startTime will apply to the first day and the endTime will apply to the last day. Default: false.
object
A recurrent definition to easily create a set of similar periods.
Show recurrentDefinition – properties
integer
required
The number of days in each period.
integer
The number of days between the start of each period. If not specified, this defaults to the value of daysPerPeriod, creating non-overlapping consecutive periods. Setting daysBetweenStarts to 1 will create a sliding window of periods.
object
Describes one day in the schedule. Can be defined as a date (in CALENDAR payloads) or as a day index (in RECURRING payloads).
Show startDay – properties
string (date)
Date is specified in ISO8601 format YYYY-MM-DD. Can only be used when schedule type is CALENDAR.
integer
Day index relative to the first day of the period (starts at 0). Can only be used when schedule type is RECURRING.
object
Describes one day in the schedule. Can be defined as a date (in CALENDAR payloads) or as a day index (in RECURRING payloads).
Show endDay – properties
string (date)
Date is specified in ISO8601 format YYYY-MM-DD. Can only be used when schedule type is CALENDAR.
integer
Day index relative to the first day of the period (starts at 0). Can only be used when schedule type is RECURRING.
string (time)
TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.
string (time)
TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.
boolean
If true, the startTime and endTime will be applied to each individual day in the period. If false, the startTime will apply to the first day and the endTime will apply to the last day. Default: false.
array of string
Provide labels to re-use periods that were defined in the configuration.
array of object
required
Show patterns – item structure
array of object
required
Defines the pattern that should be followed. Each element in the array represents a day in the pattern. Note that DAY_OFF is not allowed on strict undesired pattern constraints.
Show patternDays – item structure
object
Used to filter which shifts the constraint should be applied to. If not specified, the constraint applies to all shifts.
Show shifts – properties
array of string
List of shift ids that the constraint should be applied to.
array of string
List of shift labels that the constraint should be applied to.
object
Show matchTypes – properties
string (enum: NONE | ANY | ALL)
Used to indicate how to apply the id filters. For example, if set to NONE, entities with the specified ids will be excluded. Default: “ANY”.
string (enum: NONE | ANY | ALL)
Used to indicate how to apply the label filters. For example, if set to ANY, entities that have any of the specified labels will be included. Default: “ANY”.
string (enum: DAY_OFF | ANY_SHIFT | ANY)
A keyword to represent that a day must be a day off (DAY_OFF), must be a worked day (ANY_SHIFT), or that there are no requirements on this day (ANY).
object
List of days in the schedule. Days can be defined as an array of dates (in CALENDAR payloads), as an array of day indices (in RECURRING payloads), or as an array of weekdays (allowed in all payloads).
Show startDays – properties
array of date (date)
List of dates in the schedule. Only allowed in CALENDAR payloads.
array of dayIndex
List of day indices in the schedule. Only allowed in RECURRING payloads.
array of dayOfWeek
List of days of the week. Will apply to all days in the schedule that match any of the specified weekdays.
object
Used to apply the constraint only to work carried out in specific roles.
Show roles – properties
array of string
List of relevant role ids.
boolean
If set to true, each instance of the pattern will be repeated from its start day until the end of the period that the instance falls within. Otherwise, the pattern is not repeated. Default: false.
integer
The offset that the pattern may start with on the start day. If set to 0, the pattern must start with the first pattern day on each start day. If set to 1, the pattern may start from any of its pattern days on the start day. If set to 7 (for example), the pattern may start with every 7th pattern day on the start day. The pattern is then continued as usual. Default: 0.
object
Describes whether the pattern should skip over days that could be considered irrelevant for the pattern.
Show emptyDayBehaviours – properties
string (enum: INCLUDE | EXCLUDE | MATCH)
Describes whether the pattern counts days outside the schedule period as days in the pattern. The pattern can either always include them (INCLUDE), skip over them (EXCLUDE) or only include them if the pattern allows for a day off on that day (MATCH). Takes priority over the dayWithoutDemand and dayOff properties. Default: “INCLUDE”.
string (enum: INCLUDE | EXCLUDE | MATCH)
Describes whether the pattern counts days without demand as days in the pattern. The pattern can either always include them (INCLUDE), skip over them (EXCLUDE) or only include them if the pattern allows for a day off on that day (MATCH). Default: “INCLUDE”.
string (enum: INCLUDE | EXCLUDE | MATCH)
Describes whether the pattern counts days off as days in the pattern. The pattern can either always include them (INCLUDE), skip over them (EXCLUDE) or only include them if the pattern allows for a day off on that day (MATCH). Default: “INCLUDE”.
Undesired patterns
For undesired patterns, simply define the patterns that you would not want employees to follow. By default, the solver will try to never assign shifts to employees that would make them follow the undesired patterns.
However, if you so desire you can use the startDays field on a specific pattern to specify that the pattern should only be avoided at specific times. For example, some patterns might be fine to follow during the week, but only become undesired during the weekend.
The constraint specified below makes it undesirable for employees to work the night shift on both Saturday and Sunday.
When the importance of a pattern constraint is set to STRICT, the solver will never make an employee follow the specified pattern. Since this cannot be guaranteed with respect to days off, it is not allowed to use the keyword DAY_OFF within a strict undesired constraint’s pattern.
Desired patterns
The desired version of this constraint works in a similar way. Define the patterns that you would like employees to follow. By default, the solver will try to assign shifts to employees that would make them follow the desired patterns.However, if there are multiple patterns that you would like the solver to choose from, some further configuration is needed. In this case, it is required to define periods on the constraint. Within each defined period, the solver will then try
to make the employees follow exactly one of the specified patterns. If you do then do not define startDays on a pattern, it will default to starting on the first day of each period. If you do choose to define startDays, each instance of the pattern
must fall fully within exactly one period. Desired pattern constraints with only one defined pattern do not need to define periods.
In the following constraint, the employees may only work shifts if they are in accordance with either of the two patterns. The periods are defined as each weekend (Friday-Sunday). The first pattern is 3 days long and does not define startDays - it therefore starts on each Friday.
Meanwhile, the second pattern is 2 days long and only starts on Saturdays. When the solver follows the second pattern for some weekend, it is therefore allowed to plan whatever it wants on the Friday of that weekend.
You can use role filters to make a pattern apply only when an employee works in one of those roles.
The constraint specified below makes it undesirable for employees to work the night shift on both Saturday and Sunday when they are working in role 1 or role 2.
In some cases, it can be desirable to allow a pattern to ‘skip over’ days if it will be impossible for an employee to follow the pattern on that day. In particular, days where an employee is not available for work or days where no demand is defined can be configured to be skipped over. These two types of empty day behaviour can be configured separately through the dayOffBehaviour and dayWithoutDemandBehaviour fields on each pattern itself.The current list of empty day behaviours is as follows:
Empty day behaviour
Impact
INCLUDE
Days are always included in the pattern (never skipped over), regardless of whether it is an empty day or not.
EXCLUDE
Days are always excluded from the pattern (always skipped over), regardless of whether it is an empty day or not.
MATCH
Days are included in the pattern as long as the pattern can be matched with a day off on that day.
In order for a day to qualify as a day without demand, there must be no demands defined on that day. In order for a day to qualify as a day off, the employee must be configured to be unavailable for work on that day. This can be done through one of the following constraints:
EmployeeAvailability: The employee is strictly unavailable for work on the entire day.
EmployeeUtilization: The employee has a strict maximum of 0 hours or shifts on the day.
PeriodDistribution: The employee may work a maximum of 0 periods (which includes the day).
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Automatic Rostering","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/automaticrostering/geYJCg2PEZLfgAwl/logo/light.png?fit=max\u0026auto=format\u0026n=geYJCg2PEZLfgAwl\u0026q=85\u0026s=184cc1b5d04c48601ba425b95cf1d878","dark":"https://mintcdn.com/automaticrostering/geYJCg2PEZLfgAwl/logo/light.png?fit=max\u0026auto=format\u0026n=geYJCg2PEZLfgAwl\u0026q=85\u0026s=184cc1b5d04c48601ba425b95cf1d878"},"favicon":"https://mintcdn.com/automaticrostering/tszNXFD11BtKFzPx/favicon.png?fit=max\u0026auto=format\u0026n=tszNXFD11BtKFzPx\u0026q=85\u0026s=c07f8a95ebdc438d2979dd06d3d989ed","api":{"examples":{"languages":[]}},"navbar":{"links":[{"href":"mailto:stian.vale@visma.com","label":"Contact"}]},"footer":{},"contextual":{"options":["copy","chatgpt"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"automaticrostering","hasAudioNarration":false,"actualSubdomain":"automaticrostering","customDomains":["docs.automaticrostering.visma.net"],"gitSource":{"type":"github","owner":"automatic-rostering","repo":"product","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6aedc35cb7010cc612509184","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Guides","count":41},{"language":"default","tag":"Entities","count":24},{"language":"default","tag":"API reference","count":10},{"language":"default","tag":"Constraints","count":9},{"language":"default","tag":"Rules","count":9},{"language":"default","tag":"Roster","count":8},{"language":"default","tag":"Getting started","count":7},{"language":"default","tag":"Concepts","count":3},{"language":"default","tag":"Status updates","count":3},{"language":"default","tag":"Other","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"v1/constraints/pattern","slug":"/v1/constraints/pattern","pageMetadata":{"title":"Pattern","description":"Define desired or undesired shift patterns.","href":"/v1/constraints/pattern"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Define desired or undesired shift patterns.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CodeBlock,Expandable,Heading,ResponseField,Table,Tip}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Pattern Constraint can be used to allow you to specify patterns that are desired or undesired for the employee to follow in the produced roster. Both possible use cases are discussed separately below.`}),`\n`,_jsx(Card,{title:`Constraint schema`,children:_jsxs(ResponseField,{name:`patternConstraint`,type:`object`,id:`param-pattern-constraint`,children:[_jsx(_components.p,{children:`Used to define patterns of shifts that employees should follow or avoid.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`id`,type:`string`,required:true,id:`param-id`,children:_jsx(_components.p,{children:`Unique identifier for the constraint.`})}),_jsx(ResponseField,{name:`labels`,type:`array of string`,id:`param-labels`,children:_jsx(_components.p,{children:`Labels for the constraint. Labels can be used to group constraints together. For example, if multiple constraints are related to the same shift type, they can all be labeled with the same label.`})}),_jsx(ResponseField,{name:`importance`,type:`string (enum: NONE | VERY_LOW | LOW | MEDIUM | HIGH | ...)`,required:true,id:`param-importance`,children:_jsx(_components.p,{children:`The importance of the constraint. The higher the importance, the more the solver will take the constraint into account. Under strict importance, the constraint may never be violated.`})}),_jsx(ResponseField,{name:`isDesired`,type:`boolean`,required:true,id:`param-is-desired`,children:_jsx(_components.p,{children:`If set to true, the solver will try to make employees follow the specified patterns. Else, it will try to avoid making employees follow any of the specified patterns.`})}),_jsx(ResponseField,{name:`filters`,type:`object`,id:`param-filters`,children:_jsx(_components.p,{children:`Filters to determine the scope of the constraint. Used to decide which employees the constraint should be applied to.`})}),_jsxs(Expandable,{title:`filters – properties`,children:[_jsx(ResponseField,{name:`employees`,type:`object`,id:`param-employees`,children:_jsx(_components.p,{children:`Used to filter which employees the constraint should be applied to. If not specified, the constraint applies to all employees.`})}),_jsxs(Expandable,{title:`employees – properties`,children:[_jsx(ResponseField,{name:`ids`,type:`array of string`,id:`param-ids`,children:_jsx(_components.p,{children:`List of employee ids that the constraint should be applied to.`})}),_jsx(ResponseField,{name:`labels`,type:`array of string`,id:`param-labels-1`,children:_jsx(_components.p,{children:`List of employee labels that the constraint should be applied to.`})}),_jsx(ResponseField,{name:`matchTypes`,type:`object`,id:`param-match-types`}),_jsxs(Expandable,{title:`matchTypes – properties`,children:[_jsx(ResponseField,{name:`ids`,type:`string (enum: NONE | ANY | ALL)`,id:`param-ids-1`,children:_jsx(_components.p,{children:`Used to indicate how to apply the id filters. For example, if set to NONE, entities with the specified ids will be excluded. Default: “ANY”.`})}),_jsx(ResponseField,{name:`labels`,type:`string (enum: NONE | ANY | ALL)`,id:`param-labels-2`,children:_jsx(_components.p,{children:`Used to indicate how to apply the label filters. For example, if set to ANY, entities that have any of the specified labels will be included. Default: “ANY”.`})})]})]})]}),_jsx(ResponseField,{name:`periods`,type:`object`,id:`param-periods`,children:_jsx(_components.p,{children:`List of periods in the schedule. Periods can either be defined explicitly using custom definitions, or through a recurrent definition. A recurrent definition can be used to easily generate a list of similar periods (such as weeks, months, etc.).`})}),_jsxs(Expandable,{title:`periods – properties`,children:[_jsx(ResponseField,{name:`days`,type:`object`,id:`param-days`,children:_jsx(_components.p,{children:`List of days in the schedule. Each day will become one period. By default, each period will last the entire day. If a startTime and/or endTime are specified, these will apply to each period.`})}),_jsxs(Expandable,{title:`days – properties`,children:[_jsx(ResponseField,{name:`dates`,type:`array of date (date)`,id:`param-dates`,children:_jsx(_components.p,{children:`List of dates in the schedule. Only allowed in CALENDAR payloads.`})}),_jsx(ResponseField,{name:`dayIndices`,type:`array of dayIndex`,id:`param-day-indices`,children:_jsx(_components.p,{children:`List of day indices in the schedule. Only allowed in RECURRING payloads.`})}),_jsx(ResponseField,{name:`daysOfWeek`,type:`array of dayOfWeek`,id:`param-days-of-week`,children:_jsx(_components.p,{children:`List of days of the week. Will apply to all days in the schedule that match any of the specified weekdays.`})}),_jsx(ResponseField,{name:`startTime`,type:`string (time)`,id:`param-start-time`,children:_jsx(_components.p,{children:`TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.`})}),_jsx(ResponseField,{name:`endTime`,type:`string (time)`,id:`param-end-time`,children:_jsx(_components.p,{children:`TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.`})})]}),_jsx(ResponseField,{name:`customDefinitions`,type:`array of object`,id:`param-custom-definitions`,children:_jsx(_components.p,{children:`List of custom period definitions. Each custom period definition defines one period in the schedule.`})}),_jsxs(Expandable,{title:`customDefinitions – item structure`,children:[_jsx(ResponseField,{name:`startDay`,type:`object`,id:`param-start-day`,children:_jsx(_components.p,{children:`Describes one day in the schedule. Can be defined as a date (in CALENDAR payloads) or as a day index (in RECURRING payloads).`})}),_jsxs(Expandable,{title:`startDay – properties`,children:[_jsx(ResponseField,{name:`date`,type:`string (date)`,id:`param-date`,children:_jsx(_components.p,{children:`Date is specified in ISO8601 format YYYY-MM-DD. Can only be used when schedule type is CALENDAR.`})}),_jsx(ResponseField,{name:`dayIndex`,type:`integer`,id:`param-day-index`,children:_jsx(_components.p,{children:`Day index relative to the first day of the period (starts at 0). Can only be used when schedule type is RECURRING.`})})]}),_jsx(ResponseField,{name:`endDay`,type:`object`,id:`param-end-day`,children:_jsx(_components.p,{children:`Describes one day in the schedule. Can be defined as a date (in CALENDAR payloads) or as a day index (in RECURRING payloads).`})}),_jsxs(Expandable,{title:`endDay – properties`,children:[_jsx(ResponseField,{name:`date`,type:`string (date)`,id:`param-date-1`,children:_jsx(_components.p,{children:`Date is specified in ISO8601 format YYYY-MM-DD. Can only be used when schedule type is CALENDAR.`})}),_jsx(ResponseField,{name:`dayIndex`,type:`integer`,id:`param-day-index-1`,children:_jsx(_components.p,{children:`Day index relative to the first day of the period (starts at 0). Can only be used when schedule type is RECURRING.`})})]}),_jsx(ResponseField,{name:`startTime`,type:`string (time)`,id:`param-start-time-1`,children:_jsx(_components.p,{children:`TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.`})}),_jsx(ResponseField,{name:`endTime`,type:`string (time)`,id:`param-end-time-1`,children:_jsx(_components.p,{children:`TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.`})}),_jsx(ResponseField,{name:`applyTimeToAllDays`,type:`boolean`,id:`param-apply-time-to-all-days`,children:_jsx(_components.p,{children:`If true, the startTime and endTime will be applied to each individual day in the period. If false, the startTime will apply to the first day and the endTime will apply to the last day. Default: false.`})})]}),_jsx(ResponseField,{name:`recurrentDefinition`,type:`object`,id:`param-recurrent-definition`,children:_jsx(_components.p,{children:`A recurrent definition to easily create a set of similar periods.`})}),_jsxs(Expandable,{title:`recurrentDefinition – properties`,children:[_jsx(ResponseField,{name:`daysPerPeriod`,type:`integer`,required:true,id:`param-days-per-period`,children:_jsx(_components.p,{children:`The number of days in each period.`})}),_jsx(ResponseField,{name:`daysBetweenStarts`,type:`integer`,id:`param-days-between-starts`,children:_jsx(_components.p,{children:`The number of days between the start of each period. If not specified, this defaults to the value of daysPerPeriod, creating non-overlapping consecutive periods. Setting daysBetweenStarts to 1 will create a sliding window of periods.`})}),_jsx(ResponseField,{name:`startDay`,type:`object`,id:`param-start-day-1`,children:_jsx(_components.p,{children:`Describes one day in the schedule. Can be defined as a date (in CALENDAR payloads) or as a day index (in RECURRING payloads).`})}),_jsxs(Expandable,{title:`startDay – properties`,children:[_jsx(ResponseField,{name:`date`,type:`string (date)`,id:`param-date-2`,children:_jsx(_components.p,{children:`Date is specified in ISO8601 format YYYY-MM-DD. Can only be used when schedule type is CALENDAR.`})}),_jsx(ResponseField,{name:`dayIndex`,type:`integer`,id:`param-day-index-2`,children:_jsx(_components.p,{children:`Day index relative to the first day of the period (starts at 0). Can only be used when schedule type is RECURRING.`})})]}),_jsx(ResponseField,{name:`endDay`,type:`object`,id:`param-end-day-1`,children:_jsx(_components.p,{children:`Describes one day in the schedule. Can be defined as a date (in CALENDAR payloads) or as a day index (in RECURRING payloads).`})}),_jsxs(Expandable,{title:`endDay – properties`,children:[_jsx(ResponseField,{name:`date`,type:`string (date)`,id:`param-date-3`,children:_jsx(_components.p,{children:`Date is specified in ISO8601 format YYYY-MM-DD. Can only be used when schedule type is CALENDAR.`})}),_jsx(ResponseField,{name:`dayIndex`,type:`integer`,id:`param-day-index-3`,children:_jsx(_components.p,{children:`Day index relative to the first day of the period (starts at 0). Can only be used when schedule type is RECURRING.`})})]}),_jsx(ResponseField,{name:`startTime`,type:`string (time)`,id:`param-start-time-2`,children:_jsx(_components.p,{children:`TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.`})}),_jsx(ResponseField,{name:`endTime`,type:`string (time)`,id:`param-end-time-2`,children:_jsx(_components.p,{children:`TIME ISO 8601 format hh:mm. Equivalent to the 24h format of a single day. Use 00:00 to represent midnight.`})}),_jsx(ResponseField,{name:`applyTimeToAllDays`,type:`boolean`,id:`param-apply-time-to-all-days-1`,children:_jsx(_components.p,{children:`If true, the startTime and endTime will be applied to each individual day in the period. If false, the startTime will apply to the first day and the endTime will apply to the last day. Default: false.`})})]}),_jsx(ResponseField,{name:`labels`,type:`array of string`,id:`param-labels-3`,children:_jsx(_components.p,{children:`Provide labels to re-use periods that were defined in the configuration.`})})]}),_jsx(ResponseField,{name:`patterns`,type:`array of object`,required:true,id:`param-patterns`}),_jsxs(Expandable,{title:`patterns – item structure`,children:[_jsx(ResponseField,{name:`patternDays`,type:`array of object`,required:true,id:`param-pattern-days`,children:_jsx(_components.p,{children:`Defines the pattern that should be followed. Each element in the array represents a day in the pattern. Note that DAY_OFF is not allowed on strict undesired pattern constraints.`})}),_jsxs(Expandable,{title:`patternDays – item structure`,children:[_jsx(ResponseField,{name:`shifts`,type:`object`,id:`param-shifts`,children:_jsx(_components.p,{children:`Used to filter which shifts the constraint should be applied to. If not specified, the constraint applies to all shifts.`})}),_jsxs(Expandable,{title:`shifts – properties`,children:[_jsx(ResponseField,{name:`ids`,type:`array of string`,id:`param-ids-2`,children:_jsx(_components.p,{children:`List of shift ids that the constraint should be applied to.`})}),_jsx(ResponseField,{name:`labels`,type:`array of string`,id:`param-labels-4`,children:_jsx(_components.p,{children:`List of shift labels that the constraint should be applied to.`})}),_jsx(ResponseField,{name:`matchTypes`,type:`object`,id:`param-match-types-1`}),_jsxs(Expandable,{title:`matchTypes – properties`,children:[_jsx(ResponseField,{name:`ids`,type:`string (enum: NONE | ANY | ALL)`,id:`param-ids-3`,children:_jsx(_components.p,{children:`Used to indicate how to apply the id filters. For example, if set to NONE, entities with the specified ids will be excluded. Default: “ANY”.`})}),_jsx(ResponseField,{name:`labels`,type:`string (enum: NONE | ANY | ALL)`,id:`param-labels-5`,children:_jsx(_components.p,{children:`Used to indicate how to apply the label filters. For example, if set to ANY, entities that have any of the specified labels will be included. Default: “ANY”.`})})]})]}),_jsx(ResponseField,{name:`keyword`,type:`string (enum: DAY_OFF | ANY_SHIFT | ANY)`,id:`param-keyword`,children:_jsx(_components.p,{children:`A keyword to represent that a day must be a day off (DAY_OFF), must be a worked day (ANY_SHIFT), or that there are no requirements on this day (ANY).`})})]}),_jsx(ResponseField,{name:`startDays`,type:`object`,id:`param-start-days`,children:_jsx(_components.p,{children:`List of days in the schedule. Days can be defined as an array of dates (in CALENDAR payloads), as an array of day indices (in RECURRING payloads), or as an array of weekdays (allowed in all payloads).`})}),_jsxs(Expandable,{title:`startDays – properties`,children:[_jsx(ResponseField,{name:`dates`,type:`array of date (date)`,id:`param-dates-1`,children:_jsx(_components.p,{children:`List of dates in the schedule. Only allowed in CALENDAR payloads.`})}),_jsx(ResponseField,{name:`dayIndices`,type:`array of dayIndex`,id:`param-day-indices-1`,children:_jsx(_components.p,{children:`List of day indices in the schedule. Only allowed in RECURRING payloads.`})}),_jsx(ResponseField,{name:`daysOfWeek`,type:`array of dayOfWeek`,id:`param-days-of-week-1`,children:_jsx(_components.p,{children:`List of days of the week. Will apply to all days in the schedule that match any of the specified weekdays.`})})]}),_jsx(ResponseField,{name:`roles`,type:`object`,id:`param-roles`,children:_jsx(_components.p,{children:`Used to apply the constraint only to work carried out in specific roles.`})}),_jsx(Expandable,{title:`roles – properties`,children:_jsx(ResponseField,{name:`ids`,type:`array of string`,id:`param-ids-4`,children:_jsx(_components.p,{children:`List of relevant role ids.`})})}),_jsx(ResponseField,{name:`isRepeating`,type:`boolean`,id:`param-is-repeating`,children:_jsx(_components.p,{children:`If set to true, each instance of the pattern will be repeated from its start day until the end of the period that the instance falls within. Otherwise, the pattern is not repeated. Default: false.`})}),_jsx(ResponseField,{name:`startOffsets`,type:`integer`,id:`param-start-offsets`,children:_jsx(_components.p,{children:`The offset that the pattern may start with on the start day. If set to 0, the pattern must start with the first pattern day on each start day. If set to 1, the pattern may start from any of its pattern days on the start day. If set to 7 (for example), the pattern may start with every 7th pattern day on the start day. The pattern is then continued as usual. Default: 0.`})})]}),_jsx(ResponseField,{name:`emptyDayBehaviours`,type:`object`,id:`param-empty-day-behaviours`,children:_jsx(_components.p,{children:`Describes whether the pattern should skip over days that could be considered irrelevant for the pattern.`})}),_jsxs(Expandable,{title:`emptyDayBehaviours – properties`,children:[_jsx(ResponseField,{name:`dayOutsideSchedule`,type:`string (enum: INCLUDE | EXCLUDE | MATCH)`,id:`param-day-outside-schedule`,children:_jsx(_components.p,{children:`Describes whether the pattern counts days outside the schedule period as days in the pattern. The pattern can either always include them (INCLUDE), skip over them (EXCLUDE) or only include them if the pattern allows for a day off on that day (MATCH). Takes priority over the dayWithoutDemand and dayOff properties. Default: “INCLUDE”.`})}),_jsx(ResponseField,{name:`dayWithoutDemand`,type:`string (enum: INCLUDE | EXCLUDE | MATCH)`,id:`param-day-without-demand`,children:_jsx(_components.p,{children:`Describes whether the pattern counts days without demand as days in the pattern. The pattern can either always include them (INCLUDE), skip over them (EXCLUDE) or only include them if the pattern allows for a day off on that day (MATCH). Default: “INCLUDE”.`})}),_jsx(ResponseField,{name:`dayOff`,type:`string (enum: INCLUDE | EXCLUDE | MATCH)`,id:`param-day-off`,children:_jsx(_components.p,{children:`Describes whether the pattern counts days off as days in the pattern. The pattern can either always include them (INCLUDE), skip over them (EXCLUDE) or only include them if the pattern allows for a day off on that day (MATCH). Default: “INCLUDE”.`})})]})]})]})}),`\n`,_jsx(Heading,{level:`2`,id:`undesired-patterns`,children:`Undesired patterns`}),`\n`,_jsxs(_components.p,{children:[`For undesired patterns, simply define the patterns that you would not want employees to follow. By default, the solver will try to never assign shifts to employees that would make them follow the undesired patterns.\nHowever, if you so desire you can use the `,_jsx(_components.code,{children:`startDays`}),` field on a specific pattern to specify that the pattern should only be avoided at specific times. For example, some patterns might be fine to follow during the week, but only become undesired during the weekend.`]}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:`The constraint specified below makes it undesirable for employees to work the night shift on both Saturday and Sunday.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`20`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"spc-weekend-patterns\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"importance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MEDIUM\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"isDesired\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"patterns\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startDays\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"daysOfWeek\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SAT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"patternDays\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shifts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"night-shift\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shifts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"night-shift\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`When the `,_jsx(_components.a,{href:`/constraints/index#constraint-importance`,children:`importance`}),` of a pattern constraint is set to `,_jsx(_components.code,{children:`STRICT`}),`, the solver will `,_jsx(_components.em,{children:`never`}),` make an employee follow the specified pattern. Since this cannot be guaranteed with respect to days off, it is not allowed to use the keyword `,_jsx(_components.code,{children:`DAY_OFF`}),` within a strict undesired constraint’s pattern.`]}),`\n`,_jsx(Heading,{level:`2`,id:`desired-patterns`,children:`Desired patterns`}),`\n`,_jsx(_components.p,{children:`The desired version of this constraint works in a similar way. Define the patterns that you would like employees to follow. By default, the solver will try to assign shifts to employees that would make them follow the desired patterns.`}),`\n`,_jsxs(_components.p,{children:[`However, if there are multiple patterns that you would like the solver to choose from, some further configuration is needed. In this case, it is required to define `,_jsx(_components.code,{children:`periods`}),` on the constraint. Within each defined period, the solver will then try\nto make the employees follow exactly one of the specified patterns. If you do then do not define `,_jsx(_components.code,{children:`startDays`}),` on a pattern, it will default to starting on the first day of each period. If you do choose to define `,_jsx(_components.code,{children:`startDays`}),`, each instance of the pattern\nmust fall fully within exactly one period. Desired pattern constraints with only one defined pattern do not need to define `,_jsx(_components.code,{children:`periods`}),`.`]}),`\n`,_jsxs(Tip,{children:[_jsxs(_components.p,{children:[`In the following constraint, the employees may only work shifts if they are in accordance with either of the two patterns. The periods are defined as each weekend (Friday-Sunday). The first pattern is 3 days long and does not define `,_jsx(_components.code,{children:`startDays`}),` - it therefore starts on each Friday.\nMeanwhile, the second pattern is 2 days long and only starts on Saturdays. When the solver follows the second pattern for some weekend, it is therefore allowed to plan whatever it wants on the Friday of that weekend.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`43`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`43`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"patternConstraints\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"spc-strict-weekends\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"importance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STRICT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"isDesired\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"periods\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"recurrentDefinition\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"daysPerPeriod\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"daysBetweenStarts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`7`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"patterns\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"patternDays\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shifts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"shift_1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shifts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"shift_1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shifts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"shift_1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startDays\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"daysOfWeek\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SAT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"patternDays\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shifts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"shift_2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shifts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"shift_2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`patterns-with-role-filters`,children:`Patterns with role filters`}),`\n`,_jsx(_components.p,{children:`You can use role filters to make a pattern apply only when an employee works in one of those roles.`}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:`The constraint specified below makes it undesirable for employees to work the night shift on both Saturday and Sunday when they are working in role 1 or role 2.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"spc-weekend-roles\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"importance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MEDIUM\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"isDesired\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"patterns\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startDays\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"daysOfWeek\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SAT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"patternDays\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shifts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"night-shift\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shifts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"night-shift\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"roles\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role_1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role_2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`empty-day-behaviour`,children:`Empty day behaviour`}),`\n`,_jsxs(_components.p,{children:[`In some cases, it can be desirable to allow a pattern to ‘skip over’ days if it will be impossible for an employee to follow the pattern on that day. In particular, days where an employee is not available for work or days where no demand is defined can be configured to be skipped over. These two types of empty day behaviour can be configured separately through the `,_jsx(_components.code,{children:`dayOffBehaviour`}),` and `,_jsx(_components.code,{children:`dayWithoutDemandBehaviour`}),` fields on each pattern itself.`]}),`\n`,_jsx(_components.p,{children:`The current list of empty day behaviours is as follows:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Empty day behaviour`}),_jsx(_components.th,{children:`Impact`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`INCLUDE`})}),_jsx(_components.td,{children:`Days are always included in the pattern (never skipped over), regardless of whether it is an empty day or not.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`EXCLUDE`})}),_jsx(_components.td,{children:`Days are always excluded from the pattern (always skipped over), regardless of whether it is an empty day or not.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`MATCH`})}),_jsx(_components.td,{children:`Days are included in the pattern as long as the pattern can be matched with a day off on that day.`})]})]})]}),`\n`,_jsx(_components.p,{children:`In order for a day to qualify as a day without demand, there must be no demands defined on that day. In order for a day to qualify as a day off, the employee must be configured to be unavailable for work on that day. This can be done through one of the following constraints:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/constraints/employee-availability`,children:_jsx(_components.strong,{children:`EmployeeAvailability`})}),`: The employee is strictly unavailable for work on the entire day.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/constraints/employee-utilization`,children:_jsx(_components.strong,{children:`EmployeeUtilization`})}),`: The employee has a strict maximum of 0 hours or shifts on the day.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/constraints/period-distribution`,children:_jsx(_components.strong,{children:`PeriodDistribution`})}),`: The employee may work a maximum of 0 periods (which includes the day).`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Pattern","description":"Define desired or undesired shift patterns.","href":"/v1/constraints/pattern"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Undesired patterns","slug":"undesired-patterns","depth":2,"children":[]},{"title":"Desired patterns","slug":"desired-patterns","depth":2,"children":[]},{"title":"Patterns with role filters","slug":"patterns-with-role-filters","depth":2,"children":[]},{"title":"Empty day behaviour","slug":"empty-day-behaviour","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/automaticrostering/cf28444263d74e9f/v1/api-reference/scripts/schema-to-mintlify.js","/_mintlify/custom/automaticrostering/c99586a9043111f0/v1/api-reference/scripts/strip-deprecated.js","/_mintlify/custom/automaticrostering/91008760a362276f/v1/api-reference/update-api.js","/_mintlify/custom/automaticrostering/2d0dc99d5a8b6ce9/v2/update-api.js"],"subdomain":"automaticrostering","siteName":"Automatic Rostering","title":"Pattern - Automatic Rostering","navMaps":{"firstHrefInVersion":{"2.0.0":{"href":"/v2/entities/employees","matchLevel":2},"1.0.0":{"href":"/v1/constraints/pattern","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-04-23T11:50:03.125Z","originalFileLocation":"v1/constraints/pattern.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Define desired or undesired shift patterns.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Automatic Rostering\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/automaticrostering/nNovoS61Lhz_FEoi/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/automaticrostering/nNovoS61Lhz_FEoi/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/automaticrostering/nNovoS61Lhz_FEoi/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/automaticrostering/nNovoS61Lhz_FEoi/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/automaticrostering/nNovoS61Lhz_FEoi/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/automaticrostering/nNovoS61Lhz_FEoi/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/automaticrostering/nNovoS61Lhz_FEoi/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/automaticrostering/nNovoS61Lhz_FEoi/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/automaticrostering/nNovoS61Lhz_FEoi/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Pattern - Automatic Rostering\">\u003cmeta data-mint-head property=\"og:description\" content=\"Define desired or undesired shift patterns.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Automatic Rostering\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.automaticrostering.visma.net/v1/constraints/pattern\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://automaticrostering.mintlify.site/_mintlify/api/og/v2?division=Constraints\u0026amp;title=Pattern\u0026amp;description=Define+desired+or+undesired+shift+patterns.\u0026amp;theme=82f9a5919eb5b34df74de5d7\u0026amp;signature=7350586d9119d2da1b1673b4bb75fd8646066f6c876f3ed2471a27681e7e76f2\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Pattern - Automatic Rostering\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Define desired or undesired shift patterns.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://automaticrostering.mintlify.site/_mintlify/api/og/v2?division=Constraints\u0026amp;title=Pattern\u0026amp;description=Define+desired+or+undesired+shift+patterns.\u0026amp;theme=82f9a5919eb5b34df74de5d7\u0026amp;signature=7350586d9119d2da1b1673b4bb75fd8646066f6c876f3ed2471a27681e7e76f2\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/automaticrostering/nNovoS61Lhz_FEoi/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Automatic Rostering\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.automaticrostering.visma.net/v1/constraints/pattern\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v1/constraints/pattern.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.automaticrostering.visma.net/#organization\",\"name\":\"Automatic Rostering\",\"url\":\"https://docs.automaticrostering.visma.net\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/automaticrostering/geYJCg2PEZLfgAwl/logo/light.png?fit=max\u0026auto=format\u0026n=geYJCg2PEZLfgAwl\u0026q=85\u0026s=184cc1b5d04c48601ba425b95cf1d878\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.automaticrostering.visma.net#website\",\"name\":\"Automatic Rostering\",\"url\":\"https://docs.automaticrostering.visma.net\",\"publisher\":{\"@id\":\"https://docs.automaticrostering.visma.net/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.automaticrostering.visma.net/v1/constraints/pattern#webpage\",\"url\":\"https://docs.automaticrostering.visma.net/v1/constraints/pattern\",\"name\":\"Pattern\",\"description\":\"Define desired or undesired shift patterns.\",\"dateModified\":\"2026-04-23T11:50:03.125Z\",\"isPartOf\":{\"@id\":\"https://docs.automaticrostering.visma.net#website\"},\"breadcrumb\":{\"@id\":\"https://docs.automaticrostering.visma.net/v1/constraints/pattern#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.automaticrostering.visma.net/v1/constraints/pattern#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Entities\",\"item\":\"https://docs.automaticrostering.visma.net/v1/entities/employees\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Constraints\",\"item\":\"https://docs.automaticrostering.visma.net/v1/constraints\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Pattern\",\"item\":\"https://docs.automaticrostering.visma.net/v1/constraints/pattern\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.automaticrostering.visma.net/v1/constraints/pattern#article\",\"headline\":\"Pattern\",\"name\":\"Pattern\",\"description\":\"Define desired or undesired shift patterns.\",\"url\":\"https://docs.automaticrostering.visma.net/v1/constraints/pattern\",\"mainEntityOfPage\":{\"@id\":\"https://docs.automaticrostering.visma.net/v1/constraints/pattern#webpage\"},\"dateModified\":\"2026-04-23T11:50:03.125Z\",\"publisher\":{\"@id\":\"https://docs.automaticrostering.visma.net/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.automaticrostering.visma.net#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Automatic Rostering\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Automatic Rostering\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/v1/constraints/pattern.md","siteName":"Automatic Rostering","nav":{"global":null,"versions":[{"version":"2.0.0","default":true,"tag":"Latest","pages":[{"title":"2.0.0","href":"/v2/entities/employees"}]},{"version":"1.0.0","tabs":[{"tab":"Guides","groups":[{"group":"Getting started","pages":[{"title":"Introduction","icon":"hand-wave","href":"/v1"},{"title":"Authentication","icon":"key","href":"/v1/getting-started/authentication"},{"title":"Quickstart","icon":"circle-play","href":"/v1/getting-started/quickstart"}]},{"group":"Concepts","pages":[{"title":"Periods","icon":"calendar-week","href":"/v1/concepts/periods"}]},{"group":"Entities","pages":[{"title":"Employees","icon":"users","href":"/v1/entities/employees"},{"title":"Shifts","icon":"clock","href":"/v1/entities/shifts"},{"title":"Demands","icon":"chart-column","href":"/v1/entities/demands"},{"group":"Constraints","icon":"shield-check","pages":[{"title":"Core concepts","href":"/v1/constraints/index"},{"title":"Employee Availability","href":"/v1/constraints/employee-availability"},{"title":"Employee Utilization","href":"/v1/constraints/employee-utilization"},{"title":"Cooldown","href":"/v1/constraints/cooldown"},{"title":"Consecutive","description":"Control the number of consecutive shifts or days that employees can work.","href":"/v1/constraints/consecutive"},{"title":"Pattern","href":"/v1/constraints/pattern"},{"title":"Periodic Rest","description":"Set targets for the minimum rest an employee should receive in each period","href":"/v1/constraints/periodic-rest"},{"title":"Period Distribution","href":"/v1/constraints/period-distribution"},{"title":"Fairness","href":"/v1/constraints/fairness"}]}]},{"group":"Other","pages":[{"title":"Changelog","href":"/v1/misc/changelog"},{"title":"Migrate from XML to JSON","href":"/v1/misc/migrate"}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/roster/start-job"}]}],"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"/"},{"anchor":"Playground","icon":"code","href":"https://ar-playground-one.vercel.app/"}]}}]},"basePath":"","title":"Pattern - Automatic Rostering","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}