Skip to main content
function createEmployeeAssignmentPriorityRule(config): CompilationRule;
Adds objective weight to prefer or avoid assigning team members. Supports entity scoping (people, roles, skills) and time scoping (date ranges, specific dates, days of week, recurring periods).

Parameters

config
EmployeeAssignmentPriorityConfig
required

Returns

CompilationRule

Examples

createEmployeeAssignmentPriorityRule({
  employeeIds: ["alice", "bob"],
  preference: "high",
});
createEmployeeAssignmentPriorityRule({
  roleIds: ["student"],
  dayOfWeek: ["monday", "tuesday", "wednesday", "thursday", "friday"],
  preference: "low",
});
createEmployeeAssignmentPriorityRule({
  skillIds: ["senior"],
  dayOfWeek: ["saturday", "sunday"],
  preference: "high",
});