Notebook 1: Tenant and Common Masters

Overview

Create tenants, branding, departments, designations, and complaint types (with SLA).

File: 1_TenantAndCommonMaster.ipynb

Creates:

  • Tenant (City/State) information

  • Branding (logos, banners)

  • Departments

  • Designations

  • Complaint Types with SLA

circle-info

You will typically use root/state credentials for tenant + branding, and city credentials for common masters.

Steps

Step 1: Open the notebook

  • Open Jupyter and go to the Notebooks folder.

  • Open 1_TenantAndCommonMaster.ipynb.

Step 2: Run setup cells

  • Run the first few cells to install and import the required modules

  • Use Shift + Enter to run each cell

  • Wait for each cell to complete before running the next

Step 3: Authenticate

Fill the authentication form.

Field
Example

Domain URL

https://unified-dev.digit.org

Username

MDMSADMIN

Password

********

User Type

EMPLOYEE

Tenant ID

pg

Click Authenticate.

Expected output:

Step 4: Upload tenant and branding

4.1 Download the template

  • Find the cell that says "Download Tenant Template"

  • Run the cell (Shift + Enter)

  • Downloaded file: Tenant And Branding Master.xlsx

4.2 Open the Excel file

Open the downloaded file in Excel.

4.3 Fill Sheet 1: Tenant Info

  • Click on the "Tenant Info" tab at the bottom

  • Fill the required columns

Column
What to enter
Example

Tenant Display Name*

City/ULB name

City A Municipal Corporation

Tenant Code*

Unique code (admin provided)

PG.CITYA

Tenant Type*

City or State

City

Logo File Path*

Public URL to logo image

https://example.com/logo.png

City Name

City name

City A

District Name

District name

District X

Rules:

  • Do not leave mandatory fields empty (marked with *)

  • Tenant Code must be unique (usually provided by the admin)

  • Logo URL must be a working, publicly accessible link

4.4 Fill Sheet 2: Branding Details

  • Click on the "Branding Details" tab

  • Fill the required columns

Column
What to enter
Example

Logo URL*

Main logo link

https://example.com/logo.png

Logo URL (White)*

White logo link

https://example.com/logo-white.png

Banner URL

Banner image link

https://example.com/banner.png

State Logo

Root/state tenant logo

https://example.com/state-logo.png

4.5 Save the file

Save in Excel (Ctrl + S / Cmd + S).

4.6 Upload the file

  • Find the upload cell in the notebook

  • Enter the state tenant ID (example: pg)

  • Select your Tenant And Branding Master.xlsx

  • Click Save Config & Upload Tenant Master

Run the loading cells (Cells 103, 104, and 105).

Expected output:

Step 5: Upload departments, designations, and complaint types

5.1 What this phase creates

Master
Examples

Departments

Water, Sanitation, Electricity

Designations

Engineer, Manager, Supervisor

Complaint Types

Water not coming, Garbage not collected

5.2 Download the template

  • Find the Common Master section in the notebook

  • Run the download cell

  • Download and open Common and Complaint Master.xlsx

5.3 Fill Sheet 1: Departments & Designations

  • Click on the "Department & Designation" tab

Example:

Department Name
Designation Name

WATER DEPARTMENT

engineer

WATER DEPARTMENT

manager

WATER DEPARTMENT

supervisor

SANITATION

engineer

SANITATION

supervisor

ELECTRICITY

technician

Rules:

  • You can add multiple designations for one department

  • Department names must match exactly across sheets

  • Do not leave empty rows between entries

5.4 Fill Sheet 2: Complaint Types

  • Click on the "Complaint Type" tab

  • Fill in these columns:

Example:

Complaint Type
Complaint Sub Type
Department Name
Resolution Time (Hours)*
Search Words

Water Issues

Tap broken

WATER DEPARTMENT

24

water,tap,broken

Water Issues

No water supply

WATER DEPARTMENT

12

water,supply,no water

Garbage

Not collected

SANITATION

8

garbage,waste,collection

Street Light

Not working

ELECTRICITY

48

light,street,bulb

Rules:

  • Department Name must match Sheet 1 exactly

  • Resolution Time is in hours (numeric value)

  • Search Words help citizens find complaints (use commas to separate)

5.5 Save the file

Save in Excel (Ctrl + S / Cmd + S).

5.6 Upload and process

  • Enter the target city tenant ID (example: pg.citya)

  • Select Common and Complaint Master.xlsx

  • Run the processing cells

5.7 Check results

Expected output:

Step 6: Handle errors (if any)

If some master failed:

  • Download the processed file.

  • Open it and filter to FAILED rows.

  • Read the error message.

_STATUS
_ERROR_MESSAGE

FAILED

INVALID SLA

  • Fix the data in the failed rows.

  • Delete the status columns:

    • _STATUS

    • _STATUS_CODE

    • _ERROR_MESSAGE

  • Save and re-upload.

The system will skip already-successful rows.

Last updated

Was this helpful?