Contract Shift Swap
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.
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 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.
- Comments Create a comment to add to the contract shift or paycode indicating the swap. See the Comments topic.
Go to Main Menu > Administration > Application Setup > Common Setup > Comments.
Click Tap New.
Enter Comment Text, such as Adjusted by Contract Shift Swap.
In the Categories area, select Pay Codes and Shifts from the Available Categories box and move them to the Selected Categories box.
Click Tap Save.
- Workflow notifications Create workflow notifications to notify employees and managers of contract shift swap status. See the Configure Notifications for Business Processes topic.
Go to Application Setup > Event/Notification > Workflow Notifications.
Click Tap New.
From the Notification Type, select Generic notification and click tap Ok.
(Optional) Give the notification a Description.
Complete the remaining fields, as appropriate.
Click Tap Save.
- Repeat the same steps to create each applicable workflow notification for the Contract Shift Swap business process.
- Swap Request Status - Receiving EmployeeWhen 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.
Enter an appropriate Name, such as Swap Request Status - Receiving Employee.
Select Recipient List will be supplied at runtime.
Enter an appropriate Subject, such as <Swap Request Status> Swap request from <Requesting Employee> to <Request Recipient>.
Enter an appropriate Long Message, such as:
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: 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.
From Template, select ShiftSwapFramework_v1
From Business Process will run as, select System User.
- Swap Request Status - Manager- Workrule Override Error
Enter an appropriate Name, such as Swap Request Status - Manager- Workrule Override Error.
Select Send to employee's manager and Recipient List will be supplied at runtime.
Enter an appropriate Subject, such as Error: Swap request with Workrule override.
Enter an appropriate Long Message, such as:
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: 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
Enter an appropriate Name, such as Swap Request Status - Requesting Employee.
Select Recipient List will be supplied at runtime.
Enter an appropriate Subject, such as <Swap Request Status> Swap request from <Requesting Employee> to <Request Recipient>.
Enter an appropriate Long Message, such as:
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: 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
Enter an appropriate Name, such as Swap Request Status - Manager for Approval.
Select Recipient List will be supplied at runtime.
Enter an appropriate Subject, such as <Swap Request Status> Swap request with Workrule override.
Enter an appropriate Long Message, such as:
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>
Enter an appropriate Short Message, such as:
From <Requesting Employee> to <Request Recipient>
<Swap Request Status>
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; see the Control Center Notification Mapping topic.
- From the Main Menu, go to Application Setup > Event/Notification > Control Center Notification Mapping.
- Click Tap New.
- Enter an Event Name, such as:
- Swap Request Status - Receiving Employee
- Swap Request Status - Requesting Employee
- Swap Request Status - Manager for Approval
- From Domain, select Scheduler.
- From Event Type, select Shift Swap.
- From Notification, select the appropriate value, such as:
- Swap Request Status - Receiving Employee
- Swap Request Status - Requesting Employee
- Swap Request Status - Manager for Approval
- From Navigation Page, select Schedule.
- From Icon, select an appropriate property.
- Click Tap Save.
- Request Subtype Configure the request subtype to initiate the business process.
Note: See the Configure Request Subtypes topic.
Go to Application Setup > Employee Self Service > Request Subtype.
Edit an existing Swap Request Subtype, or create a new Swap Request Subtype for use with Contract Shift Swap.
From Request Type, select Swap.
From Employee (Requester) Notification, select an option such as Swap Request Status - Requesting Employee.
From Employee (Recipient) Notification, select an option such as Swap Request Status - Receiving Employee.
From Manager Notification, select an option such as Swap Request Status - Manager for Approval.
Configure remaining fields as needed.
Click Tap Save.
- 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 decision tables 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.
- Edit the decision table: 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 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.
- Edit the decision table: 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 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 model
Note: 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.
API Title |
URI |
Method |
Description |
---|---|---|---|
Retrieve Employee Employment Terms |
/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. |
Update Group Shifts |
/v1/scheduling/schedule/groups/shifts/apply_update |
POST |
Updates multiple group shifts at Employment Terms level. |
Delete Employment Terms PCEs |
/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. |
Create Employment Terms PCEs |
/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. |
Retrieve Schedule |
/v1/scheduling/schedule/multi_read |
POST |
Returns the details of Shifts, Schedule Tags, Paycode Edits for the specified employee. |
Update Schedule Tags |
/v1/scheduling/schedule/schedule_tags/multi_update |
POST |
Updates the details of Schedule Tags specified in the employee’s schedule shift. |
Delete Pay code Edits by ID |
/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. |
Create Pay code Edits |
/v1/scheduling/schedule/pay_code_edits/multi_create |
POST |
Creates a paycode edit for the specified employee for a given date and time. |