Employee Management Use Cases
Use cases for employee profiles, custom fields, org structure, and directory
Employee Management Use Cases
This document describes use cases for employee profile management, custom fields, organizational hierarchy, tagging, and employee directory.
Actors
| Actor | Description |
|---|---|
| Tenant Admin | Full access to all employee data and configuration |
| Manager | Access to own profile and direct reports |
| Employee | Access to own profile and company directory |
UC-EMP-01: Create Employee Profile
Primary Actor: Tenant Admin, Manager (if permitted)
Preconditions
- Actor is authenticated with create employee permission
- User account exists or will be created with employee
Main Flow
- Actor navigates to Employees → Add Employee
- Enters required fields:
- First name, Last name
- Email address
- Job title
- Department
- Start date
- Enters optional fields:
- Manager (select from active employees)
- Location
- Employment type (Full-time, Part-time, Contractor)
- Phone number
- System generates unique employee number
- Optionally links to or creates user account
- Saves employee profile
Alternative Flows
A1: Email Already Exists
- System warns email is already in use
- Offers to link to existing employee (if terminated) or abort
A2: Manager Not Set
- Employee is created without manager
- Appears at top level of org chart (under department)
Postconditions
- Employee profile created with unique ID and employee number
- Appears in org chart under assigned manager
- If linked to user account, employee can login
Business Rules
- Employee number is auto-generated and unique within tenant
- Manager must be an active employee in same tenant
- Start date cannot be in the future by more than 90 days
UC-EMP-02: Manager Views Team Dashboard
Primary Actor: Manager
Preconditions
- Manager is authenticated
- Manager has direct reports assigned
Main Flow
- Manager logs into the system
- Dashboard displays two sections:
- My Profile: Personal employee information
- My Team: List of direct reports
- My Team section shows:
- Team member names and photos
- Job titles
- Leave balance summary
- Current status (active, on leave, etc.)
- Pending requests requiring approval
- Manager can click team member to view full profile
Alternative Flows
A1: No Direct Reports
- My Team section displays friendly empty state
- Message: "You don't have any direct reports yet"
A2: Team Member on Leave
- Status indicator shows "On Leave"
- Leave type and return date visible
Postconditions
- Manager has overview of team status
- Can quickly access individual profiles
Key Scenario: Dual-Role User
A Development Manager sees:
- My Profile section: Shows their own data, reports to CTO
- My Team section: Shows developers they manage
Dashboard View for Development Manager:
┌─────────────────────────────────────┐
│ My Profile │
│ Reports to: CTO │
│ Leave Balance: 15 days │
├─────────────────────────────────────┤
│ My Team (3 members) │
│ ├── Senior Developer - Active │
│ ├── Developer - On Leave (returns 12/1) │
│ └── Junior Developer - Active │
└─────────────────────────────────────┘UC-EMP-03: View/Edit Employee Details
Primary Actor: Employee (own profile), Manager (team), Tenant Admin (all)
Preconditions
- Actor is authenticated
- Employee profile exists
Main Flow
- Actor navigates to employee profile
- Views employee information:
- Personal details (name, contact)
- Employment details (title, department, manager)
- Custom fields (tenant-configured)
- Tags assigned to employee
- Leave balances
- Documents (if permitted)
- Edits fields based on permissions:
- Employee: Personal info (phone, emergency contact, custom fields marked as employee-editable)
- Manager: View only for team members
- Admin: All fields
Alternative Flows
A1: Viewing Terminated Employee
- Profile shows "Terminated" status with last day
- Most fields are read-only
- Historical data preserved
A2: Insufficient Permissions
- Fields are displayed as read-only
- Edit button not shown for restricted fields
Postconditions
- Profile changes saved
- Audit log records all changes with old/new values
Permission Matrix
| Field Type | Employee | Manager | Admin |
|---|---|---|---|
| Personal contact info | Edit | View | Edit |
| Job title, department | View | View | Edit |
| Manager assignment | View | View | Edit |
| Salary (if tracked) | Hidden | Hidden | Edit |
| Custom fields | Depends on config | View | Edit |
| Tags | View | Assign | Assign |
UC-EMP-04: Assign/Change Manager
Primary Actor: Tenant Admin, HR Manager
Preconditions
- Actor has permission to change reporting structure
- Both employee and new manager exist and are active
Main Flow
- Actor navigates to employee profile
- Clicks "Edit" on manager field
- Searches for or selects new manager from active employees
- Reviews impact:
- Old manager loses access to employee's data
- New manager gains access
- Confirms change
- System updates reporting chain
Alternative Flows
A1: Circular Reporting Chain Detected
- System detects A→B→C→A scenario
- Displays error: "Cannot create circular reporting chain"
- Change is rejected
A2: New Manager in Different Department
- System warns about cross-department reporting
- Allows change with confirmation
Postconditions
- Reporting relationship updated
- Org chart reflects new structure
- Previous manager notified (optional)
- Audit log records change
Business Rules
- No circular reporting chains allowed
- Manager must be active employee in same tenant
- Terminated employees cannot be assigned as managers
UC-EMP-05: Transfer Department
Primary Actor: Tenant Admin
Preconditions
- Tenant Admin is authenticated
- Employee and target department exist
Main Flow
- Tenant Admin navigates to employee profile
- Clicks "Transfer Department"
- Selects new department from list
- Optionally selects new manager (defaults to department head)
- Sets effective date (can be future-dated)
- Adds transfer reason (optional)
- Confirms transfer
Alternative Flows
A1: Future-Dated Transfer
- Transfer scheduled but not yet effective
- Current department shown with "Transferring to X on DATE"
A2: No Manager in New Department
- System warns department has no manager
- Allows transfer, employee reports to no one temporarily
Postconditions
- Employee moved to new department
- Org chart updated
- Historical record of department change preserved
- Notifications sent to old/new managers (optional)
UC-EMP-06: Terminate Employee
Primary Actor: Tenant Admin
Preconditions
- Tenant Admin is authenticated
- Employee is currently active
Main Flow
- Tenant Admin navigates to employee profile
- Clicks "Terminate Employee"
- Enters termination details:
- Last working day
- Termination type (Resignation, Termination, Retirement)
- Reason (optional, internal only)
- Reviews impact:
- Employee will lose system access on last day
- Pending leave requests will be cancelled
- Direct reports will need new manager
- Confirms termination
- System triggers offboarding workflow (if configured)
Alternative Flows
A1: Employee Has Direct Reports
- System lists current direct reports
- Requires reassignment before termination completes
A2: Employee Has Pending Approvals
- System shows pending items assigned to employee
- Requires resolution or reassignment
Postconditions
- Employee status changed to "Terminated"
- Last day recorded
- User access scheduled for deactivation
- Offboarding workflow initiated
- Data retained (soft delete) for compliance
Business Rules
- Terminated employees cannot be managers
- Data is retained, not deleted (soft delete)
- User account is deactivated, not deleted
- Historical records preserved for reporting
UC-EMP-07: View Org Chart
Primary Actor: All users
Preconditions
- User is authenticated
- Employees exist with reporting relationships
Main Flow
- User navigates to Organization → Org Chart
- Views hierarchical tree visualization:
- CEO/top-level at root
- Managers with expandable/collapsible teams
- Employee cards with photo, name, title
- Can interact with org chart:
- Click employee to view profile
- Expand/collapse nodes
- Search by name to locate
- Filter by department
Alternative Flows
A1: No Reporting Structure Defined
- System displays flat list grouped by department
- Prompts admin to set up reporting relationships
A2: Large Organization
- Initial view shows top levels only
- "Show more" to expand deeper levels
- Search to jump directly to an employee
Postconditions
- User has visual understanding of organization structure
- Can navigate to individual profiles
Example Org Chart View
CEO
│
┌────────────┼────────────┐
│ │ │
CTO CFO COO
│ │
┌────┴────┐ Finance
│ │ Team
Dev Mgr QA Mgr
│ │
┌──┴──┐ ┌──┴──┐
Dev Dev QA QAUC-EMP-08: Tenant Admin Adds Custom Fields
Primary Actor: Tenant Admin
Preconditions
- Tenant Admin is authenticated
- Has access to system configuration
Main Flow
- Tenant Admin navigates to Settings → Employee Profile → Custom Fields
- Clicks "Add Custom Field"
- Configures field properties:
- Field Name: e.g., "Uniform Size"
- Field Type: Text, Dropdown, Date, Checkbox, Number
- Options (for Dropdown): e.g., "S, M, L, XL, XXL"
- Required: Yes/No
- Visibility: All, Manager+, Admin only
- Employee Editable: Yes/No
- Section: Which profile section to display in
- Saves custom field
- Field appears on all employee profiles
Alternative Flows
A1: Field Name Conflicts
- System displays "Field name already exists"
- User must choose unique name
A2: Editing Existing Field
- Can change display properties (name, visibility)
- Cannot change field type (would break existing data)
A3: Deleting Field
- System warns about data loss
- On confirmation, field and all values removed
Postconditions
- Custom field added to employee profile schema
- Appears on all employee profiles
- Existing employees have blank value for new field
Custom Field Examples
| Field Name | Type | Options | Visibility | Employee Editable |
|---|---|---|---|---|
| Uniform Size | Dropdown | S, M, L, XL | All | Yes |
| Company Laptop | Text | - | Manager+ | No |
| Mobile Phone | Text | - | Manager+ | No |
| Parking Permit | Checkbox | - | All | No |
| Visa Expiry Date | Date | - | Admin only | No |
| T-Shirt Size | Dropdown | S, M, L, XL | All | Yes |
| Emergency Contact | Text | - | Manager+ | Yes |
UC-EMP-09: Employee Updates Custom Fields
Primary Actor: Employee
Preconditions
- Employee is authenticated
- Custom fields are configured with employee-editable permission
Main Flow
- Employee navigates to own profile
- Views custom fields section
- Identifies editable fields (marked with edit icon)
- Updates values:
- Selects from dropdown
- Enters text
- Checks/unchecks checkbox
- Selects date
- Saves changes
Alternative Flows
A1: Required Field Empty
- System highlights required field
- Must complete before saving
A2: Validation Error
- System shows validation message (e.g., invalid date format)
- User corrects and retries
Postconditions
- Custom field values saved
- Audit log records changes
Business Rules
- Employees can only edit fields marked as employee-editable
- Read-only fields are displayed but cannot be modified
- Admin can override and edit all custom fields
UC-EMP-10: Employee Directory Search
Primary Actor: All users
Preconditions
- User is authenticated
- Employees exist in tenant
Main Flow
- User navigates to Directory
- Views list of all active employees with:
- Photo, name, job title
- Department
- Contact info (email, phone)
- Searches by:
- Name (first, last, or full)
- Department
- Job title
- Tags
- Filters by:
- Department
- Location
- Employment type
- Tags (e.g., "Remote", "Expat")
- Clicks employee to view profile
Alternative Flows
A1: No Search Results
- System displays "No employees found"
- Suggests broadening search criteria
A2: Viewing Terminated Employees
- Toggle to include terminated employees
- Terminated shown with visual indicator
Postconditions
- User finds and can contact colleagues
- Can navigate to full profiles
UC-EMP-11: Tag Employee
Primary Actor: Manager, Tenant Admin
Preconditions
- Actor has permission to assign tags
- Employee profile exists
- Tags are configured for Employee asset type
Main Flow
- Actor navigates to employee profile
- Views Tags section with current tags
- Clicks "Add Tag"
- Selects from available tags:
- Expat
- Remote
- Part-time
- Contractor
- VIP
- Custom tags configured by admin
- Tag is added with visual indicator (color)
- Saves profile
Alternative Flows
A1: Tag Already Applied
- Tag is grayed out in selection
- Can only be removed, not added again
A2: Creating New Tag (if permitted)
- User with create permission can add new tag inline
- New tag saved to tag library
Postconditions
- Tag associated with employee
- Employee appears in tag-based searches
- Audit log records tag assignment
Use Cases for Employee Tags
| Tag | Purpose |
|---|---|
| Expat | Employees on international assignment |
| Remote | Employees working remotely full-time |
| Part-time | Part-time employees |
| Contractor | External contractors |
| VIP | Executives or key employees |
| Intern | Interns and temporary workers |
| Flight Risk | HR-private tag for retention focus |
Summary
| Use Case | Primary Actor | Purpose |
|---|---|---|
| UC-EMP-01 | Admin, Manager | Create new employee profile |
| UC-EMP-02 | Manager | View team dashboard with dual-role support |
| UC-EMP-03 | All users | View/edit employee details by permission |
| UC-EMP-04 | Admin | Change reporting relationships |
| UC-EMP-05 | Admin | Transfer employee between departments |
| UC-EMP-06 | Admin | Terminate employee and trigger offboarding |
| UC-EMP-07 | All users | View organizational hierarchy |
| UC-EMP-08 | Admin | Configure custom profile fields |
| UC-EMP-09 | Employee | Update own custom field values |
| UC-EMP-10 | All users | Search and browse employee directory |
| UC-EMP-11 | Manager, Admin | Assign tags to employees for categorization |
AI Chat Integration
The following employee 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-EMP-01 | employee_create | Yes |
| UC-EMP-04 | employee_transfer | Yes |
| UC-EMP-06 | employee_terminate | Yes |
| UC-EMP-07 | org_explain | No (read-only) |
| UC-EMP-10 | employee_search | No (read-only) |
| UC-EMP-11 | employee_tag | Yes |
UC-EMP-01: Create Employee via AI Chat
Example prompts:
- "Add a new employee named John Smith"
- "Create employee profile for jane@company.com as a Senior Developer"
- "Hire a new frontend developer starting next Monday"
AI Chat Flow:
User: "Add a new developer named Sarah Lee starting January 15"
AI: Shows Confirmation Card
┌─────────────────────────────────────────────┐
│ Create Employee Profile │
│ │
│ Name: Sarah Lee │
│ Email: (to be provided) │
│ Job Title: Developer │
│ Start Date: January 15, 2025 │
│ Department: (to be selected) │
│ │
│ Please provide: │
│ - Work email address │
│ - Department │
│ │
│ [Cancel] [Continue] │
└─────────────────────────────────────────────┘UC-EMP-10: Search Employees via AI Chat
Example prompts:
- "Find all engineers in the product team"
- "Search for employees tagged as remote"
- "Who works in the Marketing department?"
- "Find Sarah in Engineering"
AI Chat Flow:
User: "Find all engineers on the SaaS team"
AI: Shows Search Results
┌─────────────────────────────────────────────┐
│ Search Results: Engineers on SaaS Team │
│ 5 employees found │
│ │
│ 1. John Smith - Senior Developer │
│ Engineering | SaaS Team │
│ │
│ 2. Sarah Johnson - Tech Lead │
│ Engineering | SaaS Team │
│ │
│ 3. Mike Chen - Developer │
│ Engineering | SaaS Team │
│ │
│ [Show More] [View in Directory] │
└─────────────────────────────────────────────┘UC-EMP-06: Terminate Employee via AI Chat
Example prompts:
- "Start offboarding for John Smith"
- "Process resignation for employee leaving March 15"
- "Terminate Sarah with last day Friday"
AI Chat Flow:
User: "Process resignation for Mike, last day is December 31"
AI: Shows Confirmation Card
┌─────────────────────────────────────────────┐
│ Initiate Employee Termination │
│ │
│ Employee: Mike Chen │
│ Reason: Resignation │
│ Last Day: December 31, 2024 │
│ │
│ This will: │
│ - Update employee status to "Departing" │
│ - Start offboarding workflow │
│ - Schedule access revocation │
│ - Notify HR and IT │
│ │
│ [Cancel] [Confirm] │
└─────────────────────────────────────────────┘UC-EMP-11: Tag Employee via AI Chat
Example prompts:
- "Tag John as a senior engineer"
- "Add 'remote' tag to Sarah"
- "Remove 'contractor' tag from Mike"
AI Chat Flow:
User: "Tag Sarah as remote and senior"
AI: Shows Confirmation Card
┌─────────────────────────────────────────────┐
│ Tag Employee │
│ │
│ Employee: Sarah Johnson │
│ Tags to Add: "Remote", "Senior" │
│ │
│ Current Tags: "Engineering", "Full-time" │
│ │
│ [Cancel] [Add Tags] │
└─────────────────────────────────────────────┘Business Rules for AI Chat Employee Actions
| Rule | Description |
|---|---|
| Permission Check | User must have employee management permission |
| Email Validation | AI validates email format and uniqueness |
| Manager Assignment | AI auto-suggests manager based on department |
| Termination Flow | Termination automatically triggers offboarding |
| Audit Trail | All AI-initiated changes logged with AI actor |