> 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/public-finance/v2.3/exemplar/mgramseva/user-manual/tech-user-manual/consumer-details/create-consumer.md).

# Create Consumer

Enables employees to create new Consumers or Connections - The process of onboarding the end-users.

## **Link**

→ {base url}/mgramseva/home/consumercreate

![](https://2287351256-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfb8ehcimjt6ER7QOME%2F-MkMkbIZGyMVhF-e29Kf%2F-MkMm-Jjh2OKRpGCOr4x%2Fimage.png?alt=media\&token=6c646470-239f-46f6-80a5-577c3dd4cfac)

The Create Consumer card is available on the home screen as per the defined user role.

Click on the Consumer Create card navigates the user to the consumer creation screen.

Users enter the required details for the creation of Consumer.

If a user logs in for the first time then a walkthrough is populated following the same logic as in the home screen.

## File Path

Primary Files -[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/WalkFlowContainer.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/screeens/ConsumerDetails/ConsumerDetailsWalkThrough/WalkFlowContainer.dart) ,[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/walkthrough.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/screeens/ConsumerDetails/ConsumerDetailsWalkThrough/walkthrough.dart)

| **Fields**             | **Validations** |
| ---------------------- | --------------- |
| consumer Name\*        | `[A-Za-z ]`     |
| Gender\*               | None            |
| Spouse/Parent’s Name\* | `[A-Za-z ]`     |
| Phone Number\*         | `[0-9]`         |
| Old Connection No      | None            |
| Door Number            | None            |
| Street Name/Number     | None            |
| Gram Panchayat Name\*  | None- Disabled  |
| Propert Type\*         | None            |
| Service Type\*         | None            |
| Meter Id               | `[a-zA-Z0-9]`   |
| Meter Reading          | `[0-9]`         |
| Billing Cycle          | None            |
| Arrears                | `[0-9.]`        |

{% hint style="info" %}
**Note**: All fields are validated on Submit except the Phone number which gets validated on change.
{% endhint %}

## **API details**

| **API**                                         | **Params**                                                                                                                                                                                                                                                                                                                | **Description**                                                                     |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `/egov-mdms-service/v1/_search`                 | `[{"moduleName":"ws-services-masters","masterDetails":[{"name":"connectionType"}]},{"moduleName":"PropertyTax","masterDetails":[{"name":"PropertyType"}]},{"moduleName":"BillingService","masterDetails":[{"name":"TaxPeriod","filter":"[?(@.service=='WS' && @.fromDate <= 1631989800000 && @.toDate >= 1631989800000)]` | To get the Property Type and service Type and billing cycle values for the Dropdown |
| `egov-location/location/v11/boundarys/_search?` | `hierarchyTypeCode=REVENUE&boundaryType=Locality&tenantId={tenantID}`                                                                                                                                                                                                                                                     | To get the values for Locality DropDow                                              |

Consumer creation involves 2 sequential Process

1. Property Creation
2. Water connection Creation

After creating a property, the Property ID is linked to the WaterConnection Request JSON.

Water connection creation is of two types:

A metered connection that requires Meter ID and meter installation Date/ Last Meter Reading Date and an optional field to capture meter readin&#x67;**.**

![](https://2287351256-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfb8ehcimjt6ER7QOME%2F-MkMkbIZGyMVhF-e29Kf%2F-MkMlosHNed85XLJyVER%2Fimage.png?alt=media\&token=5404d2c4-05f0-45f0-91ff-a18f7a9513a2)

Non-Metered Connection which requires the last billing cycle as mandatory params captured in the field as shown below.

![](https://2287351256-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfb8ehcimjt6ER7QOME%2F-MkMkbIZGyMVhF-e29Kf%2F-MkMlhdhWI-DioQQ_WB-%2Fimage.png?alt=media\&token=2c7944b2-138d-4103-b956-13743e6548a5)

&#x20;Users can switch between connection types by selecting a desired value from the **Service Type** DropDown.

![](https://2287351256-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mfb8ehcimjt6ER7QOME%2F-MkMkbIZGyMVhF-e29Kf%2F-MkMlEKgn1KQv3Sq-W6S%2Fimage.png?alt=media\&token=30c268ef-6052-4f99-9624-b5d1588d66ce)

| **API**                              | **Description**                                                                                                                                                                                                                                                                                                                        |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `property-services/property/_create` | <p>Property Creation Request JSON</p><p>defined in<a href="https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/model/connection/property.dart"> <img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/property.dart at develop · egovernments/punjab-mgramseva</a></p> |
| `ws-services/wc/_create`             | Water Connection Request JSON defined in[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/water\_connection.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/model/connection/water_connection.dart)         |

## &#x20;**Role Access Mapping**

```
    case Routes.CONSUMER_CREATE:
        return ['GP_ADMIN', 'SUPERUSER'];
```

Components utilised from **Widgets Library**

| **Components**            | **File Path**                                                                                                                                                                                                                                                                               |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TextField Builder         | [<img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/TextFieldBuilder.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/widgets/TextFieldBuilder.dart)                 |
| RadioButtonField Builder  | [<img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/RadioButtonFieldBuilder.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/widgets/RadioButtonFieldBuilder.dart)   |
| SearchSelectField Builder | [<img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/SearchSelectFieldBuilder.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/widgets/SearchSelectFieldBuilder.dart) |
| DatePicker Builder        | [<img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/DatePickerFieldBuilder.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/widgets/DatePickerFieldBuilder.dart)     |

## **Files Path**

Model →[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/property.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/model/connection/property.dart) ,[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/water\_connection.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/model/connection/water_connection.dart)

View →[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/ConsumerDetails.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/screeens/ConsumerDetails/ConsumerDetails.dart)

Controller →[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/consumer\_details\_repo.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/repository/consumer_details_repo.dart) ,[ <img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/consumer\_details\_provider.dart at develop · egovernments/punjab-mgramseva](https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/lib/providers/consumer_details_provider.dart)

> [![Creative Commons License](https://i.creativecommons.org/l/by/4.0/80x15.png)*​*](http://creativecommons.org/licenses/by/4.0/)*All content on this page by* [*eGov Foundation*](https://egov.org.in/) *is licensed under a* [*Creative Commons Attribution 4.0 International License*](http://creativecommons.org/licenses/by/4.0/)*.*


---

# 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/public-finance/v2.3/exemplar/mgramseva/user-manual/tech-user-manual/consumer-details/create-consumer.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.
