Criteria Based Scheduling (Relevance Groups)

Criteria based scheduling allows setting the work rules to only be relevant to a group of Resources and\or group of Shifts. For example, we might want the Maximum Consecutive Work Time rule to be relevant to all shifts except on-call shifts. To do so, follow the steps below:

  1. Create new Availability Type value:
      1. Click on ‘Setup’.
      2. Under ‘Build’ click on ‘Create’ and select ‘Objects’.
      3. Click on the Shift object.
      4. Under ‘Custom Fields & Relationships’ click on ‘Availability Type’.
      5. Under ‘Picklist Values’ click on ‘New’.
      6. Enter ‘On Call’ in the text box and click ‘Save’.

     

  2. Add an on-call Boolean field on the Shift object:
    Rule criteria rely on Boolean properties to group resources\shifts. For example, in this example the rule will be enforced on all shifts where the Boolean ‘Not on Call’ is set to true.

      1. Click on ‘Setup’.
      2. Under ‘Build’ click on ‘Create’ and select ‘Objects’.
      3. Click on the Shift object.
      4. Under ‘Custom Fields & Relationships’ click on ‘New’.
      5. Select ‘Formula’ and click ‘Next’.
      6. Enter ‘Field Label’ and ‘Field Name’, e.g. ‘Not on Call’ and ‘Not_on_Call’ respectively.
      7. Select ‘Checkbox’ and click ‘Next’.
      8. Set the required formula. In this example this formula will work “IF( TEXT(CKSW_BASE__Availability_Type__c) = “On Call”, false, true)”.
      9. Click ‘Next’.
      10. Set who can read\write the field based on profiles and click ‘Next’.
      11. Select on which layouts to show the new field and click ‘Save’.

     

  3. Adding rule criteria configuration component to work rule layout:
      1. Open ShiftExpert Admin app.
      2. Open Work Rules tab.
      3. Open any of the rules.
      4. Click on ‘Edit Layout’.
      5. In the Layout Editor select ‘Visualforce Pages’.
      6. Drag ‘Vf001GroupOnWorkRules’ and drop it on the layout.
      7. Click ‘Save’.
        Layout

     

  4. Configure rule to be enforced only on not on-call shifts:
      1. Open ShiftExpert Admin app.
      2. Open Work Rules tab.
      3. Open any of the rules.
      4. Select ‘Not on Call’ shifts group.
      5. Click ‘Save’.