Auto Shifts

The Auto Shifts workflow extension automates shift changes in the Schedule Planner when employees work a shift in the rotation other than the one for which they are scheduled.

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.

Organizations with employees who work a rotation schedule often have last minute changes. Exceptions and incorrect pay can occur when these shift changes are not added to the Schedule Planner.

The Auto Shifts process uses the employee’s first In punch of the day to detect shift changes, and then automatically applies the appropriate shift depending upon the employee’s pay rule.

The business process is attached to any Punch In button in the Attestation Model, which allows employees to confirm, or reject, the adjusted shift.

With the Auto Shifts configuration, you define:

  • Time spans and shifts for different groups of people.

  • Whether the shift adjustment requires employee confirmation.

User experience

Auto shift applied

When an employee’s first In punch falls outside the expected span of the scheduled shift start, the process replaces the shift in the Schedule Planner with the adjusted shift, and then adds a Comment and Note to trace the original shift. For example, an employee is originally scheduled to work the 8:00 AM — 4:00 PM day shift. The first In punch at 1:30 PM aligns with the 2:00 PM - 10:00 PM late shift. The process replaces the day shift with the night shift in the Schedule Planner, and then adds a Comment and Note.

Schedule change confirmation

When enabled, the process only makes the shift adjustment upon employee confirmation. If an In punch occurs in a time span associated with a different shift in the rotation, the employee can retain the scheduled shift by choosing “No” to bypass the Auto Shift process. For example, an employee arrives before the scheduled shift to work overtime, but chooses “No” to keep the original shift in the Schedule Planner.

If an In punch occurs in a time span associated with a different shift in the rotation, the employee can adjust the scheduled shift by choosing “Yes” to initiate the Auto Shift process. For example, an employee arrives after the scheduled shift to work another shift in the rotation, and chooses “Yes” to adjust the shift in the Schedule Planner.

Auto Shifts considerations

  • Shift templates must exist in UKG Pro Workforce Management.

  • The People record of each eligible employee who uses the Attestation Model for confirming shift changes must contain an appropriate attestation profile.

  • When configuring the Attestation Button component, Punch In must be selected as the button type.

UKG Pro Workforce Management pre-configurations

  • Attestation Assignments—See the Attestation Assignments topic.

    1. Go to Main Menu > Administration > Application Setup > Attestation > Attestation Assignments.

    2. Select the Auto Shifts assignment and click tap Edit.

    3. Select the appropriate Button, such as Punch In, and click tap Assign.

    4. Select the appropriate Condition, such as Always, and click tap Assign.

    5. Select the AutoShifts_v1 process, and click tap Assign.

    6. Click Tap Save.

    7. To assign the Attestation Profile to people:
      1. Go to Main Menu > Maintenance > People Information.

      2. Select the appropriate person from the list.

      3. Go to Timekeeper > Employee Role, and then select the appropriate Attestation Profile and Effective Date.

      4. Click Tap Save.

  • Comments—See the Comments topic.

    1. Go to Main Menu > Administration > Application Setup > Common Setup > Comments.

    2. Click Tap New.

    3. Enter Comment Text, such as Auto shift applied.

    4. In the Categories area, select Shiftsfrom the Available Categories box and move it to the Selected Categories box.

    5. Click Tap Save.

Configure Auto Shifts

  1. Migrate the business process model to the tenant Migrate the Auto Shift process model to the customer tenant using Setup Data Manager (SDM).
    1. Log in to the tenant to which you are migrating the process model.

    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 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 Publish with Comment or just Publish.

    6. Click 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 the appropriate row and click View Selected.

    8. On the History for publish run page, click 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 decision tables Configure the Auto Shifts decision tables.
    1. Go to Main Menu > Administration > Application Setup > Attestation > Attestation Models.

    2. Select the AutoShifts_v1 process and click Edit. The process model enters edit mode.

    3. Select the Decision Tables tab.

    4. Click Everyone's, and then select the decision table to edit.

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

    6. Click Save and close.

    7. Edit the decision table: AutoShifts_Config. The AutoShifts_Config decision table holds different options for the auto shift process.

      AutoShifts_Config decision table

      AutoShifts Config decision table

      Variable name

      Variable type

      Description

      DisplayAttestationForm

      Boolean

      Determines whether the attestation form is presented to the employee for shift change confirmation.

      Note: You must set DisplayAttestationForm= No when the Auto Shifts extension is utilized on clocks; forms are not supported in that context.

      CommentType

      String

      Comment added to the adjusted shift in the Schedule Planner.

      DisplayShiftLabel

      Boolean

      Controls whether the shift label displays in confirmation form.

      DisplayShiftTime

      Boolean

      Controls whether the shift times display in confirmation form.

      Admin

      String

      Internal user; do not change.

      Note:
      • DisplayAttestationForm, DisplayShiftLabel, and DisplayShiftTime must contain "Yes" or "No"; these values are not case-sensitive.

      • When DisplayAttestationForm = "Yes", either DisplayShiftLabel or DisplayShiftTime must equal "Yes".

      • CommentType must contain a Comment defined in UKG Pro Workforce Management; the value is case-sensitive.

    8. Edit the decision table: AutoShifts_Locale. The AutoShifts_Locale decision table allows customization of labels and messages.

      AutoShifts_Locale decision table

      AutoShifts Locale decision table

      Variable name

      Variable type

      Description

      Key

      String

      Internal field label; do not change.

      LocalePolicy

      String

      Name of the locale policy for which the label applies.

      When the label applies to all locales, keep the empty value.

      Message

      String

      Label displayed on the confirmation form.

      Only applies when DisplayAttestationForm = Yes.

      Description

      String

      (Optional) Additional information.

      Note:
      • Values entered in the Locale decision table are case-sensitive.

      • Avoid using special characters in the table.

      • The Message value must be consistent with the Locale specified in the same row.

      • (Optional) Comments can be added to the Description column in the Locale decision table.

      • Because Activiti scans decision tables from top to bottom and stops when it finds a match, define rows containing the most-used conditions at the top of the table, and rows containing wildcard conditions at the bottom of the table.
      • The !="empty" rows must always be the last rows in the Locale decision table; do not edit or remove these rows. These are the default messages and labels.
      • Names of the parameters in the "Key" column of the Locale decision table must be used as is. If any parameter value needs to be localized for a different Locale Policy, copy the "Key" with the “not empty” Locale Policy, add a new row to the table with the appropriate Locale Policy, and then add the localized values in the Value and Description decision table columns.

    9. Edit the decision table: AutoShifts_Variables. The AutoShifts_Variables decision table holds the time spans in which the employee's first In punch must fall to qualify for a shift change.

      AutoShifts_Variables decision table

      AutoShifts Config decision table

      Variable name

      Variable type

      Description

      SerialNo

      String

      Sequential number identifying the row.

      From

      String

      Time span start.

      To

      String

      Time span end.

      ShiftTemplate

      String

      Shift Template used for the time span.

      PayRule

      String

      Pay Rule name for which the time span applies.

      Operator

      String

      Operator that determines wild card treatment of the pay rule value.

      Note:
      • The AutoShifts_Variables decision table must contain unique rows.

      • Each row added to the AutoShifts_Variables table must contain a sequential SerialNo value.

      • Values in the From and To columns must be entered using 24-hour time format.

      • Values in the From and To columns are included as part of the time span.

      • The maximum To time value is 24:00.

      • The From time value cannot be greater than the To time value.

      • ShiftTemplate and PayRule parameter values must match configured values in UKG Pro Workforce Management; these values are case-sensitive.

      • The employee's pay rule determines the shift template that applies to the span.

      • Multiple Pay Rule column values must be separated with a semicolon. Do not include a semicolon when entering a single pay rule value.

      • Valid entries in the Operator column include: "Equals", "Not equals", "Starts with", "Ends with", and "Contains".

  3. Deploy the updated 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.
    1. Go to Main Menu > Administration > Application Setup > Attestation > Attestation Models.

    2. Select the AutoShifts_v1 model.

    3. Click Tap Edit, and then configure required parameters and deployment dates.

    4. Click Tap Save.

APIs

API details

APIs for the Prorated Accruals integrations

API name

Section

Type

Resource path

Description

Retrieve Person by Extension

Commons

GET

/v1/commons/persons/{extensionType}

Retrieve an employee's payrule information.

Retrieve Timecard as Manager

Timekeeping

GET

/v1/timekeeping/timecard?select=PUNCHES&start_date={YYYY-MM-DD}&end_date={YYYY-MM-DD}&person_number={}

Retrieve an employee's punch details for the specified date range.

Retrieve Shift Template by Name

Scheduling

GET

/v1/scheduling/shift_templates?name={}

Retrieve shift details.

Retrieve Employee Schedule

Scheduling

GET

/v1/scheduling/employee_schedule

Retrieve an employee's shift information for the specified date.

Delete Shift by ID

Scheduling

DELETE

/v1/scheduling/schedule/shifts/{shiftId}

Delete an existing shift.

Create Shifts from Patterns

Scheduling

POST

v1/scheduling/schedule/shifts/apply_create

Create a new shift.

Update Shift by ID

Scheduling

POST

/v1/scheduling/schedule/shifts/{}

Update a shift.