Auto Shifts
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 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.
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.
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.
-
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.
- Attestation Assignments See the Attestation Assignments topic.
Go to Main Menu > Administration > Application Setup > Attestation > Attestation Assignments.
Select the Auto Shifts assignment and click tap Edit.
Select the appropriate Button, such as Punch In, and click tap Assign.
Select the appropriate Condition, such as Always, and click tap Assign.
Select the AutoShifts_v1 process, and click tap Assign.
Click Tap Save.
- To assign the Attestation Profile to people:
Go to Main Menu > Maintenance> People Information.
Select the appropriate person from the list.
Go to Timekeeper > Employee Role, and then select the appropriate Attestation Profile and Effective Date.
Click Tap Save.
- Comments See the Comments topic.
Go to Main Menu > Administration > Application Setup > Common Setup > Comments.
Click Tap New.
Enter Comment Text, such as Auto shift applied.
In the Categories area, select Shifts from the Available Categories box and move it to the Selected Categories box.
Click Tap Save.
- Migrate the business process model to the tenant Migrate the Auto Shift process model to the customer tenant using Setup Data Manager (SDM).
Log in to the tenant to which you are migrating the process model.
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 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 Publish with Comment or just Publish.
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.
To view details, click the appropriate row and click View Selected.
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.
- Configure the decision tables Configure the Auto Shifts decision tables.
Go to Main Menu > Administration > Application Setup > Attestation > Attestation Models.
Select the AutoShifts_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: AutoShifts_Config. The AutoShifts_Config decision table holds different options for the auto shift process.
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.
- Edit the decision table: AutoShifts_Locale. The AutoShifts_Locale decision table allows customization of labels and messages.
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.
- 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 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".
- Deploy the updated process model
Note: Process models must be redeployed every time changes are made to an existing model.
Go to Main Menu > Administration > Application Setup > Attestation > Attestation Models.
Select the AutoShifts_v1 model.
Click Tap Edit, and then configure required parameters and deployment dates.
Click Tap Save.
API name | Section | Type | Resource path | Location | Description |
---|---|---|---|---|---|
Retrieve Person by Extension | Commons | GET | /v1/commons/persons/timekeeping?person_number={} | Autoshifts_Main | 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={} | Autoshifts_Main | Retrieve an employee's punch details for the specified date range. |
Retrieve Shift Template by Name | Scheduling | GET | /v1/scheduling/shift_templates?name={} | Autoshifts_Main | Retrieve shift details. |
Retrieve Employee Schedule | Scheduling | GET | /v1/scheduling/employee_schedule?select=SHIFTS&start_date={YYYY-MM-DD}&end_date={YYYY-MM- DD}&person_number={} | Autoshifts_Main | Retrieve an employee's shift information for the specified date. |
Delete Shift by ID | Scheduling | DELETE | /v1/scheduling/employee_schedule?select=SHIFTS&start_date={YYYY-MM-DD}&end_date={YYYY-MM-DD}&person_number={} | Autoshifts_Main | Delete an existing shift. |
Create Shifts from Patterns | Scheduling | POST | v1/scheduling/schedule/shifts/apply_create | Autoshifts_Main | Create a new shift. |
Update Shift by ID | Scheduling | POST | /v1/scheduling/schedule/shifts/{} | Autoshifts_Main | Update a shift. |