# Phase 3 – Common Master Template Structure

The Common Master template used in Jupyter Notebook contains two operational sheets based on the columns you shared:

1. Department & Designation Master Sheet
2. Complaint Type Master Sheet

Both sheets must be filled out before uploading in Phase-3.

Common Master Template: [Common Master](https://docs.google.com/spreadsheets/d/1CQOSxJZBi3LJ8PUrJW3mkiEHTmGDp-F8ZPw4ShvRBUA/edit?usp=sharing)

## 1. Department & Designation Master Sheet

#### Columns Present:

<table><thead><tr><th width="175.98046875">Column Name</th><th width="222.890625">Description</th><th width="121.86328125">Mandatory</th><th>Example</th></tr></thead><tbody><tr><td>Department Name*</td><td>Name of the department</td><td>Yes</td><td>WATER DEPARTMENT</td></tr></tbody></table>

#### Example Rows (from your data)

| Department Name\* | Designation Name\* |
| ----------------- | ------------------ |
| WATER DEPARTMENT  | engineer           |

{% hint style="info" %}
**Notes**

* Designations can be multiple under the same department.
* No empty department rows are allowed between entries.
  {% endhint %}

## 2. Complaint Type Master Sheet

#### Columns Present:

<table><thead><tr><th width="191.421875">Column Name</th><th width="228.5078125">Description</th><th width="123.453125">Mandatory</th><th>Example</th></tr></thead><tbody><tr><td>Complaint Type*</td><td>Main complaint category</td><td>Yes</td><td>Water not coming</td></tr><tr><td>Complaint Sub Type*</td><td>Sub-category of complaint</td><td>Yes</td><td>tap broken</td></tr><tr><td>Department Name*</td><td>Must match Department Name from Sheet 1</td><td>Yes</td><td>WATER DEPARTMENT</td></tr><tr><td>Resolution Time (Hours)*</td><td>SLA in hours</td><td>Yes</td><td>1</td></tr><tr><td>Search Words (comma separated)</td><td>Keywords used for search &#x26; auto-classification</td><td>Yes</td><td>water tab,water supply</td></tr></tbody></table>

#### Example Rows (from your data)

<table><thead><tr><th width="117.66015625">Complaint Type*</th><th width="124.80859375">Complaint sub type*</th><th width="159.06640625">Department Name*</th><th width="143.703125">Resolution Time (Hours)*</th><th>Search Words (comma separated)</th></tr></thead><tbody><tr><td>Water not coming</td><td>tab broken</td><td>WATER DEPARTMENT</td><td>1</td><td>water tab,water supply</td></tr></tbody></table>

{% hint style="info" %}

#### Notes

* Every complaint must map to an existing Department Name from Sheet 1.
* SLA\* must be a numeric value (integer).
* Search words must be comma-separated without special characters.
* If a department has no complaints, leave it out entirely (do not add empty rows).

\#add the datatype of table attributes
{% endhint %}

## 3. Relationship Between Both Sheets

The template enforces the following relationships:

<table><thead><tr><th width="107.30859375">Rule</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>Complaint Type Sheet → Department Name must exist in Department Sheet</td></tr><tr><td>2</td><td>Departments must be created before designations and complaints</td></tr><tr><td>3</td><td>Designation Sheet uses the department name exactly as written in Department Sheet</td></tr><tr><td>4</td><td>All mandatory fields must be filled; blanks cause schema rejection</td></tr></tbody></table>

This ensures consistency across all master data.

***

## 4. Validation Rules in Jupyter Notebook

#### Excel-Level Validations

* Mandatory field enforcement
* Text-only validation
* Dropdown validation for Department Name
* Numeric validation for Resolution Time (Hours)
* Comma-separated keyword rules

#### MDMS Schema Validation

* The department must exist before designation
* The department must exist before the complaint
* Duplicate department or designation is rejected
* Invalid SLA values are rejected
* Complaint category and subtype uniqueness are enforced

#### API-Level Validation

* Department creation
* Designation creation
* Complaint type creation
* Duplicate detection
* Relationship enforcement


---

# 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/data-validation-layers/phase-3-common-master-template-structure.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.
