Phase 4 – Employee Master Upload
The Employee Master Upload is the fourth and final phase of the CMS Data Loader workflow. This phase enables administrators to bulk-create employees, assign roles, map departments and designations, and configure jurisdiction boundaries for a given tenant.
The upload process follows the same structured validation model as previous phases:
HRMS API-Level Validation (Backend Service)
This ensures that only accurate, complete, and compliant employee data is inserted into the system.
1. Employee Master Template Overview
The Employee Master Template consists of a single worksheet containing the employee profile, role assignments, and jurisdiction configuration. All mandatory fields must be completed before upload. Optional fields are assigned system defaults if left empty.
Employee Master Template – Column Definitions
User Name*
Full name of the employee
Yes
John Doe
Text (A–Z, spaces)
Mobile Number*
Unique 10-digit mobile number
Yes
9876543210
Numeric (10 digits)
Password
Login password (default applied if empty)
No
MyPass@123
Text (≥8 chars)
Department Name*
Must match Department from Phase-3
Yes
WATER DEPARTMENT
Text (Dropdown)
Designation Name*
Must belong to Department
Yes
engineer
Text (Dropdown)
Role Names (comma-separated)*
Valid system role codes
Yes
GRO,EMPLOYEE
Text (multi-select)
Gender
Male/Female/Other
No
Male
Dropdown
Employee Status
Employment status
No
EMPLOYED
Dropdown
Employee Type
Type of employee
No
PERMANENT
Dropdown
Assignment From Date*
Start date of assignment
Yes
05-09-2024
Date (DD-MM-YYYY)
Date of Appointment*
Joining date
Yes
20-06-2024
Date (DD-MM-YYYY)
Hierarchy Type
Admin hierarchy type
No
ADMIN
Text
Boundary Type
Boundary type for jurisdiction
No
City
Text
Boundary Code
Boundary code assigned
No
PG.CITYA
Text
System-Generated Fields (Not Present in Excel)
The loader automatically generates:
Employee Code
Name converted to uppercase, spaces → underscores
JOHN_DOE
Tenant ID
Taken from upload session
pg.citya
User UUID
Generated by HRMS
1fda5623-448a-...
User Type
Always "EMPLOYEE"
EMPLOYEE
Active Flag
Always true
true
OTP Reference
System default
12345
2. Dynamic Template Generation (Jupyter Notebook)
The Data Loader provides a dynamic template generator to eliminate manual errors.
Steps in the Notebook
The Administrator enters the Target Tenant ID (e.g., pg.citya).
Notebook fetches:
Departments from MDMS
Designations from MDMS
Roles from MDMS
Boundary hierarchy from Boundary Service
The system generates a pre-validated Excel with dropdowns.
Template is saved as: templates/Employee_Master_Dynamic_<tenant>.xlsx
This ensures the template always aligns with the latest MDMS configuration.
3. Filling the Employee Master Template
Mandatory Fields – Validation Rules
User Name
Text only; no symbols except spaces
Mobile Number
10 digits; must be unique
Department Name
Must match Phase 3 (case-sensitive)
Designation Name
Must belong to selected department
Role Names
Comma-separated; valid codes only
Dates
Format: DD-MM-YYYY
Optional Fields – Default Values
Password
eGov@123
Employee Status
EMPLOYED
Employee Type
PERMANENT
Hierarchy Type
ADMIN
Boundary Type
City
Boundary Code
Tenant code
4. Validation Layers
4.1 HRMS API-Level Validation
API endpoint: POST /egov-hrms/employees/_create
Validations include:
Mobile number uniqueness (DB-level)
Duplicate employee code
Invalid jurisdiction boundary
Invalid role assignment
Missing or outdated MDMS references
5. Processing Employee Upload in Jupyter Notebook
Workflow Execution
Upload the filled Excel File.
The file is saved under: upload/Employee_Master.xlsx
Notebook Processes Each Row
Converts department/designation names → codes
Converts roles → role objects
Generates employee code
Converts dates → Unix timestamps
Builds HRMS payload
Data Submission to HRMS
Sends a structured payload to
/employees/_createCaptures row-wise success/failure
Status Update in Excel File
New columns are appended:
_STATUS
SUCCESS / FAILED / EXISTS
_STATUS_CODE
201 / 400 / 409 / 500
_ERROR_MESSAGE
Detailed message
6. Employee Upload Error Handling
Department not found
Incorrect spelling or missing from Phase 3
Mobile number already exists
Duplicate in system
Role not found
Invalid role code
Invalid date format
Not in DD-MM-YYYY format
Boundary code invalid
Not matching Phase 2 hierarchy
Common Errors & MeaningError File Workflow
Download processed file
Review FAILED rows
Correct only failed records
Remove status columns
Re-upload the corrected file
The loader automatically skips successful rows.
7. Password Management Guidelines
Default password applied if empty:
eGov@123Custom password must meet security criteria:
Min 8 characters
1 uppercase, 1 lowercase, 1 number, 1 special character
Password update limitations: After employee creation, updating the password via Excel is not supported. Use HRMS UI for password reset.
8. Role & Jurisdiction Assignment
Role Assignment
Roles define employee privileges.
Common roles include:
GRO
Grievance Routing Officer
CSR
Customer Service Representative
EMPLOYEE
Field/department staff
Multiple roles can be assigned using comma separation.
Jurisdiction Assignment
A jurisdiction maps a user to a boundary (city/ward/zone).
If no boundary is entered, the employee is assigned to the entire tenant boundary.
Last updated
Was this helpful?