Copy Schedule

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.

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.

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.

Note:
  • 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.

User experience

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:

Copy Schedule User experience - source schedule

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

  1. In the Schedule Planner, load the previous schedule, select a set of employees, navigate to the GoTo control, and select Business Processes.

  2. Select Copy Schedule from the Business Processes Library.

  3. 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:

Copy Schedule User experience - target schedule results

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

Configure Copy Schedule business process

Note: The process for configuring and deploying this and other Business Process Extensions is the same as all Business Process models .
  1. Migrate the business process model to the tenant Migrate the Copy Schedule_v4.2 process model to the customer tenant using Setup Data Manager (SDM).
    1. Log in to the appropriate tenant.

    2. Go to Main Menu > Administration > Setup Data Manager.

    3. 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.

    4. Click Tap Review and Publish. The Publish Summary panel appears.

    5. 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.

    6. 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.

    7. To view details, click tap the appropriate row and click tap View Selected.

    8. 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.

  2. Configure the Copy Schedule decision tables
    Note: Decision tables are configurable based on user requirements and can be changed accordingly. These tables are dynamic and can be updated at any time without redeployment of the process model.
    1. Go to Main Menu > Administration > Application Setup > Business Process setup > Process Models.

    2. Select the Copy Schedule_v4.2 process and click tap Edit. The process model enters edit mode.

    3. Select the Decision Tables tab.

    4. Click Tap Everyone's, and then select a decision table.

    5. Click Tap Decision Table Editor to add or update the rows in the table.

    6. Click Tap Save and close.

    Caution:
    • 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.

  3. Edit the following decision tables:
    • CopySchedule_v4.2_Parameters— controls the copy schedule process.

      Copy Schedule Parameters decision table

      Copy Schedule Parameters decision table

      Variable name

      Type

      Description

      Admin

      Text

      An internal Service Level user who runs the REST APIs. Do not change.

      Default = SERVICES-LEVEL3

      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 = Current Schedule Period,Next Schedule Period,Next Schedule Period + 1,Next Schedule Period + 2

      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.

      • No(default) indicates that schedules in the target period are not overwritten by the source schedule.

      • Yes indicates that schedules in the target period are overwritten by the source schedule.

      CopyShiftLabelsSelectedByDefault

      Boolean

      Determines the default value of the Copy Shift Labels check box in the Copy Schedule panel.

      • No(default) indicates that shift labels in the source are not copied to the target.

      • Yes indicates that shift labels in the source are copied to the target.

      CopyShiftCommentsSelectedByDefault

      Boolean

      Determines the default value of the Copy Comments check box in the Copy Schedule panel.

      • No(default) indicates that comments in the source are not copied to the target.

      • Yes indicates that comments in the source are copied to the target.

      Note:

      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.2_Locale— Allows customization of the text in the workflow form and notifications for different locales.

      Copy Schedule Locale decision table

      Copy Schedule Locale decision table

      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.

      Note:
      • Localization of business process workflows remains optional, but is supported.​
      • You can translate some or all messages by adding lines to the table in their preferred translation for specific locales. Decision tables are scanned from top to bottom; therefore, place messages for the most commonly used Locale Policy at the top of the decision table and less-restrictive locale policies at the bottom.
      • Text within tags ("<>") must not be changed.
      • The decision table holds all messages represented with standard English labels; these apply to all locales when the Locale Policy is set to !=empty.
      • 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 !=empty ​Locale Policy, add a new row to the decision table with the appropriate Locale Policy, and then add the localized value in the Message column.​
      • Decision tables support operators like "Contains," "Starts with," "Ends with," and "Is Not Empty." You can achieve your preferred results by following these examples:
        • To match any non-empty or any string (like *), use the "Is Not Empty" operator.
        • To match a string starting with "ABC" (like "ABC*"), use the "Starts with" operator and set the value to "ABC".
        • To match a string containing "English" as substring, use the "Contains" operator with the value "English".
      • The last row in the decision table must remain empty ("!=empty".)

      Copy Schedule Locale sample content

      Copy Schedule Locale sample content

      Key

      Description

      _MessageTimePeriod Exceeded

      Message that displays when the selected time-period exceeds 90 days.

      The selected period has exceeded the last 90 days.

      _MessageEmployeeCountExceeded

      Message that displays when more than 50 employees are selected.

      More than 50 employees selected.

      _MessageTimePeriodandEmployeeCount

      Message that displays when the selected employees and time-period exceeds limits.

      The number of employees has exceeded 50 and the selected period has exceeded 90 days.

      _MessageScriptError

      Message that displays when the workflow script fails.

      Script execution failure. Please contact system administrator.

      _Message1

      Message that displays when a failure occurs.

      Contact the system administrator.

      _Message2

      The error headline.

      Error is mentioned below.

      _MessageErrorFormHeader

      The error form header.

      Error

      _MessageAPIError

      Message that displays when the API call fails in the workflow.

      Rest API Connector failure. Please contact system administrator.

      _MessagePasteEndDate

      Message that displays when the past end date is less than the past start date.

      Past End Date is less than Past Start Date.

      _MessageSelected

      The selected schedule label.

      Selected Schedule

      _MessageTarget

      The target schedule label.

      Target Schedule

      _MessageOverride

      The override existing schedule label.

      Override Existing Schedule

      _MessageStartDate

      The start date label.

      Start Date

      _MessageEndDate

      The end date label.

      End Date

      _MessageCommentOverride

      The include comments checkbox label.

      Include Comments

      _MessageNoteOverride

      The include shift labels checkbox label.

      Include Notes

  4. 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 Deploy Business Process Models.

    1. Go to Main Menu > Administration > Application Setup > Business Process Setup > Process Models.
    2. Select the CopySchedule_v4.2 model and click tap Deploy
    3. On the Business Process page, configure the required parameters and deployment dates.
      • (Optional) In Description, enter Copy Schedule.
      • In Display Name, enter CopySchedule_v4.2.
      • 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 Show.
      Caution: Do not make a selection from the Template Categories list.
    4. Click Tap Save and then Return.
    5. Add the process model to the required process profile.
    6. Assign the process profile to employees by way of People Information.

APIs

API details

APIs details

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

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.

Version history

Version history

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.

4.2

The Copy Schedule business process caused a script execution failure when a custom date range was chosen by a user with the Swedish locale policy assignment.