Meal Confirmation Pay Rule

Class Name

com.workbrain.app.ta.quickrules.MealConfirmationPayRule

Overview

The Meal Confirmation Pay Rule is used to remove meal breaks when an employee has indicated that they did not receive their scheduled meal break upon clocking off.

Only employees belonging to a reader group with the Enable Meal Confirmation option enabled are eligible to be prompted for the meal confirmation. In addition, employees clocking using mobility must also belong to a calculation group with the Enable Meal Confirmation option enabled.

When an OFF clock is recorded by an employee prompted to confirm their meal, the OFF clock includes an extra token indicating the employee's response to the prompt:

  • MEAL=Y: The employee has confirmed that they received their scheduled meal break.
  • MEAL=N: The employee has indicated that they did not receive their scheduled meal break.

This rule checks for the presence of the MEAL token. When an employee indicates that they did not take their scheduled meal break (MEAL=N), the relevant work details are updated as configured in the rule.

Parameters

Parameter Description
Change From Select the time codes that identify work details that need to be updated when the employee indicates that they did not receive their meal.

For example, if this parameter is configured with MEAL, the rule will replace all details found from the last OFF punch with the MEAL time code. All other details will be ignored.

If this parameter is left blank, the rule will replace all details found from the last OFF punch with time code(s) configured as break related.

Change to Time Code Select the time code that will be used to replace the work details updated by the rule.

For example, if this parameter is configured with WRK, then all eligible details will be replaced with the WRK time code.

If this parameter is left blank, the rule will use the labor metrics from the detail immediately before the break-related detail being replaced. For example, if an employee has a time code of TRN and a department of 1234 from 9:00 to 12:00 and then a scheduled meal from 12:00 to 13:00, after the rule is applied, the employee will have a single segment of work from 9:00 to 13:00 allocated to the TRN time code and 1234 department.

Change to Hour Type Select the hour type that will be used to replace the work details updated by the rule.

For example, if this parameter is configured with REG, then all eligible details will be replaced with the REG hour type.

If this parameter is left blank, the rule will use the labor metrics from the detail immediately before the break-related detail being replaced.

Reset Type Select one of these options to determine whether the reset is based on the last OFF clock or the Reset Description parameter described below:
  • Previous Off Clock: The look period for each segment is limited to each occurrence of an OFF clock with a MEAL clock token. This is the default.
  • Reset Codes: The look period for each segment is determined based on the presence or absence of the reset code definitions specified in the Reset Description parameter.
Reset Description Required when the Reset Type parameter is set to Reset Codes. If an employee is scheduled to work a split shift, this parameter determines the work detail and time codes that define the early part of the look period.

Specify a comma-separated list of time codes and durations that mark the opening boundary for the checking of eligible breaks (for example, GAP=120). If the rule finds a detail equal or greater to the detail defined in this parameter, the rule will not flip otherwise eligible breaks occurring before the reset detail.

Example: Replace meal break with WRK, single shift

In this example, an employee's meal break is replaced by WRK if their OFF clock includes the extra data MEAL=N.

Parameters:

Parameter Value
Change From MEAL
Change to Time Code WRK
Change to Hour Type REG

The employee is scheduled from 9:00 to 18:00 with a MEAL from 12:00 to 13:00 and a BRK from 15:00 to 15:15. The employee records an ON clock at 8:59. At the conclusion of their shift, the employee records an OFF clock at 18:02 and indicates that they did not receive their scheduled meal.

The employee had these work details before the rule was applied:

Start Time End Time Time Code Hour Type Department
08:59 12:00 WRK REG Dept A
12:00 13:00 MEAL UNPAID Dept A
13:00 15:00 WRK REG Dept A
15:00 15:15 BRK UNPAID Dept A
15:15 18:02 WRK REG Dept A

After the rule is applied, the employee has these work details:

Start Time End Time Time Code Hour Type Department
08:59 15:00 WRK REG Dept A
15:00 15:15 BRK UNPAID Dept A
15:15 18:02 WRK REG Dept A

Example: Replace meal break with adjacent detail and OTS, single shift

In this example, an employee's meal break is replaced by an adjacent work detail and the OTS hour type if their OFF clock includes the extra data MEAL=N.

Parameters:

Parameter Value
Change From MEAL
Change to Time Code <blank>
Change to Hour Type OTS

The employee is scheduled from 9:00 to 18:00 with a MEAL from 12:00 to 13:00. The employee records a TRN time code clock as an ON clock at 8:59. At the conclusion of their shift, the employee records an OFF clock at 18:02 and indicates that they did not receive their scheduled meal.

The employee had these work details before the rule was applied:

Start Time End Time Time Code Hour Type Department
08:59 12:00 TRN REG Dept A
12:00 13:00 MEAL UNPAID Dept A
13:00 18:02 TRN REG Dept A

After the rule is applied, the employee has these work details:

Start Time End Time Time Code Hour Type Department
08:59 12:00 TRN REG Dept A
12:00 13:00 TRN OTS Dept A
13:00 18:02 TRN REG Dept A

Example: Replace all breaks by adjacent details, single shift

In this example, all of an employee's breaks are replaced by adjacent work details if their OFF clock includes the extra data MEAL=N.

Parameters:

Parameter Value
Change From <blank>
Change to Time Code <blank>
Change to Hour Type <blank>

The employee is scheduled from 9:00 to 18:00 with a MEAL from 12:00 to 13:00 and a BRK from 15:00 to 15:15. The employee records an ON clock at 8:59 and a TRN time code clock at 14:30. At the conclusion of their shift, the employee records an OFF clock at 18:02 and indicates that they did not receive their scheduled meal.

The employee had these work details before the rule was applied:

Start Time End Time Time Code Hour Type Department
08:59 12:00 WRK REG Dept A
12:00 13:00 MEAL UNPAID Dept A
13:00 14:30 WRK REG Dept A
14:30 15:00 TRN REG Dept A
15:00 15:15 BRK UNPAID Dept A
15:15 18:02 TRN REG Dept A

After the rule is applied, the employee has these work details:

Start Time End Time Time Code Hour Type Department
08:59 14:30 WRK REG Dept A
14:30 18:02 TRN REG Dept A

Example: Replace breaks by adjacent details, split shift, reset based on reset codes

In this example, the look period for each segment is determined based on the presence or absence of the reset code definitions (Reset Type = Reset Codes). As a result, if the employee is scheduled to a split shift, the gap between the shifts is used to determine whether the employee's breaks are replaced.

Parameters:

Parameter Value
Change From <blank>
Change to Time Code <blank>
Change to Hour Type <blank>
Reset Type Reset Codes
Reset Description GAP=120

The employee is scheduled from 6:00 to 17:00 with a MEAL from 11:00 to 12:00 and from 18:00 to 22:00 with a MEAL from 20:00 to 20:30. The employee records an ON clock at 6:00. At the conclusion of their first shift, the employee records an OFF clock at 17:00 and confirms that they received their scheduled meal. The employee records another ON clock at 18:00. At the conclusion of their second shift, the employee records an OFF clock at 22:00 and indicates that they did not receive their scheduled meal.

The employee had these work details before the rule was applied:

Start Time End Time Time Code Hour Type Department
06:00 11:00 WRK REG Dept A
11:00 12:00 MEAL UNPAID Dept A
12:00 17:00 WRK REG Dept A
17:00 18:00 GAP UNPAID Dept A
18:00 20:00 WRK REG Dept A
20:00 20:30 MEAL UNPAID Dept A
20:30 22:00 WRK REG Dept A

Since the employee does not have a sufficient gap between their shifts, the meal break in the employee's first shift is replaced regardless of the value of the MEAL token.

After the rule is applied, the employee has these work details:

Start Time End Time Time Code Hour Type Department
06:00 17:00 WRK REG Dept A
17:00 18:00 GAP UNPAID Dept A
18:00 22:00 WRK REG Dept A

Example: Replace breaks by adjacent details, split shift, reset based on previous off clock

In this example, the look period for each segment is limited to each occurrence of an OFF clock with a MEAL clock token (Reset Type = Previous Off Clock). As a result, the value of the MEAL token determines whether the employee's breaks are replaced.

Parameters:

Parameter Value
Change From <blank>
Change to Time Code <blank>
Change to Hour Type <blank>
Reset Type Previous Off Clock
Reset Description GAP=120

The employee is scheduled from 6:00 to 17:00 with a MEAL from 11:00 to 12:00 and from 18:00 to 22:00 with a MEAL from 20:00 to 20:30. The employee records an ON clock at 6:00. At the conclusion of their first shift, the employee records an OFF clock at 17:00 and confirms that they received their scheduled meal. The employee records another ON clock at 18:00. At the conclusion of their second shift, the employee records an OFF clock at 22:00 and indicates that they did not receive their scheduled meal.

The employee had these work details before the rule was applied:

Start Time End Time Time Code Hour Type Department
06:00 11:00 WRK REG Dept A
11:00 12:00 MEAL UNPAID Dept A
12:00 17:00 WRK REG Dept A
17:00 18:00 GAP UNPAID Dept A
18:00 20:00 WRK REG Dept A
20:00 20:30 MEAL UNPAID Dept A
20:30 22:00 WRK REG Dept A

Since the value of the MEAL token determines whether the employee's breaks are replaced, only the meal break in the employee's second shift is replaced.

After the rule is applied, the employee has these work details:

Start Time End Time Time Code Hour Type Department
06:00 11:00 WRK REG Dept A
11:00 12:00 MEAL UNPAID Dept A
12:00 17:00 WRK REG Dept A
17:00 18:00 GAP UNPAID Dept A
18:00 22:00 WRK REG Dept A