People, Policy engine

HR Policy
Templates

Configurable policy records drive leave eligibility, probation auto-confirm, late coming, overtime, and payroll factors. Multiple active policies per category are allowed; priority and effective dates resolve which rule applies.

Policy categories

Categories include leave, late_coming, overtime, attendance, payroll, security_deposit, employment_lifecycle, and other. Each stores JSON config validated by the HR policy service.

Leave eligibility

Leave policies can restrict employment types, probation status, and accrual rules. Entitlements and accrual runs respect active leave policies when calculating balances.

Leave HOD → HR stepper

Leave requests use manager_status then hr_status. HOD approves with leave:approve-manager; HR completes with leave:approve-hr. Overall status becomes approved only after both steps.

Probation auto-confirm

employment_lifecycle policies can auto-confirm probation staff as permanent when probation ends, with optional HR notify-before-days. Scheduler applies active policies overnight.

Technical Architecture

FieldTypeInstitutional Role
codeVarcharUnique policy code for templates and imports.
categoryVarcharleave | late_coming | employment_lifecycle | …
configJSONBCategory-specific rules (eligibility, probation months, auto-confirm).
managerStatusVarcharLeave HOD step: pending | approved | rejected.
hrStatusVarcharLeave HR step after HOD approval.

Note: Sensitive fields use AES-256 field-level encryption where applicable.

Governance & Power

hr:policy:view
hr:policy:create
hr:policy:edit
hr:policy:activate
leave:approve-manager
leave:approve-hr

Related: HR lifecycle · Attendance & leave