Tags and tag types
Tags provide additional data to domain objects, such as employees and shifts. An example of a tag could be country 'Belgium', department 'A', or employment type 'Contractor'.
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.
Tags can be grouped into tag types.
An example of a tag type could be 'Country', 'Department', or 'Tasks'.
Some rules, such as Shift travel and locations require additional tag information, meaning the user needs to enumerate all referenced tags and their categories explicitly in the input payload as a part of top-level tagTypes and tags collection.
When declaring Tag Types and Tags, tagTypes must be declared before tags.
|
{
"modelInput": {
"tagTypes": [
{
"id": "Tasks"
}
],
"tags": [
{
"id": "Task A",
"tagType": "Tasks"
},
{
"id": "Task B",
"tagType": "Tasks"
},
{
"id": "Task C",
"tagType": "Tasks"
}
]
}
}