Contract Shift Swap
The Contract Shift Swap workflow eliminates required manual intervention by swapping the contract shift when employees use Employee Self-Service to swap a scheduled shift.
Employees can have two shifts in the Schedule Planner:
-
Scheduled Shift — This is the actual shift that the employee works.
-
Contract Shift — This is the theoretical shift, based on the employee's work contract and governed by a contract schedule in the employee's Employment Terms. Organizations that follow this concept typically have dedicated employment terms for each employee. It is common practice that the scheduled shift is inherited from the contract schedule; however, it is not a requirement.
The standard shift swap functionality in UKG Pro Workforce Management allows the exchange of a scheduled shift between two employees. When the scheduled shift is inherited from a contract schedule, the contract shift is not part of the swap, and remains in place. As a result, overtime calculations that are dependent upon the contract shift amount can be incorrect.
This workflow extension, which is hooked into the Shift Swap Framework, initiates three actions upon request approval:
-
Swaps the contract shift defined in the employment term.
-
(Optional) Swaps the scheduled pay code, in the contract or scheduled shift.
-
(Optional) Swaps the schedule tag in the schedule.
Configuring the optional actions allows organizations to continue calculating overtime using paycodes that define overtime thresholds or schedule tags.
Business process conditions that must be met for the workflow to produce expected results include:
-
Individual employment terms must be assigned to each employee.
-
Employee Self-Service must be used to initiate the workflow.
-
The business process must be attached to a workflow notification in order to initiate the workflow.
-
The workflow supports swapping one scheduled and one contract shift for a day. When multiple shifts exist on the same day, the workflow swaps only the first scheduled shift and first contract shift.
User experience
User experience 1 — Contract schedule shift
An organization uses the contract schedule shift to define the work hours definition used for overtime calculation. The Schedule Planner contains scheduled and contract shifts for each employee.
Two employees swap their shifts using Employee Self-Service: Upon approval, both the contract and scheduled shifts are exchanged during the swap.
User experience 2 — Contract paycode
An organization uses a contract schedule paycode with a specific amount to define the work hours definition used for overtime calculation.
Two employees swap their shifts using Employee Self-Service: Upon approval, the scheduled shift and the contract schedule paycodes are exchanged during the swap.
User experience 3 — Schedule Tag
An organization uses a schedule tag to control how overtime is calculated for certain shifts.
Two employees swap their shifts using Employee Self-Service: Upon approval, the scheduled shifts and schedule tags are exchanged during the swap.
User experience 4 — Schedule Paycode
An organization uses a schedule paycode on a particular day to initiate a different calculation, such as a specific overtime rule.
Two employees swap their shifts using Employee Self-Service: Upon approval, the scheduled shifts and schedule paycode are exchanged during the swap.
UKG Pro Workforce Management configurations
-
Comments: Create a comment, such as Adjusted by Contract Shift Swap, to add to the contract shift or paycode indicating the swap. See the Comments topic.
-
Workflow notifications: Create generic workflow notifications to notify employees and managers of contract shift swap status. See the Configure Notifications for Business Processes topic.
Examples:
-
Swap Request Status - Receiving Employee When the manager or receiving employee accepts the shift swap request, the requesting employee is notified with a workflow notification. This notification initiates the business process.
-
Name: Swap Request Status - Receiving Employee
-
Select Recipient List will be supplied at runtime.
-
Subject: <Swap Request Status> Swap request from <Requesting Employee> to <Request Recipient>
-
Long Message:
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>
-
Control center fields:
Control center fields
Field
Label
Value
1
Message
<Swap Request Status> Swap request from <Requesting Employee> to <Request Recipient>
2
Requested Shift
<Received Date> <Received Start Time> - <Received End Time>
3
Offered Shift
<Offered Date> <Offered Start Time> - <Offered End Time>
4
Job
<Offered Location>
5
Offered To
<Request Recipient>
-
Select Trigger Business Process.
-
Template: ShiftSwapFramework_v1
-
Business Process will run as: System User
-
-
Swap Request Status - Manager- Workrule Override Error
-
Name: Swap Request Status - Manager- Workrule Override Error
-
Select Send to employee's manager and Recipient List will be supplied at runtime.
-
Subject: Error: Swap request with Workrule override
-
Long Message:
Swap request from <Requesting Employee> to <Request Recipient>
Status: <Swap Request Status>
Offered Shift: <offeredDate> <offeredStartTime> - <offeredEndTime>
Requested Shift: <receivedDate> <receivedStartTime> - <receivedEndTime>
Please contact system administrator.
Error occurred with workrule override
<apiError>
-
Control Center Fields:
Control center fields
Field
Label
Value
1
Error
Error occurred while workrule override.<apiError>
2
Requested Shift
<Received Date> <Received Start Time> - <Received End Time>
3
Offered Shift
<Offered Date> <Offered Start Time> - <Offered End Time>
4
Request
Swap request from <Requesting Employee> to <Request Recipient>
5
Status
<Swap Request Status>
-
Select Do not suppress duplicates.
-
-
Swap Request Status - Requesting Employee
-
Name: Swap Request Status - Requesting Employee
-
Select Recipient List will be supplied at runtime.
-
Subject: <Swap Request Status> Swap request from <Requesting Employee> to <Request Recipient>
-
Long Message:
Offered Date: <Offered Date>
Offered Shift: <Offered Start Time> - <Offered End Time>
Offered by: <Requesting Employee>
Offered to: <Request Recipient>
Status: <Swap Request Status>
-
Control Center Fields:
Control center fields
Field
Label
Value
1
Shift Date
<Offered Date>
2
Shift
<Offered Start Time> - <Offered End Time>
3
Job
<Offered Location>
4
Offered To
<Request Recipient>
-
Select Do not suppress duplicates.
-
-
Swap Request Status - Manager for Approval
-
Name: Swap Request Status - Manager for Approval
-
Select Recipient List will be supplied at runtime.
-
Subject: <Swap Request Status> Swap request with Workrule override
-
Long Message:
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>
-
Short Message:
From <Requesting Employee> to <Request Recipient>
<Swap Request Status>
-
Control Center Fields:
Control center fields
Field
Label
Value
1
Message
<Swap Request Status> Swap request from <Requesting Employee> to <Request Recipient>
2
Requested Shift
<Received Date> <Received Start Time> - <Received End Time>
3
Offered Shift
<Offered Date> <Offered Start Time> - <Offered End Time>
4
Job
<Offered Location>
-
Select Do not suppress duplicates.
-
-
-
Control center notification mappings: Create control center notification mappings for workflow notifications that support contract shift swaps. During configuration, select Scheduler, Shift Swap, and Schedule from Domain, Event Type, and Navigation Page. See the Control Center Notification Mapping topic.
Example Event Name and Notification values include:
- Swap Request Status - Receiving Employee
- Swap Request Status - Requesting Employee
- Swap Request Status - Manager for Approval
-
Request subtype: Create a new, or edit an existing, swap request subtype to initiate the Contract Shift Swap business process. See the Configure Request Subtypes topic.
Example Notification selections include:
-
Employee (Requester) Notification: Swap Request Status - Requesting Employee
-
Employee (Recipient) Notification: Swap Request Status - Receiving Employee
-
Manager Notification: Swap Request Status - Manager for Approval
-
Configure the Contract Shift Swap business process
-
Migrate the business process model to the tenant
-
Log in to the appropriate tenant.
-
Go to Main Menu > Administration > Setup Data Manager.
-
Select the Source tenant where the Process Model resides, and select the template to copy. It is a .zip file. A message appears in the Source column: Source: Import from <filename>.zip.
-
Click Tap Review and Publish. The Publish Summary panel appears.
-
Review the Publish Summary panel. It lists the items that were extracted from the migration file. If you approve, click tap Publish with Comment or just Publish.
-
Click Tap Go to Publish History at the bottom of the panel to view the status of the data transfer. The Publish History page contains a table that lists the items you have published. If there were errors during the transfer, the button under the Errors column for that row is black.
-
To view details, click tap the appropriate row and click tap View Selected.
-
On the History for publish run page, click tap Show all to view the setup data that you published, and the errors that occurred, if any, listed by item type and name.
-
-
Configure the Contract Shift Swap decision tables.
-
Go to Main Menu > Administration > Application Setup > Business Process setup > Process Models.
-
Select the ShiftSwapFramework_v1 process and click Edit. The process model enters edit mode.
-
Select the Decision Tables tab.
-
Click Everyone's, and then select the decision table to edit.
-
Click Decision Table Editor to add or update the rows in the table.
-
Click Save and close.
-
ShiftSwapFramework_Variables
The ShiftSwapFramework_Variables decision table holds process parameters for all sub-processes supported by the Shift Swap framework. Each sub-process is individually enabled within this decision table. Parameters specific to the Contract Shift Swap sub-process are identified in the following table:
Shift Swap Framework Variables decision table - Contract Shift Swap parameters
Shift Swap Framework Variables decision table - Contract Shift Swap parameters
Parameter name
Description
Default value
EnableShiftWorkRuleOverride
Enables the Shift Work Rule Override sub-process.
Yes
EnableContractShiftSwap
Enables the Contract Shift Swap sub-process.
When set to Yes, EnableShiftWorkRuleOverride must also be set to Yes.
Yes
ContractShiftSwapComment
Comment, such as Adjusted by Contract Shift Swap, added to paycode edit by the process.
The value is mandatory and must not match the value in ShiftWorkRuleOverrideComment.
-
ShiftSwapFramework_ContractShiftSwap_ConfigParameters
Organizations that configure overtime by using paycodes or schedule tags can use the ShiftSwapFramework_ContractShiftSwap_ConfigParameters decision table to define the qualifying paycodes and schedule tags that must be swapped by the workflow. Only items that need to be swapped are listed in the table.
When it is not necessary to move paycodes or schedule tags, create a single row in the table. Set the Serial Number equal to 1 and leave the remaining columns blank.
Shift Swap Framework — Contract Shift Swap Config Parameters decision table
Shift Swap Framework — Contract Shift Swap Config Parameters decision table
Variable name
Description
Serial Number
Sequential identifier used by the workflow logic to stop scanning when a match is found.
Move Paycode Edits
Identifies paycodes that must be swapped.
Each row must contain a single value.
When the table contains more schedule tags than paycodes, enter "NULL" in each blank cell.
Move Schedule Tags
Identifies schedule tags that must be swapped.
Each row must contain a single value.
When the table contains more paycodes than schedule tags, enter "NULL" in each blank cell.
Note:-
Values entered in the decision tables are case-sensitive, and must match configured values in UKG Pro Workforce Management.
-
Do not remove variables, variable names, or variable types from any decision table.
-
-
-
Deploy the updated business process modelNote: Process models must be redeployed every time changes are made to an existing model. Re-deployment is not required for decision table changes.
-
Go to Main Menu > Administration > Application Setup > Business Process Setup > Process Models.
-
Select the ShiftSwapFramework_v1 model.
-
Click Tap Edit, and then configure the required parameters and deployment dates. Select Notifications Templates from the Template Categories list.
-
Click Tap Save, and then select Return to deploy.
Note: After the process is deployed, attach the process to the workflow notification configured in the request subtype.
-
APIs
API Title |
URI |
Method |
Description |
---|---|---|---|
/v1/scheduling/employment_terms_schedule/multi_read |
POST |
Returns the employment terms, group shifts, group paycode edits and memberships according to the specified parameters: employee, Hyperfind, location, or schedule employment term. | |
/v1/scheduling/schedule/groups/shifts/apply_update |
POST |
Updates multiple group shifts at Employment Terms level. | |
/v1/scheduling/employment_terms_schedule/pay_code_edits/apply_delete |
POST |
Deletes multiple paycode edits for an employment term based on the paycode edit ID. | |
/v1/scheduling/employment_terms_schedule/pay_code_edits/apply_create |
POST |
Creates a paycode edit for the mentioned employee for a given date – time per employment term. | |
/v1/scheduling/schedule/multi_read |
POST |
Returns the details of Shifts, Schedule Tags, Paycode Edits for the specified employee. | |
/v1/scheduling/schedule/schedule_tags/multi_update |
POST |
Updates the details of Schedule Tags specified in the employee’s schedule shift. | |
/v1/scheduling/schedule/pay_code_edits/multi_delete |
POST |
Delete a paycode edit for the specified employee for a given date and time based on the paycode edit ID. | |
/v1/scheduling/schedule/pay_code_edits/multi_create |
POST |
Creates a paycode edit for the specified employee for a given date and time. |