Shift Swap Work Rule Override
Note: This business process is an extension model that is developed outside the normal release schedule to meet specific customer needs. To request one of these models, you must submit a Salesforce Service Request to UKG. After the model is delivered to your tenant, you can edit it to meet your needs.
Employees can swap their scheduled shifts by way of employee self-service (ESS), and those shifts may be calculated differently from normal worked shifts. The Shift Swap Work Rule Override overrides the default work rule for the swapped shift with a more restricted work rule. This work-rule transfer can remove overtime, shift premiums, bonuses, or other items. Example: The resulting work-rule transfer override can remove premiums or bonuses.
Configure the following workflow notifications.
Caution: Do not reuse the workflow notification that is assigned to the Employee (Recipient) Notification in the request subtype for other options in that same subtype. Example: Employee (Requestor) Notification or Approval Setting and Employee Notification upon Final Approval.
Note: For details about notifications, see the Configure Notifications for Business Processes topic.
- Swap Request Status — Receiving Employee
- Click Tap Main Menu
> Administration > Application Setup > Event/Notification > Workflow Notifications. - Click Tap New.
- From Select Notification Type, select Generic Notification. Click Tap OK.
- In Name, enter Swap Request Status - Receiving Employee.
- (Optional) Enter a Description.
- In Recipients, select Recipient List will be Supplied at Runtime.
- In Subject, enter <Swap Request Status> Swap request from <Requesting Employee> to <Request Recipient>.
- In Long Message, enter the following:
Offered Shift: <Offered Date> <Offered Start Time> - <Offered End Time>
Requested Shift: <Received Date> <Received Start Time> - <Received End Time>
Offered by: <Requesting Employee>
Offered to: <Request Recipient>
Status: <Swap Request Status>
- (Optional) Enter a Short Message.
- In Control Center Fields, enter a Label and Value for the following fields:
Control Center fields Field Label Value Field 1 Message <Swap Request Status> Swap request from <Requesting Employee> to <Request Recipient> Field 2 Requested Shift <Received Date> <Received Start Time> - <Received End Time> Field 3 Offered Shift <Offered Date> <Offered Start Time> - <Offered End Time> Field 4 Job <Offered Location> Field 5 Offered To <Request Recipient> - Select Trigger Business Process.
- From Template, select Shift Swap Workrule.
- Do not select Trigger Business Process Template Only.
- In Business Process will Run as, select System User to send the notification from the system account.
- Click Tap Save.
- Click Tap Main Menu
- Swap Request Status — Manager — Workrule Override Error
- Click Tap Main Menu
> Administration > Application Setup > Event/Notification > Workflow Notifications. - Click Tap New.
- From Select Notification Type, select Generic Notification. Click Tap OK.
- In Name, enter Swap Request Status - Manager - Workrule Override Error.
- (Optional) Enter a Description.
- In Recipients, select Send to employee's manager and Recipient List will be Supplied at Runtime.
- In Subject, enter <Error: Swap Request with Workrule Override.
- In Long Message, enter the following:
Swap request from <requestingEmployee> to <requestRecipient>
Status: <swapRequestStatus>
Offered Shift: <offeredDate> <offeredStartTime> - <offeredEndTime>
Requested Shift: <receivedDate> <receivedStartTime> - <receivedEndTime>
Contact system support.
Error occurred in workrule override
<apiError>
- (Optional) Enter a Short Message.
- In Control Center Fields, enter a Label and Value for the following fields:
Control Center fields Field Label Value Field 1 Error Error occurred in workrule override. <apiError> Field 2 Requested Shift <receivedDate> <receivedStartTime> - <receivedEndTime> Field 3 Offered Shift <offeredDate> <offeredStartTime> - <offeredEndTime> Field 4 Request Swap request from <requestingEmployee> to <requestRecipient> Field 5 Status <swapRequestStatus> - In Suppress Duplicate Alerts, select Do not suppress duplicates.
- Click Tap Save.
- Click Tap Main Menu
- Swap Request Status — Requesting Employee
- Click Tap Main Menu
> Administration > Application Setup > Event/Notification > Workflow Notifications. - Click Tap New.
- From Select Notification Type, select Generic Notification. Click Tap OK.
- In Name, enter Swap Request Status - Requesting Employee.
- (Optional) Enter a Description.
- In Recipients, select Recipient List will be Supplied at Runtime.
- In Subject, enter <Swap Request Status> Swap request from <Requesting Employee> to <Request Recipient>.
- In Long Message, enter the following:
Offered Date: <Offered Date>
Offered Shift: <Offered Start Time> - <Offered End Time>
Offered by: <Requesting Employee>
Offered to: <Request Recipient>
Status: <Swap Request Status>
- (Optional) Enter a Short Message.
- In Control Center Fields, enter a Label and Value for the following fields:
Control Center fields Field Label Value Field 1 Shift Date <Offered Date> Field 2 Shift <Offered Start Time> - <Offered End Time> Field 3 Job <Offered Location> Field 4 Offered To <Request Recipient> - In Suppress Duplicate Alerts, select Do not suppress duplicates.
- Click Tap Save.
- Click Tap Main Menu
- Swap Request Status — Manager for Approval
- Click Tap Main Menu
> Administration > Application Setup > Event/Notification > Workflow Notifications. - Click Tap New.
- From Select Notification Type, select Generic Notification. Click Tap OK.
- In Name, enter Swap Request Status - Manager for Approval.
- (Optional) Enter a Description.
- In Recipients, select Recipient List will be Supplied at Runtime.
- In Subject, enter <Swap Request Status> Swap Request with Workrule Override.
- In Long Message, enter the following:
Offered Shift: <Offered Date> <Offered Start Time> - <Offered End Time>
<Document Title>
Requested Shift: <Received Date> <Received Start Time> - <Received End Time>
Offered by: <Requesting Employee>
Offered to: <Request Recipient>
Status: <Swap Request Status>
- In Short Message, enter the following:
From <Requesting Employee> to <Request Recipient>
<Swap Request Status>
- In Control Center Fields, enter a Label and Value for the following fields:
Control Center fields Field Label Value Field 1 Message <Swap Request Status> Swap request from <Requesting Employee> to <Request Recipient> Field 2 Requested Shift <Received Date> <Received Start Time> - <Received End Time> Field 3 Offered Shift <Offered Date> <Offered Start Time> - <Offered End Time> Field 4 Job <Offered Location> Field 5 Offered To <Request Recipient> - In Suppress Duplicate Alerts, select Do not suppress duplicates.
- Click Tap Save.
- Click Tap Main Menu
- Map notifications in the Control Center
Note: For details about notification mappings, see the Control Center Notification Mapping topic.
- Click Tap Main Menu
> Administration > Application Setup > Event/Notification > Control Center Notification Mapping. - Configure the following mappings:
- Swap Request Status — Receiving Employee
- Click Tap Create.
- In Event Name, enter Swap Request Status — Receiving Employee.
- In Domain, select Scheduler.
- In Event Type, select Shift Swap.
- In Notification, select Swap Request Status — Receiving Employee.
- In Navigation Page, select Schedule.
- Select an Icon.
- Click Tap Save.
- Swap Request Status — Requesting Employee
- Click Tap Create.
- In Event Name, enter Swap Request Status — Requesting Employee.
- In Domain, select Scheduler.
- In Event Type, select Shift Swap.
- In Notification, select Swap Request Status — Requesting Employee.
- In Navigation Page, select Schedule.
- Select an Icon.
- Click Tap Save.
- Swap Request Status — Manager for Approval
- Click Tap Create.
- In Event Name, enter Swap Request Status — Manager for Approval.
- In Domain, select Scheduler.
- In Event Type, select Shift Swap.
- In Notification, select Swap Request Status — Manager for Approval.
- In Navigation Page, select Schedule.
- Select an Icon.
- Click Tap Save.
- Swap Request Status — Receiving Employee
Note: The Swap Request Status — Manager — Workrule Override Error notification does not require mapping to the Control Center.
- Click Tap Main Menu
- Configure comments
Create a comment that is exclusive to this business process and is in the shift category. Normally, managers do not add or edit comments that the process uses to update the shifts.
Note: For details, see the Comments topic.
- Click Tap Main Menu
> Administration > Application Setup > Common Setup > Comments. - Click Tap New.
- In Comment Text, enter shiftswap.
- Leave Code Number blank.
- Do not select Inactive.
- From Available Categories, select Shifts. Click Tap the right arrow
to move Shifts to Selected Categories. - Click Tap Save & Return.
- Click Tap Main Menu
- Configure the request subtype
- Click Tap Main Menu
> Administration > Application Setup > Employee Self Service > Request Subtypes. - Click Tap New.
- In Name, enter Request Shift Swap Needs Approval.
- (Optional) Enter a Description.
- (Optional) Enter a Symbol. A symbol is an abbreviation to be displayed in the workspace; it does not have to be unique and can be up to five characters long.
- In Request Type, select Swap.
- (Optional) Enter a Priority order in which to list the subtypes.
- Highest priority = 1.
- If you don't define the priority order, the subtypes are listed alphanumerically.
- Select notifications
- In Employee (Requester) Notification, select Swap Request Status - Requesting Employee.
- In Employee (Recipient) Notification, select Swap Request Status - Receiving Employee.
- In Manager Notification, select Swap Request Status - Manager for Approval.
- Do not select Automatic Approval so that the manager must approve or reject requests manually.
- Select Allow Swap if Managers are Different to allow employees who have different managers to swap shifts.
- Select Allow Swap With Unposted Shifts to allow employees to swap for shifts that are in a schedule that is not posted.
- Do not select Apply Employee Visibility Period Hyperfind Filtering.
- In Minimum Rule Severity to Validate, select Not Considered so that requests that violate rules of any severity level are submitted.
- Do not select Enable Recommendations, Approval Settings, Reminder Template, Automatic Action Template, or Request Purpose.
- Click Tap Save & Return.
- Click Tap Main Menu
Note: The process for configuring and deploying this and any other Business Process Extension is the same as all Business Process models.
- Select Main Menu
> Administration > Application Setup > Business Processes > Process Models. - Select the Shift Swap Workrule Override process model and click tap Edit
. - Click Tap Visual Editor .
Main process of the Shift Swap WorkRule Override business process model
- Select Initialize Variables.
- In the Initialize Variables - Initialize Variables area > Initialize Variables, click tap 25 fields.
- For each of the following variables, edit the Variable name, Variable type, and Value:
Caution: All parameters are case sensitive and must match the configuration exactly.
Initialized Variables Variable name Variable type Value Description Notes Admin String SERVICES-LEVEL1 Initiator type User defined commentName String shiftswap Comment to enable re-runs User defined commentNote String This is Shift Swap Workrule Override Note which serves as a prefix in comments User defined errorNotificationName String Swap Request Status - Manager- Workrule Override Error Notification name that is initiated by an error User defined offeredDate String ${SwapOfferedShiftDate} The date of the offered shift Variable from the workflow notification offeredEndTime String ${SwapOfferedShiftEndTime} The end time of the offered shift Variable from the workflow notification offeredStartTime String ${SwapOfferedShiftStartTime} The start time of the offered shift Variable from the workflow notification receivedDate String ${SwapReceivedShiftDate} The date of the received shift Variable from the workflow notification receivedEndTime String ${SwapReceivedShiftEndTime} The end time of the received shift Variable from the workflow notification receivedStartTime String ${SwapReceivedShiftStartTime} The start time of the received shift Variable from the workflow notification requestId String ${notificationItemId} ID of the shift swap request Variable from the workflow notification requestingEmployee String ${SwapRequester_1} Name of the requesting employee Variable from the workflow notification requestingEmployee String ${EmployeePersonNumber} ID of the requesting employee Variable from the workflow notification requestRecipient String ${SwapRequestRecipient} Name of the recipient employee Variable from the workflow notification swapRequestStatus String ${SwapRequestStatusID_1} Status of the request Variable from the workflow notification dt_InputWorkrule String — Decision table input variable For internal use dt_OutputWorkrule String — Decision table output variable For internal use isInvalidWorkruleAvailable String — - Yes = All work rules are available in the decision table
- No = Work rules are not available.
For internal use notificationId String — Notification ID For internal use offeredShiftId String — ID for the offered shift For internal use offeredShiftresp String — Details about the offered shift For internal use outputWorkruleCollection String — Collection of work rules from the decision table For internal use requestedShiftId String — ID of the requested shift For internal use requestedShiftresp String — Details about the requested shift For internal use shiftUpdatePayload String — Request for the multi-shift update API For internal use - Click Tap Save after you edit each variable.
- Configure the work rule decision table
Update the decision table with the work rule and the replacement work rule when a new work rule is added to the application.
- In the main process, select the Work Rule Decision Table task.
- In Work Rule Decision Table - Decision task > Reference decision table, select Shift Swap Workrule Override_DecisionTable.
- In Decision table reference - Shift Swap Workrule Override_DecisionTable, leave Shift Swap Workrule Override_DecisionTable selected. Click Tap Open.
- Add or update rows as needed.Caution:
- Do not edit or remove the (!= empty) row of the decision table because it must always be last row in the table. The output must be #notFound.
- Enter the correct name of the work rules in the input and output columns.
- All parameters (work rules) are case sensitive and must match the configuration exactly.
- Click Tap Save the Model .
- Verify the settings.
- Click Tap Save.
- Deploy the business process model
You must re-deploy business process models every time you change an existing model. Deploy only the main process because the sub-processes are deployed automatically with the main process.
Note: For details, see the Deploy Business Process Models topic.
- Select the Shift Swap Workrule Override process model and click tap Deploy
. - In Business Process, configure the following:
- In Description, enter This process removes shift premiums by way of a work rule override when employees apply shift swap from ESS.
- In Display Name, enter Shift Swap Workrule Override v1.
- In Template Categories, select Notification Templates.
- In Start Effective, select the effective start date.
- In End Effective, select Forever to make the Business Process available indefinitely.
- In Status, select Active.
- In Action List, select Hide.
- In Tile List, select Hide.
- In GoTo List, select Hide.
- Click Save, then click Return.
- The Business Processes page lists the deployed processes. Click Tap Refresh.
- Select the Shift Swap Workrule Override process model and click tap Deploy
- Assign the deployed business process model to a Workflow Notification
- Click Tap Main Menu
> Administration > Application Setup > Event/Notification > Workflow Notifications. - Click Tap New.
- From Select Notification Type, select Generic Notification. Click Tap OK.
- In Name, enter Swap Request Status - Receiving Employee.
- (Optional) In Description, enter Swap Request Status - Receiving Employee.
- In Priority, select High.
- In Subject, enter <Swap Request Status> Swap request from <Requesting Employee> to <Request Recipient>.
- In Long Message, enter the following:
Offered Shift: <Offered Date> <Offered Start Time> - <Offered End Time>
Requested Shift: <Received Date> <Received Start Time> - <Received End Time>
Offered by: <Requesting Employee>
Offered to: <Request Recipient>
Status: <Swap Request Status>
- (Optional) Enter a Short Message.
- In Recipients, select Recipient List will be Supplied at Runtime.
- Select Trigger Business Process.
- From Template, select Shift Swap Workrule.
- Do not select Trigger Business Process Template Only.
- In Business Process will Run as, select System User to send the notification from the system account.
- Click Tap Save.
- Click Tap Main Menu
Name | Section | Type | Resource path | Location | Description |
---|---|---|---|---|---|
Retrieve Shift Swap Request by ID as Manager | Scheduling | GET | /v1/scheduling/ma nager_swap/{swap RequestId} | Change Process Initiator & Create URL | Create employee shift and open shift from patterns. |
Retrieve Multiple Shifts | Scheduling | POST | /v1/scheduling/sch edule/shifts/multi_ read | Retrieve Requested Shift & Retrieve Offered Shift | Retrieve multiple shifts that correspond to shift IDs. |
Update Shifts | Scheduling | POST | /v1/scheduling/sch edule/shifts/multi_ update | Update Shifts | Update multiple shifts. |
GenericNotificationNotify API | Kronos APIs | POST | GenericNotificationNotifyAPI | Workrule Validation Error | Send notifications to employees' managers. |