# Notebook 3: Employee Onboarding

## Overview

Generate the employee template and onboard employees for a city tenant.

File: `3_EmployeeOnboarding.ipynb`

Creates:

* Employee accounts
* User login credentials
* Role assignments
* Jurisdiction (work area) assignments

{% hint style="warning" %}
Employee onboarding runs at the **city/ULB level**. Authenticate using **city tenant** credentials (example: `pg.citya`).
{% endhint %}

<figure><img src="/files/yPb9dxOmScDQuoHqt0Io" alt=""><figcaption></figcaption></figure>

## Steps

### Step 1: Open the notebook

* Open Jupyter and go to the `Notebooks` folder.
* Open `3_EmployeeOnboarding.ipynb`.

### Step 2: Authenticate (city-level)

Authenticate the same way as Notebook 1, but use the **city tenant** credentials.

### Step 3: Generate the employee template

* Enter your tenant ID (example: `pg.citya`).
* Click **📋 Generate Employee Template**.
* Wait for the template to populate the dropdown values.

**The notebook typically pulls:**

* Departments and designations (from Notebook 1)
* Role list (from MDMS)
* Boundaries (from Notebook 2)

<figure><img src="/files/4ENoXv0mQPazPh7Z82fU" alt=""><figcaption></figcaption></figure>

### Step 4: Download the template

Click **📥 Download Template**.

<figure><img src="/files/M1beVwvRXUx8sUNLjVE4" alt=""><figcaption></figcaption></figure>

### Step 5: Fill in the employee template

Open the downloaded Excel file and fill in the required fields.

Main columns to fill:

| Column                 | Example          | Notes               |
| ---------------------- | ---------------- | ------------------- |
| User Name\*            | John Doe         | Full name           |
| Mobile Number\*        | 9876543210       | 10 digits, unique   |
| Password               | (leave empty)    | Default: `eGov@123` |
| Department Name\*      | WATER DEPARTMENT | Use dropdown        |
| Designation Name\*     | engineer         | Use dropdown        |
| Role Names\*           | GRO,EMPLOYEE     | Comma-separated     |
| Assignment From Date\* | 01-01-2024       | DD-MM-YYYY          |
| Date of Appointment\*  | 01-01-2024       | DD-MM-YYYY          |

Use the dropdown menus where present.

Use the README sheets for reference:

* `README - Roles`
* `README - Departments`
* `README - Boundaries`

<figure><img src="/files/ukY4iF83klO10Cdo3fOx" alt=""><figcaption></figcaption></figure>

Save the file when done.

<figure><img src="/files/faSh0PLxjmSvvOYqGA0M" alt=""><figcaption></figcaption></figure>

### Step 6: Upload and process

* Upload your filled template.
* Click **📤 Upload & Process**.

<figure><img src="/files/YdnTQqX7ZtT4i8OSOqS2" alt=""><figcaption></figcaption></figure>

### Step 7: Verify results

You should see a summary like:

```
[SUMMARY] Created: 25
[SUMMARY] Already Exists: 0
[SUMMARY] Failed: 0
✅ [SUCCESS] Employees uploaded successfully!
```

<figure><img src="/files/eRT99HJNWDtiAwCffiz5" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/JmGi7wMEdayXl1KnSd5f" alt=""><figcaption></figcaption></figure>

### Step 8: Handle errors (if any)

If some employees failed:

<figure><img src="/files/oQ7giMp9wmu2LSOtNOKW" alt=""><figcaption></figcaption></figure>

* Download the processed file.
* Filter to rows with `_STATUS = FAILED`.
* Read `_ERROR_MESSAGE`.

Example:

<table><thead><tr><th width="254.6640625">_STATUS</th><th>_ERROR_MESSAGE</th></tr></thead><tbody><tr><td>FAILED</td><td>Mobile number already exists</td></tr></tbody></table>

<figure><img src="/files/MnLpKEtzrh9iY3SfjoHl" alt=""><figcaption></figcaption></figure>

* Fix the failed rows.
* Delete the status columns: `_STATUS`, `_STATUS_CODE`, `_ERROR_MESSAGE`.
* Save and re-upload.

The system skips rows that were already successful.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digit.org/complaints-management/complaints-resolution-v2.10/deploy/setup/production-setup/deploy-complaints-management/alternative-approach/notebook-3-employee-onboarding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
