Existing Working Day Change Constraint
Soft constraint
The Existing Working Day Change Constraint is being deprecated in favour of a new constraint. The goal is to merge it with NewWorkingDayConstraint and to resolve outstanding issues with this constraint. It is not suggested at this time to integrate with it, and instead to wait for the new constraint to be released.
Any changes to pre-scheduled shifts will be penalized. Hence, this differs from the New Working Day Constraint as it also penalizes changes to the shift itself, not just the working day.
See the payload example below to get started and check out the API reference for full configurability of the constraint.
The following defines a constraint that penalizes any changes to pre-assigned shifts of work types IDs 1 or 2 for employee 2.
{
"existingWorkingDayChangeConstraints": [
{
"id": "ewdc-123",
"weight": 100,
"workTypeIds": ["1", "2"],
"employeeIds": ["2"]
}
]
}
Existing Working Day Change Constraint in the request payload
| id required | string (constraintId) Unique identifier for the constraint. |
| weight | integer (constraintWeightPositive) [ 0 .. 100 ] Deprecated DEPRECATED - Use importance instead. |
| workTypeIds | Array of strings (constraintWorkTypeIds) unique List of workType IDs for which the constraint applies. The workTypeIds should be present in workType section. If work type ids are not specified, the constraint will be applied to all work types. |
| employeeIds | Array of strings (constraintEmployeeIds) unique List of employee ids for which the constraint applies. The employee ids must be present in the employee section. If not specified, the constraint will be applied to all employees. |
object (constraintFairness) Deprecated DEPRECATED - Use FairnessConstraints instead. |
{- "id": "string",
- "weight": 0,
- "workTypeIds": [
- "string"
], - "employeeIds": [
- "string"
], - "fairness": {
- "fairnessWeight": 0,
- "fteAdjustedFairness": false
}
}