Tags and tag types
Tags provide additional information about employees and shifts. For example, a tag could be a country such as "Belgium", a department "Accounting", an employment type "Contractor", or a task "Reporting".
Tags can be grouped into tag types. A tag type could be "Country", "Department", "Employment Type", or "Task".
{
"modelInput": {
"tagTypes": [
{
"id": "Tasks"
}
],
"tags": [
{
"id": "Task A",
"tagType": "Tasks"
},
{
"id": "Task B",
"tagType": "Tasks"
},
{
"id": "Task C",
"tagType": "Tasks"
}
]
}
}
When an employee or shift already references a tag, you can use the same tag in a rule that works with tag types.
Declare the existing tag in the top-level tags collection with the tagType that the rule uses, and keep using the same tag ID on the employee or shift.
You don’t need to create a duplicate tag only to use that tag in a new rule.
Tags can be used to filter out specific employees or shifts in rules.
Imagine a case where we want to apply Balance time worked constraints, but exclude external contractors and one-off shifts from the consideration.
We follow a convention of using includeEmployeeTags or excludeEmployeeTags to filter out employees, and using includeShiftTags or excludeShiftTags to filter out shifts in the rules.
These basic filters don’t require the user to enumerate all the tags and their categories explicitly in the input payload as a part of top-level tags and tagTypes collection.
|