# 2. Add Boundary

{% hint style="info" %}
**Note:** This boundary data is seeded at the city level.
{% endhint %}

## Overview

This phase creates your city’s boundary hierarchy. Boundaries power routing, SLA reporting, and ward-level views.

### 2.1 What are boundaries?

Boundaries are the geographic divisions of your city:

* City → Zone → Ward → Block → Locality

### 2.2 Create boundary hierarchy

If this is a new setup, you need to define the hierarchy levels. Creating a new hierarchy is as simple as defining levels top to bottom. You can name the hierarchy anything, like `"REVENUE"`. Set it in the *`BOUNDARY_HIERARCHY`* variable. This generates a template that you can fill and upload. The calls are *idempotent* so it will not create new ones.

<div align="left"><figure><img src="/files/lDN3RO9b2kdUiMZFEdhA" alt=""><figcaption></figcaption></figure></div>

The output of running this cell will look like this. It stores the generated template in the *upload* folder directly.

<div align="left"><figure><img src="/files/OOCyfm05qmnWV4xTSSrJ" alt=""><figcaption></figcaption></figure></div>

### 2.3 Fill the boundary template

Open the downloaded Excel file.

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

Fill in boundary data:

| Code                  | Name    | Parent Code       |
| --------------------- | ------- | ----------------- |
| PG\_CITYA             | City A  | (leave empty)     |
| PG\_CITYA\_Z1         | Zone 1  | PG\_CITYA         |
| PG\_CITYA\_Z1\_W1     | Ward 1  | PG\_CITYA\_Z1     |
| PG\_CITYA\_Z1\_W1\_B1 | Block 1 | PG\_CITYA\_Z1\_W1 |

Important Rules:

* First level (City) has no parent
* All other levels must have a valid parent code
* Codes must be unique

### 2.4 Upload and process

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

### 2.5 Check results

<div align="left"><figure><img src="/files/xnlBsxQRmtaFL1eFKurb" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/F5sqjYp5wzXuNzfaO9Vy" alt=""><figcaption></figcaption></figure></div>


---

# 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/unified-approach/2.-add-boundary.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.
