The job of this console
Follow the user-guide tab to stand up leave the first time, then use the data-flow tab when a balance or flag does not match what you published.
Everything needed to configure, assign, schedule, apply, and approve leave — plus a technical data-flow tab for debugging. Built from the live Tracopus leave engine (Global Policy Center, balance ledger, accrual jobs, ApprovalAuthority).
Audience: HR admins, managers, and support engineers. Related deep-dives: Leave Configuration · Policies Guide · Runtime Leave Management · Interactive policy simulator
Configure through approve
The one-stop leave guide walks configure, assign, schedule, apply, and approve — with a technical data-flow tab for debugging — built from the live leave engine, not a parallel product story.
/people/leaves
HR Admin · Manager · support engineer
Follow the user-guide tab to stand up leave the first time, then use the data-flow tab when a balance or flag does not match what you published.
HR and support. Employees should use Leave management how-to for apply/approve only.
Walk sections in order on the guide tab. Switch to data-flow when an accrual job, flag, or approval path misbehaves. Deep-dive pages still own legal calendars, documents, and test lab.
Greenfield leave. A production incident on balances. Training. After enabling Global Policy Center over classic types.
Tip: use the chips above to jump. Printing this page includes both tabs.
/people/leaves). HR admins configure first under Admin → Leave admin and Admin → Employee leave config. If the menu is missing, flags or role modules are off (see §3).Use an account on a team where leave is enabled.
Direct URL: /people/leaves (legacy /hrms/leaves redirects here).
Balance cards show PL/CL/SL (and specials). Empty cards usually mean opening balances were never imported and accrual has not run yet — not a UI bug.
Use Apply leave / create drawer: pick type, dates, half-day if needed, notes/docs, then submit.
flowchart LR
A[App Config flags] --> B[Publish policy]
B --> C[Holidays + working days]
C --> D[Opening balances / accrual]
D --> E[Employee applies]
E --> F[Manager / delegate approves]
F --> G[Balance debit + timesheet + attendance]
Path: Admin → Application configuration → select the org unit / team → HRMS / Modules / role templates.
leaveAdditional)| Flag | Purpose | Typical go-live |
|---|---|---|
leaveManagementEnabled | Master switch — APIs and jobs fail closed when off | Required |
globalLeavePoliciesEnabled | Global Policy Center runtime | Required (preferred) |
leaveEnhancementsEnabled | Extended leave UX (impact drawer, etc.) | Optional |
leaveAutoSyncToAttendance | Approved leave → attendance LEAVE / HALF_DAY | Usually on |
leaveBlockNonWorkingDayLeave | Reject ranges with no working days | Usually on |
leaveBlockOverlapRegardlessOfType | Reject overlapping leave dates | Usually on |
leaveAllowNegativeBalance | Allow submit below available balance | Usually off |
approvalDelegation.approvalDelegationEnabled | Delegates can approve leave | As needed |
peopleModules.leavesEnabled — shows People → Leave managementpeopleModules.holidaysEnabled — People → HolidaysadminModules.leavePoliciesEnabled — classic policies + Employee leave configadminModules.globalLeavePoliciesEnabled — Global Policy Center, Test Lab, legal calendars, working-day rulesapproveTeamEnabled — required for approve actionsuniversalApprovalInboxEnabled — leave in /workspace/approvalsMenu rule: UI needs org leaveManagementEnabled and role peopleModules.leavesEnabled. APIs gate on the org flag only.
| What you update | Where | Route |
|---|---|---|
| Type entitlements, accrual, CF, specials | Global Policy Center → policy version | /admin/leave/global-policy-center |
| Leave type catalog (classic fallback) | Leave policies | /admin/leave-policies |
| Per-employee balances / OB import | Employee leave config | /admin/employee-leave-config |
| Official holidays | Legal calendars + People holidays | /admin/leave/legal-calendars, /people/holidays |
| Weekly offs | Working day rules | /admin/leave/working-day-rules |
| Pre-publish dry-run scenarios | Policy Test Lab / Simulator | /admin/leave/policy-test-lab |
| Approval coverage when manager away | Delegation | /admin/delegation |
| Org / role flags | Application Config | /admin/application-config |
Primary console: Admin → Leave admin → Global Policy Center.
Examples: IN, IN-KA, IN-MH, AE. Used for resolve, holiday calendars, and working-day scope.
Choose CFA-IN-KA, CFA-IN-MH, CFA-IN-HR, CFA-IN-TN-CBE, or a blank draft. Edit entitlements, accrual, carry-forward, and special-leave JSON while unpublished.
Dry-run resolve for a sample employee. Lab scenarios may gate publish. Open /admin/leave/policy-test-lab.
Key must match People → Holidays location keys (e.g. IN-KA).
Team default, jurisdiction pattern (e.g. Mon–Fri or Sun–Thu), or employee override.
Published versions are immutable. To change rules later, clone a new draft and publish again. Publish activates accrual eligibility — it does not create balances.
flowchart TD
J[Jurisdiction] --> T[Apply template]
T --> D[Edit draft version]
D --> S[Simulate / Test Lab]
S --> H[Holiday key + WDR]
H --> P[Publish]
P --> R[Accrual + eligibility live]
APIs (for automation / support): jurisdictions POST /api/v2/leave/global/jurisdictions · apply template POST /api/v2/leave/global/templates/{id}/apply · simulate POST /api/v2/leave/global/simulate · publish POST /api/v2/leave/global/versions/{versionId}/publish.
PL means Privilege Leave (earned) — not paternity. Paternity is PATERNITY.
| Code | Name | How to configure | Key runtime rules | Status |
|---|---|---|---|---|
PL | Privilege Leave | GLP version entitlements + monthly accrual; CF max in rules | Fiscal Apr–Mar; CF max 45; excess LAPSE (or ENCASH if re-published) |
Shipped |
CL | Casual Leave | Location pack entitlements (MH/HR/TN); no CF | Lapses at fiscal year end; not in KA pack | Shipped |
SL | Sick Leave | Location pack (KA/HR/TN); document rules for medical proof | Medical certificate when ≥3 days; no CF | Shipped |
MATERNITY | Maternity | specialLeave[] in published GLP; FE child # maps days |
Female; min 80 service days; 182/182/84/84; proof; auto end from start | Shipped |
PATERNITY | Paternity | Special leave rules in GLP | Male; 5 consecutive days; window 7 days before or 45 after event | Shipped |
MSL | Milestone Leave | Tenure grant rules in GLP | Grant at 5/10/15/20y; 5-day block; partial use forfeits remainder | Shipped |
WWL | Wellness Leave | KA female special in CFA-IN-KA | 1 day/month; ±3 day apply window; lapses last working day of month | Shipped |
COMPOFF | Compensatory Off | Comp-off policy + attendance credit coupling | Weekend/statutory ≥6h or weekday >15h; expire 90 days | Shipped |
FLOATING | Floating Holiday | Floating catalogue + calendar-year budget | Employee picks published option; Jan renew credits entitlement | Shipped |
UNPAID / UL | Unpaid / LOP | Catalog type; LOP coupling where enabled | No entitlement balance required in typical setups | Shipped |
ADOPTION / MISCARRIAGE | Special stubs | Catalog only until HR confirms days | Entitlement days TBD | Stub |
Leave requests always go through approval — even when attendance auto-approves for some bands.
Earned leave uses fiscal Apr–Mar. Floating holiday budget uses calendar Jan–Dec.
Create/submit recalculate numberOfDays from working week + holidays. Half-day = 0.5.
If Global Leave is off, use /admin/leave-policies type catalog; accrual falls back to classic policy.
Production prefill: migration 09-cfa-leave-india-production-prefill.sql. Resolve uses employee work location / jurisdiction.
| Pack | Location | PL | CL | SL | Notes |
|---|---|---|---|---|---|
CFA-IN-KA | Karnataka (Bengaluru) | 18 | — | 12 | WWL (female KA); +1 mandatory PH vs other states |
CFA-IN-MH | Maharashtra (Mumbai) | 18 | 7 | — | Specials + COMPOFF + FLOATING |
CFA-IN-HR | Haryana (Gurugram) | 18 | 8 | 8 | Specials + COMPOFF + FLOATING |
CFA-IN-TN-CBE | Tamil Nadu (Coimbatore) | 12 | 12 | 12 | Lower PL vs other India packs |
Shared: MATERNITY / PATERNITY / MSL / COMPOFF / FLOATING; PL CF max 45 with excess LAPSE by default.
["IN-KA"]).
flowchart TD
L[Leave create / submit] --> R[LeaveWorkingDayResolver]
R --> O{Employee WDR override?}
O -->|Yes| P[Resolved workdays]
O -->|No| J{Employee jurisdiction?}
J -->|Yes| JW[Jurisdiction WDR]
JW --> P
J -->|No| TW[Team-default WDR]
TW -->|Hit| P
TW -->|Miss| FB[Work schedule / shift / Mon-Fri]
FB --> P
Canonical page: Admin → Employee leave config (/admin/employee-leave-config).
entitlementAmount and amount start blank — fill from ZingHR / HR export only.POST /api/v2/admin/data-import/leave-balance?userTeamId={team}&actorId={you}&dryRun=true
Body may also include "dryRun": true (query wins). Dry-run validates only — no writes. Fix failures from reportCsv / results[].
dryRun=false only after dry-run is clean.userTeamId, employeeId, empCode, location, suggestedPack, leaveTypeCode, leaveTypeId, entitlementAmount, amount, comment
Aliases accepted: PAT→PATERNITY, MAT→MATERNITY, COFF→COMPOFF.
flowchart TD
AP[Published policy] --> AJ[LEAVE_ACCRUAL job]
AJ --> BL1[Ledger credit ACCRUAL]
HR[OB import / Adjust] --> BL2[Ledger ADJUST_HR]
BL1 --> UI[Visible on Leave Management]
BL2 --> UI
“Assigned” means each active employee has: (1) a resolved published policy / jurisdiction, (2) leave type balances on the ledger, (3) correct holiday + working-day resolution.
LEAVE_ACCRUAL once entitlement rules apply.leaveAllowNegativeBalance is on).Jobs live in fs_schedule_model. Enable via production migration 11-cfa-leave-schedules-enable.sql. Manual run (ops): POST /api/v2/admin/jobs/{scheduleType}/run?userTeamId=.
| Schedule | When | What it does | How policy is picked |
|---|---|---|---|
LEAVE_ACCRUAL |
1st of month 06:000 0 6 1 * ? |
Credits entitlements; idempotent ledger rows with periodKey=yyyy-MM (MSL uses tenure keys) |
Per employee: resolved published GLP → team published → classic ts_leave_policy_model |
LEAVE_CARRY_FORWARD |
Daily 05:300 30 5 * * ? |
CF caps, fiscal/calendar/LWD lapse from rules_json; optional ENCASH staging; also alerts missed accrual (days 1–3) |
Published GLP carryForward / lapseOn / excessAction |
COMP_OFF_EXPIRE |
Daily 07:000 0 7 * * ? |
Expire unused compensatory off (90-day rule) → encash staging | Comp-off policies / ledger; also piggybacked from ACCRUAL when dedicated row missing |
LEAVE_PROMOTION_RETRY |
Every 15 min (often off until needed) | Retry failed TaskActivity promotion after approve | Approved leaves with failed promotionStatus |
APPROVAL_SLA_REMINDER |
Daily 09:00 | Remind pending leave (and other domains) | SUBMITTED leave in scope |
If leaveManagementEnabled is false, jobs exit as SKIPPED. Check last run status on the schedule row and the accrual-source banner in Global Policy Center.
Floating: you must pick a published catalogue option. Maternity: child number maps duration. Comp-off: uses credited bank entries with expiry.
flowchart TD
C[CREATE draft] --> S[SUBMIT]
S --> H[Reserve PENDING_HOLD]
H --> N[Notify approver]
N --> D{Approve or Reject?}
D -->|Approve| A[Debit DEBIT_APPROVE]
A --> P[Promote TaskActivity LEAVE]
P --> T[Optional attendance sync]
D -->|Reject| R[Release hold + comment]
approveTeamEnabled — via ApprovalAuthorityService.canAct(..., LEAVE).LEAVE./workspace/approvals) when universal inbox is enabled.promotionStatus, GET /api/v2/leaves/.../promotion-failures, and schedule LEAVE_PROMOTION_RETRY. Manual: POST /api/v2/leaves/{id}/promote.Check items locally in the browser (saved only on this device).
| Symptom | Likely cause | Fix |
|---|---|---|
| Leave menu missing | Role peopleModules.leavesEnabled off | Enable role module; refresh session |
| 403 on leave APIs | leaveManagementEnabled false | App Config org flag |
| Zero balances after publish | Publish does not invent OB | Import / Adjust / wait for ACCRUAL |
| Day count includes holiday | Calendar key mismatch / WDR missing | Align holiday keys + working-day rules |
| Cannot approve | Not manager/delegate or approveTeamEnabled off | Check ApprovalAuthority + delegation scope LEAVE |
| Approved but missing on timesheet | Promotion failed | promotion-failures + LEAVE_PROMOTION_RETRY |
| Attendance not updated | leaveAutoSyncToAttendance false | Enable org flag |
| Wrong type for paternity | Using PL | Use PATERNITY |
| Import dry-run fails | Bad emp / leave type codes | Fix from reportCsv |
Leave is not an independent business store. It sources Employee, leave types, published policy versions, holidays, working-day rules, and promotes into TaskActivity (timesheet). Balances are written only through LeaveBalanceEngine.
flowchart TB
subgraph Config
AC[App Config flags]
GLP[ts_leave_policy_version rules_json]
HOL[People holidays]
WDR[Working day rules]
end
subgraph Runtime
REQ[fs_emp_leave_master_model]
BAL[ts_employee_leave_balance_model]
LED[ts_leave_balance_ledger_model]
end
subgraph Downstream
TA[TaskActivity LEAVE]
ATT[Attendance LEAVE / HALF_DAY]
end
AC --> REQ
GLP --> REQ
HOL --> REQ
WDR --> REQ
REQ --> LED
LED --> BAL
REQ -->|approve| TA
REQ -->|sync| ATT
JOBS[LEAVE_ACCRUAL / CF / COMP_OFF] --> LED
sequenceDiagram
participant Emp as Employee UI
participant API as Leave APIs
participant Eng as LeaveBalanceEngine
participant Auth as ApprovalAuthority
participant Prom as LeavePromotionService
Emp->>API: POST /leaves (CREATE)
Emp->>API: PATCH /leaves/{id}/submit
API->>API: overlap + WDR + specials + docs
API->>Eng: reserveOnSubmit (PENDING_HOLD)
API-->>Emp: SUBMITTED + notify
Note over Auth: Manager / delegate
Auth->>API: PATCH /approve or /reject
alt Approve
API->>Eng: DEBIT_APPROVE
API->>Prom: promote TaskActivity
Prom-->>API: optional attendance sync
else Reject
API->>Eng: PENDING_RELEASE
end
| Step | API | Ledger / side effect |
|---|---|---|
| Create | POST /api/v2/leaves | Draft row in fs_emp_leave_master_model |
| Submit | PATCH .../submit | PENDING_HOLD; notify LEAVE_PENDING_APPROVAL |
| Approve | PATCH .../approve?approverId= | DEBIT_APPROVE; promote; attendance sync if flagged |
| Reject | PATCH .../reject | PENDING_RELEASE; comment required |
| Cancel | cancel path | CREDIT_CANCEL + reverse promote |
flowchart TD
CRON[fs_schedule_model tick] --> GATE{leaveManagementEnabled?}
GATE -->|No| SKIP[SKIPPED]
GATE -->|Yes| TYPE{Schedule type}
TYPE -->|LEAVE_ACCRUAL| RES[Resolve published GLP per employee]
RES --> CRED[Ledger ACCRUAL periodKey=yyyy-MM]
TYPE -->|LEAVE_CARRY_FORWARD| CF[Apply CF / lapse / ENCASH from rules_json]
TYPE -->|COMP_OFF_EXPIRE| CO[Expire unused COMPOFF bank]
CRED --> BAL[ts_employee_leave_balance_model]
CF --> BAL
CO --> BAL
ts_leave_policy_model.periodKey does not double-credit.LEAVE_ACCRUAL_MISSED when the 1st-of-month job did not run.GET /api/v2/leave/global/accrual-source?userTeamId= and GET .../resolve?userTeamId=&employeeId=.| Table | Role |
|---|---|
fs_emp_leave_master_model | Leave request / workflow states |
fs_schedule_model | LEAVE_ACCRUAL, LEAVE_CARRY_FORWARD, COMP_OFF_EXPIRE, … |
fs_app_config_model | Org App Config including leaveAdditional |
| Table | Role |
|---|---|
ts_leave_type_model | Leave type catalog |
ts_leave_policy_model | Classic accrual fallback |
ts_employee_leave_balance_model | Current balances |
ts_leave_balance_ledger_model | ACCRUAL, PENDING_HOLD, DEBIT_APPROVE, ADJUST_HR, … |
ts_leave_audit_event_model | Leave audit events |
Includes ts_leave_jurisdiction, ts_leave_policy_template, ts_leave_global_policy, ts_leave_policy_version (rules_json), holiday calendar assignment, work schedule policy, employee overrides, policy resolution, simulation / test-lab / audit tables.
| Concern | Endpoint |
|---|---|
| Publish policy version | POST /api/v2/leave/global/versions/{versionId}/publish |
| Simulate resolve | POST /api/v2/leave/global/simulate |
| Resolve employee policy | GET /api/v2/leave/global/resolve?userTeamId=&employeeId= |
| Accrual source banner | GET /api/v2/leave/global/accrual-source?userTeamId= |
| OB import (dry-run/live) | POST /api/v2/admin/data-import/leave-balance |
| Adjust balance | POST /api/v2/leaves/balances/adjust |
| Balances / ledger | GET /api/v2/leaves/balances, .../ledger |
| Create / submit / decide | POST /api/v2/leaves, .../submit, .../approve|reject |
| Run job now | POST /api/v2/admin/jobs/{scheduleType}/run?userTeamId= |
| Promotion retry | POST /api/v2/leaves/{id}/promote |
leaveAdditional + role modules for the exact team under test.ApprovalAuthorityService.canAct for LEAVE; check delegation scopes.fs_schedule_model enabled + last_run; manually run ACCRUAL for a test team if safe.ts_leave_balance_ledger_model over guessing from UI cards when balances look wrong. Every HR adjust, hold, debit, accrual, and cancel should leave a typed ledger event.