Shifts Guide
Learn how to create, manage, and assign shifts within schedules.
This guide explains how to create, manage, and assign shifts within schedules in StaffMagic.
Overview
A Shift represents a single work period assigned to an employee (or left open for pickup). Shifts are the building blocks of schedules - they define when employees work, what position they'll fill, and for how long.
Key Concepts
- Shift: A specific time slot for work (e.g., 9 AM - 5 PM)
- Open Shift: A shift not assigned to anyone, available for pickup
- Position: The role/job for the shift (Server, Cook, Host, etc.)
- Break Time: Unpaid break duration subtracted from total hours
Shift Statuses
| Status | Description | |--------|-------------| | Scheduled | Shift created but not yet confirmed by employee | | Confirmed | Employee has acknowledged the shift | | Completed | Shift has been worked | | Cancelled | Shift was cancelled |
Creating Shifts
Who Can Create Shifts
Managers, Admins, and Owners can create shifts.
Prerequisites
- A draft schedule must exist (shifts can only be added to drafts)
- At least one position must be configured for your organization
Steps
- Navigate to the schedule you want to add shifts to
- Click Add Shift or drag on the calendar
- Fill in the shift details:
- Position: Select the job role (required)
- Employee: Select an employee or leave empty for an open shift
- Start Time: When the shift begins (required)
- End Time: When the shift ends (required)
- Break: Duration of unpaid break in minutes (optional)
- Notes: Instructions or details for the shift (optional)
- Color: Custom color override for display (optional)
- Click Create
Creating Open Shifts
To create a shift that anyone can pick up:
- Follow the steps above
- Leave the Employee field empty
- The shift will appear as "Open" and can be assigned later
Bulk Creating Shifts
To add multiple shifts at once:
- Use the Bulk Create option
- Define the shifts in batch
- Submit to create all shifts simultaneously
This is useful for setting up a full week of shifts quickly.
Creating Shifts from Templates
For even faster shift creation, use Shift Templates:
- Navigate to the schedule
- Click Apply Template or drag a template from the sidebar
- Select dates and optionally assign an employee
- The template's position, times, and break settings are applied automatically
See Shift Templates User Guide for details on creating and managing templates.
Viewing Shifts
For Employees
Employees can view their assigned shifts in published schedules:
- Navigate to My Schedule
- View your upcoming shifts
- Click on a shift for details
Note: Employees cannot see shifts in draft schedules or shifts assigned to others.
For Managers
Managers can see all shifts in all schedules:
- Open any schedule
- View all shifts including open shifts
- Use filters to narrow down:
- By Employee: See shifts for a specific person
- By Position: See shifts for a specific role
- By Status: Filter by scheduled/confirmed/completed
Editing Shifts
Who Can Edit
Managers, Admins, and Owners can edit shifts.
What Can Be Edited
- Draft schedules: All shift properties can be changed
- Published schedules: Shifts cannot be edited (create a new draft instead)
Steps
- Open the schedule containing the shift
- Click on the shift to edit
- Modify the desired fields
- Save changes
Reassigning Shifts
To assign a shift to a different employee:
- Edit the shift
- Change the Employee field to the new person
- Save changes
Converting to Open Shift
To make an assigned shift available for pickup:
- Edit the shift
- Clear the Employee field
- Save - the shift is now "Open"
Deleting Shifts
Who Can Delete
Managers, Admins, and Owners can delete shifts.
Constraints
- Shifts in draft schedules can be deleted
- Shifts in published schedules cannot be deleted
Steps
- Open the schedule
- Select the shift
- Click Delete
- Confirm the deletion
Conflict Detection
StaffMagic automatically detects potential scheduling conflicts when creating, editing, or publishing shifts.
Types of Conflicts
| Conflict | Default Severity | Description | |----------|------------------|-------------| | Double Booking | Error | Employee already has a shift at this time | | Overtime | Warning | Shift would result in more than 40 hours/week | | Rest Time | Warning | Less than 8 hours rest since last shift | | Max Daily Hours | Warning | More than 12 hours of work in a single day |
Conflict Severity Levels
- Errors block the action (e.g., publishing a schedule with double-booked shifts)
- Warnings allow the action but alert you to potential issues (can be overridden)
Configurable Thresholds
Organizations can customize conflict detection thresholds:
| Setting | Default | Range | Description | |---------|---------|-------|-------------| | Overtime Weekly Hours | 40 | 20-80 | Hours before overtime warning | | Minimum Rest Hours | 8 | 4-12 | Required rest between shifts | | Max Daily Hours | 12 | 8-16 | Maximum hours per day | | Overtime as Error | No | - | Treat overtime as blocking error | | Rest Time as Error | No | - | Treat rest violation as blocking error |
How It Works
- On Shift Creation: The system checks for conflicts against existing shifts
- On Validation: Use the validate endpoint to preview conflicts before saving
- On Schedule Publish: All shifts are validated; errors block publishing
Validating Individual Shifts
Use the Validate feature before creating to preview conflicts:
- Fill in shift details
- Click Validate (instead of Create)
- Review any conflicts shown
- Adjust times or assignment as needed
- Create the shift
Validating Entire Schedules
Before publishing, validate the entire schedule:
- Open the draft schedule
- Click Validate Schedule
- Review the conflict summary:
- Error Count: Issues that must be fixed before publishing
- Warning Count: Issues that can be overridden
- Conflicts by User: See which employees have issues
- Fix any errors by editing shifts
- Publish (with
force=trueto override warnings)
Open Shifts and Conflicts
Open shifts (shifts without an assigned employee) do not trigger conflicts:
- No double booking check (no employee assigned)
- No overtime check (no employee to track hours)
- No rest time check (no previous shifts to compare)
Once you assign an employee to an open shift, conflict detection applies.
Duration and Breaks
How Duration is Calculated
Duration = (End Time - Start Time) - Break Time
Example:
- Start: 9:00 AM
- End: 5:00 PM
- Break: 30 minutes
- Duration: 7.5 hours (not 8 hours)
Break Guidelines
- Breaks are entered in minutes
- Breaks are unpaid time
- Common breaks: 30 minutes (short shift), 60 minutes (long shift)
Open Shifts Workflow
Open shifts are powerful for flexible scheduling:
Creating Open Shifts
- Create shift without assigning an employee
- Shift appears as "Open" in the schedule
Filling Open Shifts
- View open shifts in the schedule
- Edit the shift
- Assign an available employee
- Save to convert to assigned shift
Best Practices
- Create open shifts when you know you need coverage but not who
- Fill open shifts as employees become available
- Consider open shifts for on-call or variable needs
Permissions Summary
| Action | Employee | Manager | Admin | Owner | |--------|----------|---------|-------|-------| | View own shifts | ✓ | ✓ | ✓ | ✓ | | View all shifts | | ✓ | ✓ | ✓ | | Create shifts | | ✓ | ✓ | ✓ | | Edit shifts | | ✓ | ✓ | ✓ | | Delete shifts | | ✓ | ✓ | ✓ | | Validate shifts | | ✓ | ✓ | ✓ |
API Reference
For developers integrating with StaffMagic, shifts are managed via these endpoints:
Shift Endpoints
GET /api/v1/organizations/{org}/schedules/{schedule}/shifts # List shifts
GET /api/v1/organizations/{org}/schedules/{schedule}/shifts/{id} # Get shift
POST /api/v1/organizations/{org}/schedules/{schedule}/shifts # Create shift
POST /api/v1/organizations/{org}/schedules/{schedule}/shifts/bulk # Bulk create
PATCH /api/v1/organizations/{org}/schedules/{schedule}/shifts/{id} # Update shift
DELETE /api/v1/organizations/{org}/schedules/{schedule}/shifts/{id} # Delete shift
Validation Endpoints
POST /api/v1/organizations/{org}/validation/shifts # Validate shift
GET /api/v1/organizations/{org}/locations/{loc}/schedules/{id}/validate # Validate schedule
POST /api/v1/organizations/{org}/locations/{loc}/schedules/{id}/publish?force=true # Force publish
Validation Response Example
{
"valid": false,
"error_count": 1,
"warning_count": 2,
"conflicts": [
{
"type": "double_booking",
"message": "Employee already has a shift from 2024-01-15 09:00 to 2024-01-15 17:00",
"severity": "error",
"shift_id": "abc123",
"conflicting_shift_id": "def456",
"user_id": "user789",
"details": {
"overlapping_start": "2024-01-15T09:00:00Z",
"overlapping_end": "2024-01-15T17:00:00Z"
}
},
{
"type": "overtime",
"message": "Would result in 45.0 hours this week (limit: 40)",
"severity": "warning",
"user_id": "user789",
"details": {
"total_hours": 45.0,
"limit_hours": 40.0,
"excess_hours": 5.0
}
}
]
}
Frequently Asked Questions
Can I copy shifts from last week?
This feature is planned for a future release. In the meantime, use Shift Templates to quickly recreate common shift patterns. See Shift Templates User Guide.
What happens to shifts when a schedule is published?
Shifts remain with the schedule. Once published, shifts cannot be modified - create a new draft schedule to make changes.
Can employees see open shifts?
Currently, employees only see their own assigned shifts. Open shift marketplace is planned for a future release.
How do I handle split shifts?
Create two separate shifts with a gap between them. Split shift support with automatic linking is planned for a future release.
Can I set recurring shifts?
Recurring shifts are planned for a future release. Currently, use Shift Templates to quickly apply the same pattern across multiple dates. Templates can be applied to up to 31 dates at once.
What's the maximum shift length?
There's no hard limit, but the system will warn about shifts resulting in overtime (>40 hours/week).
Can employees decline shifts?
Currently, shift confirmation and decline workflows are not implemented. This is planned for a future release.
Are employees notified when their shifts change?
Yes! When a schedule is published, all employees with shifts receive an email notification. See Notifications User Guide for details.
Related Guides
- Schedules User Guide - Creating and publishing schedules
- Shift Templates User Guide - Reusable shift patterns
- Notifications User Guide - Email notifications and preferences
Last updated: December 2024 (Task 19: Email Notifications)