Time-Off Tracking Use Cases
Use cases for leave requests, approvals, balance management, and team calendars
Time-Off Tracking Use Cases
This document describes use cases for submitting and managing time-off requests, approval workflows, balance tracking, and team calendar visibility.
Actors
| Actor | Description |
|---|---|
| Employee | Submits leave requests, views own balance |
| Manager | Approves/rejects requests for direct reports |
| Tenant Admin | Configures leave policies, views all requests |
UC-TO-01: Submit Leave Request
Primary Actor: Employee
Preconditions
- Employee is authenticated
- Employee has an active profile
- Leave types are configured for tenant
Main Flow
- Employee navigates to Time-Off → Request Leave
- Selects leave type:
- Vacation
- Sick Leave
- Personal Day
- Other configured types
- Selects date range:
- Start date
- End date
- Full day or half day (AM/PM)
- Views available balance for selected type
- Adds reason/notes (optional or required per policy)
- Reviews request summary:
- Days requested
- Remaining balance after approval
- Manager who will approve
- Submits request
Alternative Flows
A1: Insufficient Balance
- System warns "Insufficient leave balance"
- Shows current balance vs requested
- Employee can:
- Reduce requested days
- Cancel request
- Submit anyway (if unpaid leave allowed)
A2: Overlapping Existing Leave
- System detects overlap with existing approved/pending leave
- Displays "You already have leave scheduled for these dates"
- Employee must adjust dates
A3: Blackout Period
- Requested dates fall in blackout period (e.g., year-end close)
- System warns "These dates are restricted"
- Requires admin override to proceed
Postconditions
- Leave request created with status PENDING
- Manager receives notification (email/in-app)
- Request appears in employee's request history
- Balance shows pending deduction
Business Rules
- Cannot exceed available balance (unless unpaid leave allowed)
- No overlapping approved leave periods
- Request requires at least 1 day notice (configurable)
- Maximum consecutive days per policy
UC-TO-02: Manager Approves/Rejects Leave
Primary Actor: Manager
Preconditions
- Manager is authenticated
- Pending leave requests exist for direct reports
- Manager has approval permission
Main Flow
- Manager is notified of pending request (email/dashboard)
- Navigates to Time-Off → Pending Approvals
- Views list of pending requests with:
- Employee name
- Leave type
- Dates requested
- Days count
- Current team coverage
- Selects request to review
- Views details:
- Employee's current balance
- Reason provided
- Team calendar showing other absences
- Decides:
- Approve: Request approved, balance deducted
- Reject: Request denied with required comment
- Submits decision
Alternative Flows
A1: Team Coverage Conflict
- Calendar shows other team members off same days
- Manager sees coverage warning
- Can still approve with acknowledgment
A2: Own Request
- Manager submits own leave request
- Request goes to manager's manager (e.g., CTO approves Dev Manager's leave)
- Cannot approve own request
A3: Bulk Approval
- Multiple pending requests exist
- Manager can select multiple and approve all
Postconditions
- Request status updated to APPROVED or REJECTED
- If approved, balance deducted from employee
- Employee notified of decision
- Calendar updated with approved leave
Key Scenario: Dual-Role Approval Chain
Developer submits leave → Dev Manager approves
Dev Manager submits leave → CTO approves
CTO submits leave → CEO approvesBusiness Rules
- Managers can only approve direct reports' requests
- Cannot approve own requests (goes to own manager)
- Rejection requires reason comment
- Approval is final (reversal requires cancellation)
UC-TO-03: View Leave Balance
Primary Actor: Employee
Preconditions
- Employee is authenticated
- Leave balances are tracked for employee
Main Flow
- Employee navigates to Time-Off → My Balance
- Views balance summary for each leave type:
- Total: Annual allocation
- Used: Days already taken
- Pending: Days in pending requests
- Available: Remaining balance
- Views accrual information (if applicable):
- Monthly accrual rate
- Next accrual date
- Carry-over from previous year
- Can view history of balance changes
Alternative Flows
A1: Mid-Year Start
- Employee started mid-year
- Pro-rated balance shown
- Full entitlement for next year visible
A2: No Balance Tracking
- Leave type has unlimited balance
- Shows "Unlimited" instead of numbers
Postconditions
- Employee understands current leave availability
- No data is modified (read-only view)
Balance Display Example
┌────────────────────────────────────────┐
│ Leave Balances │
├────────────────────────────────────────┤
│ Vacation │
│ Total: 20 days | Used: 5 | Pending: 3 │
│ Available: 12 days │
├────────────────────────────────────────┤
│ Sick Leave │
│ Total: 10 days | Used: 2 | Pending: 0 │
│ Available: 8 days │
├────────────────────────────────────────┤
│ Personal Days │
│ Total: 3 days | Used: 1 | Pending: 0 │
│ Available: 2 days │
└────────────────────────────────────────┘UC-TO-04: View Team Calendar
Primary Actor: Manager, Tenant Admin
Preconditions
- Actor is authenticated
- Has permission to view team calendar
- Approved time-off exists
Main Flow
- Actor navigates to Time-Off → Team Calendar
- Views calendar display:
- Default: Current week/month
- Toggle: Week, Month, Quarter view
- Sees approved time-off for:
- Direct reports (Manager view)
- All employees (Admin view)
- Department filter available
- Color-coded by leave type:
- Blue: Vacation
- Red: Sick Leave
- Yellow: Personal
- Clicks on leave entry to see details
Alternative Flows
A1: Filter by Department
- Actor selects specific department
- Calendar filters to show only that department
A2: Conflict Highlighting
- Multiple team members off same day
- Day is highlighted as potential coverage issue
A3: Export Calendar
- Actor exports to ICS format
- Can import to personal calendar
Postconditions
- Actor has visibility into team availability
- Can plan around approved absences
Calendar View Example
December 2024
Mon Tue Wed Thu Fri
2 3 4 5 6
[John - Vacation───────]
[Mary - Sick]
9 10 11 12 13
[Bob - Vacation]UC-TO-05: Cancel Pending Request
Primary Actor: Employee
Preconditions
- Employee is authenticated
- Employee has pending (not yet approved) request
Main Flow
- Employee navigates to Time-Off → My Requests
- Views list of requests with status
- Selects pending request
- Clicks "Cancel Request"
- Confirms cancellation
- Request is cancelled
Alternative Flows
A1: Approved Request Cancellation
- Request is already approved
- "Cancel" button shows "Request Cancellation"
- Cancellation request goes to manager
- Manager must approve cancellation
A2: In-Progress Leave Cancellation
- Leave period has already started
- System calculates days already taken
- Remaining days can be cancelled
- Used days remain counted
Postconditions
- If pending: Request status changed to CANCELLED
- If approved: Cancellation request created for manager
- Balance adjusted accordingly
- Manager notified (if approved leave cancelled)
Business Rules
- Pending requests can be cancelled directly
- Approved requests require manager approval to cancel
- Partial cancellation allowed for approved leave
- Cancellation reason required for approved leave
UC-TO-06: Manager Views Team Absences
Primary Actor: Manager
Preconditions
- Manager is authenticated
- Manager has direct reports
Main Flow
- Manager accesses team dashboard
- Views "Team Availability" widget:
- Who is out today
- Who is out this week
- Upcoming scheduled absences
- Sees coverage summary:
- Team capacity percentage
- Conflict warnings (multiple key people out)
- Can click to see full team calendar
Alternative Flows
A1: Critical Coverage Gap
- More than 50% of team out on same day
- Dashboard shows alert
- Links to affected requests for potential action
A2: Extended Absence
- Team member on extended leave (>2 weeks)
- Special indicator for long-term absences
- Shows expected return date
Postconditions
- Manager has quick view of team availability
- Can proactively address coverage issues
Dashboard Widget Example
┌────────────────────────────────────┐
│ Team Availability │
├────────────────────────────────────┤
│ Today (Dec 5) │
│ ⚠ 2 of 5 team members out │
│ • John - Vacation (returns Dec 9) │
│ • Mary - Sick Leave │
├────────────────────────────────────┤
│ This Week │
│ Dec 6: Full team available │
│ Dec 7-8: Weekend │
├────────────────────────────────────┤
│ Upcoming │
│ Dec 15-20: Bob - Vacation │
└────────────────────────────────────┘Summary
| Use Case | Primary Actor | Purpose |
|---|---|---|
| UC-TO-01 | Employee | Submit leave request |
| UC-TO-02 | Manager | Approve or reject leave requests |
| UC-TO-03 | Employee | View personal leave balance |
| UC-TO-04 | Manager, Admin | View team calendar with absences |
| UC-TO-05 | Employee | Cancel pending or approved leave |
| UC-TO-06 | Manager | Quick view of team availability |
Leave Request Lifecycle
┌─────────────────┐
│ PENDING │
└────────┬────────┘
│
┌──────────────┼──────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ APPROVED │ │ REJECTED │ │CANCELLED │
└────┬─────┘ └──────────┘ └──────────┘
│
▼
┌──────────┐
│COMPLETED │ (after leave dates pass)
└──────────┘AI Chat Integration
The following time-off use cases can be triggered via AI Chat. See AI Chat Specification for full implementation details.
AI Chat-Enabled Actions
| Use Case | AI Tool | Requires Confirmation |
|---|---|---|
| UC-TO-01 | timeoff_submit | Yes |
| UC-TO-02 | timeoff_approve | Yes |
| UC-TO-03 | timeoff_check_balance | No (read-only) |
| UC-TO-04 | timeoff_team_calendar | No (read-only) |
| UC-TO-05 | timeoff_cancel | Yes |
UC-TO-01: Submit Leave Request via AI Chat
Example prompts:
- "Submit a vacation request for next Monday"
- "Request sick leave for today"
- "Book time off from December 20 to January 2"
- "I need a personal day on Friday"
AI Chat Flow:
User: "Submit a vacation request for December 20-24"
AI: Shows Confirmation Card
┌─────────────────────────────────────────────┐
│ Submit Leave Request │
│ │
│ Type: Vacation │
│ Dates: December 20-24, 2024 │
│ Days: 5 working days │
│ │
│ Current Balance: 12 days │
│ After Approval: 7 days │
│ │
│ Approver: Jane Smith (Manager) │
│ │
│ [Cancel] [Submit] │
└─────────────────────────────────────────────┘
User: Clicks [Submit]
AI: Shows Result Card
┌─────────────────────────────────────────────┐
│ [ok] Leave Request Submitted │
│ │
│ Vacation: Dec 20-24 (5 days) │
│ Status: Pending approval │
│ Jane Smith has been notified │
│ │
│ [View Request] │
└─────────────────────────────────────────────┘UC-TO-02: Approve Leave via AI Chat (Managers)
Example prompts:
- "Approve John's vacation request"
- "Reject the leave request from Sarah"
- "What leave requests need my approval?"
AI Chat Flow:
User: "Approve John's vacation request"
AI: Shows Confirmation Card
┌─────────────────────────────────────────────┐
│ Approve Leave Request │
│ │
│ Employee: John Smith │
│ Type: Vacation │
│ Dates: Dec 20-24 (5 days) │
│ │
│ Team Impact: │
│ No other team members off these dates │
│ │
│ [Reject] [Approve] │
└─────────────────────────────────────────────┘
User: Clicks [Approve]
AI: Shows Result Card
┌─────────────────────────────────────────────┐
│ [ok] Leave Approved │
│ │
│ John Smith's vacation approved │
│ Dec 20-24 (5 days) │
│ John has been notified │
│ │
│ [View Team Calendar] │
└─────────────────────────────────────────────┘UC-TO-03: Check Balance via AI Chat
Example prompts:
- "How many vacation days do I have left?"
- "Check my leave balance"
- "What's my sick leave balance?"
AI Chat Flow:
User: "How many vacation days do I have?"
AI: Shows Info Card
┌─────────────────────────────────────────────┐
│ Your Leave Balance │
│ │
│ Vacation │
│ ████████████░░░░░░░░ 12 of 20 days │
│ Used: 5 | Pending: 3 | Available: 12 │
│ │
│ Sick Leave │
│ ████████░░░░░░░░░░░░ 8 of 10 days │
│ Used: 2 | Available: 8 │
│ │
│ Personal Days │
│ ██████░░░░░░░░░░░░░░ 2 of 3 days │
│ Used: 1 | Available: 2 │
│ │
│ [View Full Details] │
└─────────────────────────────────────────────┘UC-TO-04: View Team Calendar via AI Chat
Example prompts:
- "Who's out this week?"
- "Show team calendar for December"
- "Is anyone on my team off next Monday?"
AI Chat Flow:
User: "Who's out this week?"
AI: Shows Info Card
┌─────────────────────────────────────────────┐
│ Team Availability This Week │
│ Dec 2-6, 2024 │
│ │
│ Out Today (Dec 5): │
│ - John Smith: Vacation (returns Dec 9) │
│ - Mary Jones: Sick Leave │
│ │
│ Rest of Week: │
│ Dec 6 (Fri): Full team available │
│ │
│ Team Capacity: 60% (3 of 5 available) │
│ │
│ [View Full Calendar] │
└─────────────────────────────────────────────┘UC-TO-05: Cancel Leave via AI Chat
Example prompts:
- "Cancel my vacation request"
- "Withdraw my leave request for next week"
AI Chat Flow:
User: "Cancel my vacation request for next week"
AI: Shows Confirmation Card
┌─────────────────────────────────────────────┐
│ Cancel Leave Request │
│ │
│ Type: Vacation │
│ Dates: Dec 9-13 (5 days) │
│ Status: Pending │
│ │
│ Balance will be restored: 5 days │
│ │
│ [Keep Request] [Cancel] │
└─────────────────────────────────────────────┘
User: Clicks [Cancel]
AI: Shows Result Card
┌─────────────────────────────────────────────┐
│ [ok] Request Cancelled │
│ │
│ Your vacation request has been cancelled │
│ 5 days restored to your balance │
│ │
│ [View Balance] │
└─────────────────────────────────────────────┘Business Rules for AI Chat Time-Off Actions
| Rule | Description |
|---|---|
| Balance Check | AI validates balance before showing confirmation |
| Overlap Check | AI warns if dates overlap with existing leave |
| Manager Routing | AI identifies correct approver based on reporting chain |
| Self-Approval Block | Managers cannot approve their own requests via AI |
| Audit Trail | All AI-initiated requests logged with AI actor |