# 3.1 Bulk Employee Enrollment

User Type: **Corporate**
Source: *Mi Digital Academy - Education CRM Features Document*

---

## 3.1 Bulk Employee Enrollment

### 3.1.1 CSV/Excel Bulk Import
**What it does:** Lets the admin enroll many employees at once by uploading a CSV or Excel file. The import validates every row and reports exactly what was imported and what failed.

**Sub-features:**
- CSV and Excel (.xlsx) upload
- Template download with column mapping
- Row-level validation (email, name, department)
- Import report: imported, skipped, failed rows
- Duplicate detection by email
- Available on web and mobile
- Import event logging (viewed)
- Audit logging of the bulk import

**Corporate User Journey:**
1. The admin opens Employee Management → Bulk Import.
2. The admin downloads the template and fills it in.
3. The admin uploads the file.
4. The system validates every row.
5. The import report shows imported, skipped, and failed rows with reasons.
6. The admin fixes the failed rows and re-uploads.
7. The admin opens Profile → "Activity" and confirms the import events are recorded.

**Rules & Edge Cases:**
- Files are limited to 10,000 rows per import.
- Rows with invalid emails are failed, never guessed.
- Duplicate emails are skipped and listed in the report.
- A failed import leaves no partial state; it is all-or-nothing per row.
- Import events (viewed) are logged with the account and the timestamp.
- The bulk import is audit-logged with the account and the timestamp.

### 3.1.2 Manual Employee Addition
**What it does:** Lets the admin add a single employee by hand: name, work email, department, and seat. Useful for new joiners who arrive between bulk imports.

**Sub-features:**
- Add-employee form (name, email, department)
- Seat assignment at creation
- Welcome email to the new employee
- Duplicate email check
- Available on web and mobile
- Addition event logging (viewed)
- Audit logging of the manual employee addition

**Corporate User Journey:**
1. The admin opens Employee Management → Add Employee.
2. The admin enters the name, work email, and department.
3. The admin assigns a seat.
4. The system checks the email for duplicates.
5. The employee is created and a welcome email is sent.
6. The admin opens Profile → "Activity" and confirms the addition events are recorded.

**Rules & Edge Cases:**
- The work email must match the verified corporate domain.
- A seat is required at creation; the employee is inactive without one.
- Duplicate emails are rejected.
- Addition events (viewed) are logged with the account and the timestamp.
- The manual employee addition is audit-logged with the account and the timestamp.

### 3.1.3 Enrollment Validation & Error Report
**What it does:** Validates every enrollment (bulk or manual) against the account's seats, domain, and data rules, and produces a downloadable error report the admin can act on.

**Sub-features:**
- Seat availability check per enrollment
- Domain match check
- Required-field validation
- Downloadable error report (CSV)
- Re-run import after fixes
- Available on web and mobile
- Validation event logging (viewed)
- Audit logging of the enrollment validation

**Corporate User Journey:**
1. The admin runs an import or adds an employee.
2. The system validates seats, domain, and required fields.
3. Failures are listed with row number and reason.
4. The admin downloads the error report.
5. The admin fixes the source file and re-runs the import.
6. The admin opens Profile → "Activity" and confirms the validation events are recorded.

**Rules & Edge Cases:**
- Enrollment fails when no seat is available; it never auto-expands the plan.
- The error report contains row number, email, and reason.
- Events (viewed) are logged with the account and the timestamp.
- The enrollment validation is audit-logged with the account and the timestamp.
