# Onboarding Mandatory Training

When HR creates an **Employee Onboarding** record in Smooth HR, Smooth LMS automatically enrolls the linked employee in every **published** course marked **Is Mandatory**. The integration also creates **LMS Training Assignment** rows with a default **30-day due date**, giving HR and managers a trackable deadline separate from raw enrollment progress.

This connects the [Onboarding module](https://smoothhiring.com/help/hrms/onboarding/overview)—templates, portal tasks, document capture—to your corporate learning library without duplicate data entry. It complements (does not replace) [Employee Compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance) tracking for regulatory renewals; see [Compliance Vs Lms Certificates](https://smoothhiring.com/help/lms/hrms-integration/compliance-vs-lms-certificates) for how completion proof moves into HR.

> **Help URL:** [Onboarding Mandatory Training](https://smoothhiring.com/help/lms/hrms-integration/onboarding-mandatory-training)

> **Related HR workflow:** [Employee Onboarding](https://smoothhiring.com/help/hrms/onboarding/employee-onboarding), [Onboarding Templates](https://smoothhiring.com/help/hrms/onboarding/onboarding-templates)

---

## Table of Contents

1. [Overview](/#overview)
2. [Trigger and timing](/#trigger-and-timing)
3. [Which courses are enrolled](/#which-courses-are-enrolled)
4. [LMS Enrollment vs Training Assignment](/#lms-enrollment-vs-training-assignment)
5. [Configure mandatory courses](/#configure-mandatory-courses)
6. [End-to-end onboarding + training workflow](/#end-to-end-onboarding--training-workflow)
7. [Employee experience](/#employee-experience)
8. [HR monitoring](/#hr-monitoring)
9. [Due dates and overdue handling](/#due-dates-and-overdue-handling)
10. [Troubleshooting](/#troubleshooting)
11. [Related guides](/#related-guides)

---

## Overview

| Component | Record | Purpose |
|-----------|---------|---------|
| HR trigger | **Employee Onboarding** | Starts pre-boarding; links to **Employee** |
| Course flag | **LMS Course** → **Is Mandatory** | Defines auto-enroll set |
| Learner access | **LMS Enrollment** | Portal progress tracking |
| HR deadline | **LMS Training Assignment** | Due date, status, assigner audit |

Hook: `on_onboarding_created` (`after_insert` on **Employee Onboarding**).

Prerequisites:

1. Employee exists with **User ID** ([Employee Auto Provisioning](https://smoothhiring.com/help/lms/hrms-integration/employee-auto-provisioning)).
2. At least one **LMS Course** is **Published** + **Is Mandatory**.
3. Smooth LMS enabled on the same account as Smooth HR ([Overview](https://smoothhiring.com/help/lms/hrms-integration/overview)).

---

## Trigger and timing

The hook runs on **Employee Onboarding** `after_insert`—typically when HR submits onboarding from a [template](https://smoothhiring.com/help/hrms/onboarding/onboarding-templates) after offer acceptance.

It does **not** run when:

- Onboarding is merely updated (tasks completed in portal).
- Employee is created without an onboarding record.
- Onboarding exists but Employee lacks `user_id`.

**Best practice:** Create Employee (with User) first, then Employee Onboarding—or use template workflow that creates both in correct order. Misordered steps cause silent skips.

If mandatory training must start **before** Day 1 (pre-boarding), ensure onboarding record is created early enough; portal users see HR tasks at [Onboarding Portal](https://smoothhiring.com/help/hrms/onboarding/onboarding-portal) and LMS courses at `/lms` in parallel.

---

## Which courses are enrolled

Query logic (simplified):

```
mandatory_courses = all LMS Course where published=1 AND is_mandatory=1
for each course:
  if no LMS Enrollment for (user, course): create enrollment
  if LMS Training Assignment record exists: create assignment, due = today + 30 days
```

| Filter | Effect |
|--------|--------|
| **Published** | Draft courses never auto-enroll |
| **Is Mandatory** | Only flagged courses |
| Department / designation on Employee | **Not filtered today** — all mandatory courses enroll globally |

If you need department-specific mandatory sets, use separate non-mandatory assignments via [Assign Training From Hr](https://smoothhiring.com/help/lms/hrms-integration/assign-training-from-hr) or cohort **LMS Batch** enrollment until custom filtering is implemented.

Optional course fields:

- **Validity Days** — certificate validity (LMS-side).
- **Enable Certification** — issues **LMS Certificate** on completion.

---

## LMS Enrollment vs Training Assignment

| Aspect | LMS Enrollment | LMS Training Assignment |
|--------|----------------|-------------------------|
| Created by hook | Yes | Yes (if training assignments are enabled) |
| Tracks progress % | Yes | Reads enrollment progress |
| Due date | No | Yes (default +30 days) |
| Status | Progress field | Pending / In Progress / Completed / Overdue |
| HR audit **Assigned By** | No | Yes (`frappe.session.user` at onboarding insert) |

Enrollments alone suffice for learning; assignments add **operational accountability** for HR dashboards and `get_my_training_assignments` API on the learner home.

Scheduled jobs on **LMS Training Assignment** mark overdue rows and send reminders—pair with HR compliance alerts from [Employee Compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance) for a complete picture.

---

## Configure mandatory courses

1. Open **LMS Course** from `/desk/learning` or `/app/lms-course`.
2. Build chapters, lessons, quizzes (internal SOP content).
3. Check **Published**.
4. Check **Is Mandatory** for corporate-wide requirements (harassment, security awareness, code of conduct).
5. Save.

Repeat for each baseline course. Avoid marking long elective libraries as mandatory—learners receive **every** mandatory course at onboarding.

Coordinate with [Documents & Compliance](https://smoothhiring.com/help/hrms/documents-compliance/overview) owners: policy **signatures** may still use [Signature Templates](https://smoothhiring.com/help/hrms/documents-compliance/signature-templates) while **training evidence** lives in LMS.

---

## End-to-end onboarding + training workflow

1. **Recruit** — [Job Opening](https://smoothhiring.com/help/hrms/recruitment/overview) → Applicant → Offer.
2. **Template** — HR picks [Onboarding Template](https://smoothhiring.com/help/hrms/onboarding/onboarding-templates) with required documents.
3. **Employee Onboarding** — HR creates record; hook enrolls LMS courses.
4. **Portal** — New hire completes uploads/e-sign at [Onboarding Portal](https://smoothhiring.com/help/hrms/onboarding/onboarding-portal).
5. **LMS** — Same user logs into `/lms`; mandatory courses appear on dashboard.
6. **Completion** — Learner finishes quizzes; **LMS Certificate** generated if enabled.
7. **HR file** — HR attaches certificate to [Employee Document](https://smoothhiring.com/help/hrms/documents-compliance/employee-documents) and marks [Employee Compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance) Complete ([Compliance Vs Lms Certificates](https://smoothhiring.com/help/lms/hrms-integration/compliance-vs-lms-certificates)).

---

## Employee experience

After provisioning ([Employee Auto Provisioning](https://smoothhiring.com/help/lms/hrms-integration/employee-auto-provisioning)):

- Login email matches **User** on Employee record.
- `/lms` home shows assigned courses and progress bars.
- **My training assignments** widget (when enabled) lists due dates from hook-created rows.
- Live cohort sessions ([Live Classes](https://smoothhiring.com/help/lms/live-classes/overview)) appear only if separately enrolled in a batch.

Communicate in welcome email: HR paperwork ≠ LMS training—two portals, one login.

---

## HR monitoring

| View | Location |
|------|----------|
| Onboarding task status | `/app/employee-onboarding` |
| LMS assignment list | `/app/lms-training-assignment` |
| Team training API | `get_team_training_status` (Moderator/HR Manager) |
| Compliance expiry | `/app/employee-compliance` |

Cross-check onboarding completion with LMS **Overdue** assignments before confirming start date in [People](https://smoothhiring.com/help/hrms/people/overview).

---

## Due dates and overdue handling

Default **due_date = today + 30 days** at onboarding creation. Adjust policy:

- Shorten for safety-critical roles via manual reassignment.
- Extend by editing **LMS Training Assignment** due date before status flips **Overdue**.

Assignment scheduler:

- Marks **Overdue** when due date passed and not completed.
- Sends reminder emails when configured.

This is LMS operational tracking—not the same as **Next Renewal Date** on Employee Compliance. Annual re-training requires new assignment or compliance renewal workflow.

---

## Troubleshooting

| Issue | Resolution |
|-------|------------|
| Zero enrollments after onboarding | Publish mandatory courses; verify Employee.user_id |
| Duplicate assignments | Hook skips existing enrollments; safe |
| Wrong course set | Review Is Mandatory flags on all courses |
| Learner sees courses but HR sees no compliance | Complete handoff per [Compliance Vs Lms Certificates](https://smoothhiring.com/help/lms/hrms-integration/compliance-vs-lms-certificates) |
| Need dept-specific mandatory | Use [Assign Training From Hr](https://smoothhiring.com/help/lms/hrms-integration/assign-training-from-hr) post-onboarding |

---

## Related guides

- [Integration Overview](https://smoothhiring.com/help/lms/hrms-integration/overview)
- [Employee Auto-Provisioning](https://smoothhiring.com/help/lms/hrms-integration/employee-auto-provisioning)
- [Compliance vs LMS Certificates](https://smoothhiring.com/help/lms/hrms-integration/compliance-vs-lms-certificates)
- [Assign Training from HR](https://smoothhiring.com/help/lms/hrms-integration/assign-training-from-hr)
- [Onboarding Overview](https://smoothhiring.com/help/hrms/onboarding/overview)
- [Onboarding Templates](https://smoothhiring.com/help/hrms/onboarding/onboarding-templates)
- [Employee Onboarding](https://smoothhiring.com/help/hrms/onboarding/employee-onboarding)
- [Onboarding Portal](https://smoothhiring.com/help/hrms/onboarding/onboarding-portal)
- [Employee Compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance)
- [Employee Documents](https://smoothhiring.com/help/hrms/documents-compliance/employee-documents)
- [LMS Settings](https://smoothhiring.com/help/lms/settings/lms-settings-general)

---

_Last updated: May 2026_

---

## Template design patterns for HR

When authoring [Onboarding Templates](https://smoothhiring.com/help/hrms/onboarding/onboarding-templates), mirror LMS mandatory course titles in task labels—for example task "Complete Security Awareness in Learning Portal" links mentally to the LMS course card. Avoid duplicating full training content inside template HTML; LMS remains authoritative for assessments.

Use **Required Documents** for [policy signatures](https://smoothhiring.com/help/hrms/documents-compliance/signature-templates) and LMS for measurable quizzes. A signed handbook row in [Employee Compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance) does not prove quiz mastery; both may be required for SOX or safety programs.

Sequence tasks so **Create Employee** (or implicit employee link) occurs before tasks that say "complete training"—otherwise learners lack `/lms` access despite portal visibility.

For executives with accelerated onboarding, maintain a variant template with fewer HR tasks but same LMS mandatory set—hook still enrolls all `is_mandatory` courses globally.

---

## Metrics and KPIs

Track jointly between HR and L&D:

| KPI | LMS source | HR source |
|-----|------------|-----------|
| Time-to-first-login | User last login | — |
| Mandatory completion ≤ 30 days | Assignment status | — |
| Onboarding portal % complete | — | Employee Onboarding tasks |
| Compliance file complete | Certificate attach | Employee Compliance status |
| Overdue training | Assignment Overdue | Escalation tickets |

Review monthly with [Performance](https://smoothhiring.com/help/hrms/performance/overview) leadership where training completion is a probation success criterion.

---

## Edge cases

**Interns and contractors:** If treated as Employee in HR, hook applies. If only User without Employee, onboarding hook never runs—use [Assign Training From Hr](https://smoothhiring.com/help/lms/hrms-integration/assign-training-from-hr).

**Re-onboarding after leave:** New Employee Onboarding record enrolls again; LMS skips duplicate enrollments but may create new assignments if prior completed—verify assignment dedup logic.

**Unpublished course mid-onboarding:** If L&D unpublishes a mandatory course after enrollments, learners retain enrollment but new hires won't receive it—communicate course lifecycle with HR.

**Multiple onboarding records:** Each insert re-runs hook; duplicates prevented at enrollment layer.

---

## Administrator notes

Hook commits explicitly (`frappe.db.commit()`) after enrollments so portal sees courses immediately—important for same-day [portal](https://smoothhiring.com/help/hrms/onboarding/onboarding-portal) sessions.

Session user at onboarding creation becomes **Assigned By** on training assignments—typically HR coordinator, auditable alongside [Employee Onboarding](https://smoothhiring.com/help/hrms/onboarding/employee-onboarding) owner field.

Department and designation variables are read in hook source for future filtering but currently unused—document for customizers extending `hrms_integration.py`.

---

## Stakeholder RACI for onboarding training

| Activity | HR Coordinator | L&D Moderator | Hiring Manager | New Hire |
|----------|------------------|---------------|----------------|----------|
| Create Employee Onboarding | R/A | C | I | I |
| Publish mandatory LMS courses | I | R/A | I | I |
| Auto-enrollment (system) | I | I | I | R (consumes) |
| Verify portal + LMS access | R | C | I | R |
| Mark HR compliance Complete | R/A | C | I | I |

R = Responsible, A = Accountable, C = Consulted, I = Informed. Aligns with [Onboarding Overview](https://smoothhiring.com/help/hrms/onboarding/overview) governance and [integration overview](https://smoothhiring.com/help/lms/hrms-integration/overview).

---

---

## Smooth HR (HRMS)

| Guide | Link |
|-------|------|
| HR help home | [smoothhiring.com/help/hrms](https://smoothhiring.com/help/hrms) |
| Employee records | [hrms/people/employee-records](https://smoothhiring.com/help/hrms/people/employee-records) |
| Onboarding overview | [hrms/onboarding/overview](https://smoothhiring.com/help/hrms/onboarding/overview) |
| Onboarding templates | [hrms/onboarding/onboarding-templates](https://smoothhiring.com/help/hrms/onboarding/onboarding-templates) |
| Employee onboarding | [hrms/onboarding/employee-onboarding](https://smoothhiring.com/help/hrms/onboarding/employee-onboarding) |
| Documents & compliance | [hrms/documents-compliance/overview](https://smoothhiring.com/help/hrms/documents-compliance/overview) |
| Employee compliance | [hrms/documents-compliance/employee-compliance](https://smoothhiring.com/help/hrms/documents-compliance/employee-compliance) |
| Signature templates | [hrms/documents-compliance/signature-templates](https://smoothhiring.com/help/hrms/documents-compliance/signature-templates) |
