Setting up the Compliance Rules ensures that criteria such as maximum working hours, minimum breaks between shifts, and maximum weekend hours are automatically considered without the Workforce Planner needing to worry about every requirement.
These rules alert Workforce Planners to potential compliance issues, ensuring that all rosters align with organisational policies. Built-in checks provide peace of mind by preventing breaches and ensuring compliance is maintained, so planners can confidently create rosters without worrying about breaching regulations.
Example for Compliance Rules:
Maximum of shift type.
Maximum Working Hours.
Minimum Break between shifts.
Navigate Rules
Compliance rules are generally created by developers. Customers who use compliance rules are encouraged to work with Microsoft Partner/ Velrada to set up their initial rules, which can then be further refined using Compliance constraints.
To navigate the Rules:
Navigate to PowerRoster App > Settings > Go to the Compliance section and select Rules.
Fill in the required fields and Save.
Field | Description |
Name | Name of the Rule |
Lambda Expression | Formula expression used to interact with the C# model and define the rule |
Metadata | Metadata script JSON formula is used to break down bigger statements into smaller logical expressions as parameters within a rule definition. |
Parameters | Parameters used within the Rule |
PowerRoster Compliance Rule Example
In this example, we will create a Compliance Rule when the Shift has a particular Type.
Field | Description |
Name | Shift is particular type |
Lambda Expression | ExpressionExtensions.CheckContains(input1.ShiftType, "|Shift Type|") |
Metadata | { "SuccessEvent":"Has shifts", "ErrorMessage":"shift is not of type |Shift Type|" } |
Go to the second tab and navigate the parameters associated with the Compliance Rule as shown below:
Note
The Night Compliances runs are created by Power Automate and run every night.