> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/local-governance/v2.8/platform/configure-digit/configuring-digit-services/water-services/water-and-sewerage-service-ui-docs/employee-disconnection-create-flow.md).

# Employee: Disconnection Create Flow

Water and Sewerage disconnection application details feature for employees - technical implementation doc

**Objective:** The Water and Sewerage 'Apply Disconnection' is the major feature in WS Module. It allows Counter Employees to create Water and Sewerage Applications.

Every application is a part of the workflow.

## **Workflow Details** <a href="#validations" id="validations"></a>

Once a new application connection is activated, the system generates a consumer code. This code is used to route users to the connection details screen from the search/connection screen.

Clicking on the Take Action button displays multiple options based on conditions. Clicking on the Apply for Disconnection option routes users to the Disconnect Document Required screen.<br>

<figure><img src="https://1885278393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYtUmELy66UydIQtJOn5%2Fuploads%2Fviclj7UkuoS0ve1sepzO%2Fimage.png?alt=media&amp;token=8b1b569d-3574-4f0f-a801-04d8f9e028bf" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1885278393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYtUmELy66UydIQtJOn5%2Fuploads%2FF9nWKEzOIMtSwEenYDZ4%2Fimage.png?alt=media&amp;token=9b710c97-075d-4efb-824a-93788dfd8625" alt=""><figcaption></figcaption></figure>

#### **Validations** <a href="#validations" id="validations"></a>

* To disconnect, the connection should be in an **ACTIVE** state. Connections which are under **WORKFLOW** or **INACTIVE** are not eligible for disconnection.
* In cases dues are pending, the user has to clear the dues before applying for Disconnection.
* The Disconnect option itself is not displayed in the action list for the connection which is **INACTIVE**.

**Connection details**:[Employee: Water and Sewerage Connection Details](/local-governance/v2.8/platform/configure-digit/configuring-digit-services/water-services/water-and-sewerage-service-ui-docs/employee-connection-details.md)

Clicking on the Apply button routes users to the Disconnection apply screen.

<figure><img src="https://1885278393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYtUmELy66UydIQtJOn5%2Fuploads%2FrqlN3lvIuN9jqXI1si2M%2Fimage.png?alt=media&amp;token=46a72ce6-6fb9-4e5b-bf39-90f0fb82dbac" alt=""><figcaption></figcaption></figure>

**Acknowledgement screen**

Successful create and update calls routes users to the acknowledgement screen.

<div align="left"><figure><img src="https://1885278393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYtUmELy66UydIQtJOn5%2Fuploads%2FRKcBDCTjt9fPHzaGIhlo%2Fimage.png?alt=media&amp;token=c77a92b6-f41d-41ef-a873-823e46ae0dda" alt=""><figcaption></figcaption></figure></div>

#### W\&S Application <a href="#w-and-s-application" id="w-and-s-application"></a>

Users get the acknowledgement form once they have created and submitted their application successfully. Processing of applications pending field inspection and user payment enables the download of the estimation letter and the sanction letter respectively. The section below provides the configuration for the document downloads.&#x20;

#### Acknowledgement Download

Users can download the acknowledgement after submitting the W\&S Create Application.

<figure><img src="https://1885278393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYtUmELy66UydIQtJOn5%2Fuploads%2F9BEmaprX3ti82p2tIW0K%2Fimage.png?alt=media&amp;token=0fa1cd02-eb9a-4a85-8045-56e5bffc9f30" alt=""><figcaption></figcaption></figure>

## Technical Implementation Details

File Path: <https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/ws/src/pageComponents/WSDisconnectionDocsRequired.js>

File Path: <https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/ws/src/pages/employee/DisconnectionApplication/index.js>

&#x20;**Data fetch, load and render**

`ws-services/wc/_create`

`sw-services/swc/_create`

**Case 1: In the case of Water connections:**

* Clicking on Submit button calls the  `ws-services/wc/_create` API and creates the application. The update API `ws-services/wc/_update`is called after getting a successful response on creating the application.

**Case 2: In the case of Sewerage connections:**

* Clicking on Submit button calls the `sw-services/swc/_create` API and creates the application. The update API `sw-services/swc/_update` is called after getting a successful response on creating the application.

File Path: <https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/ws/src/pages/employee/WSResponse.js>

File Path: <https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/ws/src/pages/employee/DisconnectionApplication/WSDisconnectionResponse.js>

The code for the application PDF is written in the below-mentioned file.

File Path: <https://github.com/egovernments/DIGIT-Dev/blob/develop/frontend/micro-ui/web/micro-ui-internals/packages/modules/ws/src/utils/getWSAcknowledgementData.js>

## **Role Action Mapping**

<table><thead><tr><th width="95">S.No.</th><th>API</th><th>Roles</th><th>Action ID</th></tr></thead><tbody><tr><td>1</td><td><code>/egov-mdms-service/v1/_search</code></td><td><code>WS_CEMP, SW_CEMP</code></td><td><code>954</code></td></tr><tr><td>2</td><td><code>/ws-services/wc/_create</code></td><td><code>WS_CEMP, SW_CEMP</code></td><td><code>1899, 1917</code></td></tr><tr><td>3</td><td><code>/sw-services/swc/_create</code></td><td><code>WS_CEMP, SW_CEMP</code></td><td><code>1899, 1917</code></td></tr><tr><td>4</td><td><code>/ws-services/wc/_update</code></td><td><code>WS_CEMP, SW_CEMP</code></td><td><code>1899, 1917</code></td></tr><tr><td>5</td><td><code>/sw-services/swc/_update</code></td><td><code>WS_CEMP, SW_CEMP</code></td><td><code>1899, 1917</code></td></tr><tr><td>6</td><td><code>/filestore/v1/files/url</code></td><td><code>EMPLOYEE</code></td><td> </td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digit.org/local-governance/v2.8/platform/configure-digit/configuring-digit-services/water-services/water-and-sewerage-service-ui-docs/employee-disconnection-create-flow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
