Implementation details

Customers implementing this callout create an implementation of the service LaborMetricsShiftCalloutService. This implementation defines the custom logic for updating values in the shift summary or shift details when editing shifts. The bean ID for this custom service implementation is specified in the LABOR_METRICS_SHIFT_SVC registry parameter.

See LABOR_METRICS_SHIFT_SVC.

Implementations of this callout receive a list of layered shifts as inputs when users perform transactions that trigger the callout. Each layered shift includes information from the shift summary, shift detail layers, rotation information when applicable, and the MVS action that created or edited the shift. Implementations of this callout can perform these actions on the input shifts:

  • Set labor metric, flag, and UDF values for fields in the shift summary or shift details.
  • Set activities for shift details.
  • Merge or split shift details.
  • Move break details to another time within the working times of the shift.
  • Access values for visible and hidden fields in the shift summary or shift details, such as shift date, assigned employee, and team.
  • Access the MVS action that the user performed to create or edit the shift.
  • Access the associated rotation ID and rotation row ID for shifts created from an MR or OTS.
  • Check employee attributes against fields in the shift summary or shift details.
  • Check team attributes against fields in the shift summary or shift details.
  • Access data in custom tables for custom processing logic.
Note: The Shift Edit callout hook implementation must be idempotent. This means that it has no additional effect if it is called more than once with the same input parameters. Non-idempotent implementations can cause side effects and are not supported.

Layered shifts

A layered shift contains details arranged into layers that can overlap.

For example, consider a shift from 9:00 AM to 5:00 PM with a break at 12:00 PM to 12:30 PM.

In the layered representation, the shift has two details:

  • Work 9:00 AM to 5:00 PM
  • Break 12:00 PM to 12:30 PM

All shift transactions that invoke the callout use the layered representation.

Transaction list

This table lists the shift transactions and provides details on when the callout is invoked:

Transaction Notes
ASV - Simple edit mode - Ad-hoc shift creation
ASV/STC - New Ad-Hoc button
ASV - Detail edit mode - Ad-hoc shift creation Invoked for relief shift creation and for assigning separately
ASV - Detail edit mode - Add shift button
ASV - Delete shift
ASV - Mass edit - Copy Invoked for relief shift creation and for assigning separately
ASV - Detail edit - Copy Invoked for relief shift creation and for assigning separately
ASV - Mass edit - Duplicate schedule Invoked for relief shift creation and for assigning separately
Assign
Unassign Callout is not invoked
ASV/STC - Detail edit / Mass shift edit / Lengthen / Shorten / End shift / Change position
Book-off - relief shift creation
Book-off - applying time off to the original shift Callout is not invoked
Cancel book-off Callout is not invoked
ASV - Swap shifts Invoked for relief shift creation and assigning for both shifts
ASV - Revert swap Callout is not invoked
RCA-ECP - Shift tab
Float - Creating 'Float to' shift Invoked for relief shift creation and for assigning separately
Float - Modifying 'Float from' shift
Float - Modifying 'Float to' shift
MR/OTS - Process rotation