Copy Schedule
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 Copy Schedule business process extension provides a quick and easy way to create future schedules by copying previous schedules assigned to a set of employees.
Customers with limited numbers of employees often create their own schedules because they know what works best for their locations. They need an efficient way within the Schedule Planner to copy schedules, including transfers, for a set of employees from previous (source) to future (target) schedule periods. This business process extension provides that capability.
To use the extension, the manager navigates to the Schedule Planner, selects the date range and employees of the source schedule, and then launches Copy Schedule by way of a GoTo action. Date and employee selections automatically pass as process parameters. Before initiating the process, the manager makes selections from the Copy Schedule panel:
-
Target Schedule
-
Symbolic reference.
-
-
Start Date and End Date
-
When entered, Start and End Date values override the Target Schedule selection.
-
-
Override Existing Schedule
-
Include Comments
-
Include Shift Labels
If the source schedule contains absence paycodes, the process replaces them in the target with the most recently saved shift associated with the employee for that day. For example, if a Sick paycode replaced an employee’s 8:00 AM-4:00 PM shift in the source schedule, the process copies only the 8:00 AM-4:00 PM shift into the target. If a saved shift is not found in the source, nothing is copied to the target.
When an active employee who is selected in the source schedule has a terminated or inactivated status in the target period, the process creates open shifts with the employee's assigned Job in the target period.
-
Hyperfinds used to select the source employees must be limited to 50, or fewer, employees.
-
Date ranges for either the source or target schedules must not exceed 90 days.
-
Start and End Dates for both the source and target schedules must be synchronized. For example, if the dates associated with the source begin on Sunday and end on Saturday, the target dates must also begin and end on Sunday and Saturday, respectively.
-
If selected dates in the source and target schedules overlap, the user is notified with options to:
-
Override the existing schedule; that is, delete the existing schedule and replace it with new shifts.
-
Copy the next schedule to the target.
-
-
If no shift is assigned to an employee on a particular day in the source, no shift will be copied to the corresponding employee and day in the target.
-
All shifts in the source are copied to the target, even if multiple shifts are assigned to an employee on a single day.
-
Only business structure transfers in the source are copied to the target. Work rule, cost center, and labor category transfers are not copied.
-
Absence paycodes, including full and half day, in the source are replaced with the latest saved shift of that day in the target.
-
If an employee is active in the source, but terminated or inactivated in the target period, open shifts are created in the target associated with the employee's job assignment; this may differ from the employee's primary job.
A store manager wants to copy last week's schedule to the following week. The original schedule contains Sick paycodes. It also contains an employee working as a Sales Associate through Day 2 of next week, then retiring on Day 3.
The schedule for the previous week:
EMPLOYEE ID | EMPLOYEE NAME | ORG JOB | DAY 1 | DAY 2 | DAY 3 | DAY 4 | DAY 5 | DAY 6 | DAY 7 |
001-004 | Gibson, Emmy | Sales Associate | 08:00—16:00 | 08:00—16:00 | 08:00—16:00 | 08:00—16:00 | 08:00—16:00 | 09:00—17:00 | |
001-005 | Wooly, John | Sales Associate | 08:00—16:00 | 08:00—16:00 | 08:00—16:00 | 08:00—16:00 | 08:00—16:00 | 09:00—17:00 | |
001-006 | Holmes, Frank | Mechanic | 06:00—12:00 | Sick(06:00—12:00) | Sick(06:00—12:00) | 06:00—12:00 | 06:00—12:00 | ||
001-007 | Abraham, Mike | Mechanic | 12:00—18:00 | 12:00—18:00 | 12:00—18:00 | 12:00—18:00 | 12:00—18:00 |
-
In the Schedule Planner, load the previous schedule, select a set of employees, navigate to the GoTo control, and select Business Processes.
-
Select Copy Schedule from the Business Processes Library.
-
In the Copy Schedule panel, select Next Schedule Period from Target Schedule, and click tap the Copy Schedule button.
After the process completes, return to the Schedule Planner to view the results:
-
Absence pay codes are removed and replaced with original schedules.
-
Open shifts are created for the Sales Associate job, effective on the employee's retirement date.
The schedule for the following week:
EMPLOYEE ID | EMPLOYEE NAME | ORG JOB | DAY 1 | DAY 2 | DAY 3 | DAY 4 | DAY 5 | DAY 6 | DAY 7 |
Open Shift | Sales Associate | 08:00—16:00 | 08:00—16:00 | 08:00—16:00 | 09:00—17:00 | ||||
001-004 | Gibson, Emmy | Sales Associate | 08:00—16:00 | 08:00—16:00 | 08:00—16:00 | 08:00—16:00 | 08:00—16:00 | 09:00—17:00 | |
001-005 | Wooly, John | Sales Associate | 08:00—16:00 | 08:00—16:00 | |||||
001-006 | Holmes, Frank | Mechanic | 06:00—12:00 | 06:00—12:00 | 06:00—12:00 | 06:00—12:00 | 06:00—12:00 | ||
001-007 | Abraham, Mike | Mechanic | 12:00—18:00 | 12:00—18:00 | 12:00—18:00 | 12:00—18:00 | 12:00—18:00 |
Version | Description |
---|---|
1 |
Initial release. |
1.1 | Added support for accented characters. |
1.2 | Revised the business process to address some cases where shifts were copied to incorrect days. |
1.3 | Addressed an issue related to the 90-day target date range limit. |
1.4 | Addressed an issue when the extension initiator's locale policy was set to <None>. |
1.5 | Addressed an issue related to the 50-employee maximum. |
2 |
The extension now allows shift labels and comments to be copied from the source to the target schedule. |
3 |
The extension now allows business structure transfers from the source to target schedule when the transfer matches the employee's primary job. |
3.1 | The business process no longer displays an error message when updating an open shift corresponding to days with applied time off. |
4 | Enhanced the process to support Activiti 2.x. |
4.1 | Enhanced to support the upgraded Groovy version of Activiti v2.x. |
Migrate the business process model to the tenant
Migrate the Copy Schedule_v4.1 process model to the customer tenant using Setup Data Manager (SDM).
-
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 Copy Schedule decision tables
-
Go to Main Menu > Administration > Application Setup > Business Process setup > Process Models.
-
Select the Copy Schedule_v4.1 process and click Edit. The process model enters edit mode.
-
Select the Decision Tables tab.
-
Click Everyone's, and then select a decision table.
-
Click Decision Table Editor to add or update the rows in the table.
-
Click Save and close.
-
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.
Edit the following decision tables:
CopySchedule_v4.1_Parameters — controls the copy schedule process.
Variable name | Type | Description |
---|---|---|
Admin | Text |
An internal Service Level user who runs the REST APIs. Do not change. Note: Because the Service Level user applies the tenant locale during the API calls, the customer tenant locale must match the locale assigned to the user of the copy schedule form. |
Timeframe | Text |
Comma-separated list of time frame values. Default = Values must be entered using the same locale as the default tenant locale. |
OverrideExistingScheduledSelectedByDefault | Boolean |
Determines the default value of the Override Existing Schedule check box in the Copy Schedule panel.
|
CopyShiftLabelsSelectedByDefault | Boolean |
Determines the default value of the Copy Shift Labels check box in the Copy Schedule panel.
|
CopyShiftCommentsSelectedByDefault | Boolean |
Determines the default value of the Copy Comments check box in the Copy Schedule panel.
|
In this extension, the Service Level user executes the backend REST APIs. Because the Service Level user depends on the customer tenant locale during API calls, the locale of the Timeframe values in the target schedule drop-down list in the user form must match the locale used by the customer tenant.
CopySchedule_v4.1_Locale — Allows customization of the text in the workflow form and notifications for different locales.
Variable name | Type | Description |
---|---|---|
Key | Text | Placeholders for messages. |
Locale | Text | Locale policy used for customized message. |
Message | Text | Customized message. |
Description | Text | (Optional) Customized description. |
-
Localization of business process workflows remains optional, but is supported.
-
The decision table holds all messages represented with standard English labels; these apply to all locales when the Locale is set to a wildcard (*).
-
Some or all messages can be translated by adding lines to the table in their preferred translation for specific locales. Messages for the most commonly used Locale Policy should be defined at the top of the decision table. Text within tags ("<>") must not be changed.
-
Names of the parameters in the decision table column Parameter Name must be used as is. If any parameter value needs to be localized for a different Locale Policy, copy the Parameter Name with the * Locale Policy, add a new row to the decision table with the appropriate Locale Policy, and then add the localized values in the Message column.
-
The last row in the decision table must remain empty ("!=empty".)
Key | Message |
---|---|
_MessageTimePeriod Exceeded |
Message that displays when the selected time-period exceeds 90 days.
|
_MessageEmployeeCountExceeded |
Message that displays when more than 50 employees are selected.
|
_MessageTimePeriodandEmployeeCount |
Message that displays when the selected employees and time-period exceeds limits.
|
_MessageScriptError |
Message that displays when the workflow script fails.
|
_Message1 |
Message that displays when a failure occurs.
|
_Message2 |
The error headline.
|
_MessageErrorFormHeader |
The error form header.
|
_MessageAPIError |
Message that displays when the API call fails in the workflow.
|
_MessagePasteEndDate |
Message that displays when the past end date is less than the past start date.
|
_MessageSelected |
The selected schedule label.
|
_MessageTarget |
The target schedule label.
|
_MessageOverride |
The override existing schedule label.
|
_MessageStartDate |
The start date label.
|
_MessageEndDate |
The end date label.
|
_MessageCommentOverride |
The include comments checkbox label.
|
_MessageNoteOverride |
The include shift labels checkbox label.
|
Deploy 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.
Follow these steps to deploy the process model. For detailed information, see the online help topic
- From the Main Menu, go to Application Setup > Business Process Setup > Process Models.
- Select the CopySchedule_v4.1 process model.
- Click Tap Edit, and then configure the required parameters and deployment dates, such as Show from the GoTo List, and Hide from the Action List and Tile List.
- Click Tap Save and then Return to deploy.
API name | Type | Resource path | Description |
---|---|---|---|
Retrieve schedule | POST | /v1/scheduling/schedule/multi_read | Return schedules for a set of employees or locations within a specified date range. |
Update schedule for multiple employees | POST | /v1/scheduling/schedule/multi_update | Update schedules for multiple employees, including shifts, paycode edits, day locks and schedule tags. |
Retrieve persons | POST | /v1/commons/persons/extensions/multi_read | Return multiple person records. |
Delete shifts | POST | /v1/scheduling/schedule/shifts/multi_delete | Delete one or more shifts for the selected time frame. |
Retrieve schedule audits | POST | /v1/scheduling/audits/multi_read | Retrieve an audit set. |
Execute Hyperfind query | POST | /v1/commons/hyperfind/execute | Execute a Hyperfind query by ID or qualifier. |
Retrieve locale date span | POST | /v1/commons/symbolicperiod/read | Retrieves a locale date span or symbolic period matching the provided data. |
Retrieve user preferences for current user | GET | /v1/commons/user_preferences/locale_policy?userCurrent=true | Retrieves user preferences for the current user. |
Retrieve shifts | POST | /v1/scheduling/schedule/shifts/multi_read | Retrieves one or more shifts according to the parameters provided. |