> 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/health/v2.0/deploy/configuration/microplan-service-configuration/microplan-web-service-configuration/user-management/bulk-user-create.md).

# Bulk User Create

## Overview

The **Bulk Upload Users** feature allows the **System Administrator / Microplan Admin** to create multiple users across different microplan roles by uploading a structured Excel template.

## Steps

### Step 1: Access Bulk Upload Users

1. Log in as **MICROPLAN\_ADMIN**.
2. Navigate to **User Management**.
3. Click on **Bulk Upload Users**.

This opens the bulk user upload interface.

<figure><img src="https://3976166735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmb5VUHEnO0msarLMPz6q%2Fuploads%2Fnxre8PHLz0eoTYGApv7Z%2Fimage.png?alt=media&amp;token=d76de71d-8889-4e97-bc64-c52b99c75fe5" alt=""><figcaption></figcaption></figure>

### Step 2: Download the User Template

Before uploading users, download the official Excel template.

* Click **Download Template**.
* The template is created by using the api call to **`/project-factory/v1/data/_generate`**
* Save the `.xlsx` file locally.

> Only the system-generated template should be used for upload.

<figure><img src="https://3976166735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmb5VUHEnO0msarLMPz6q%2Fuploads%2F5Zaha2HoRQBQ8X8YE6BX%2Fimage.png?alt=media&amp;token=3ec4198b-f7fe-45a3-a7bd-6782ed057785" alt=""><figcaption></figcaption></figure>

### Step 3: Fill the Template Correctly

Open the downloaded Excel file and complete the required details.

#### Required User Information

For each role sheet:

* Name
* Contact Number
* Email ID
* Role-specific details (if applicable)

#### Important Role Validation Rules

While filling the template, ensure:

* A user is **not assigned to both**:
  * Microplan Estimation Approver and National Microplan Estimation Approver
* A user is **not assigned to both**:
  * Facility Boundary Assigner and National Facility Boundary Assigner
* A user is **not assigned to both**:
  * Population Data Approver and National Population Data Approver

Violating these rules will cause validation errors.

Save the file after completing all entries.

### Step 4: Upload the Completed File

1. Click **Browse**.
2. Select the completed Excel file.
3. Supported formats:
   * `.xlsx`
   * `.xls`
4. Upload only the system template (modified with user data).

Once selected, the system automatically starts validation.

### Step 5: File Validation Process

After upload:

* The file is sent for validation.
* The system checks:
  * File structure
  * Mandatory fields
  * Role conflicts
  * Data format consistency

The below hook is used to validate the template file.

```
Digit.Hooks.campaign.useResourceData( uploadedFile, state?.hierarchyType, type, tenantId, id, baseTimeOut?.["HCM-ADMIN-CONSOLE"], { source: "microplan" } );
```

#### Validation Outcomes

* **Completed** → File passes validation.
* **Error** → Validation errors are displayed in the error details section.

If errors are shown:

1. Download the processed file (if provided).
2. Review error messages.
3. Correct the Excel file.
4. Re-upload the corrected file.

Once the status from the validation is "Completed", the processedFileStoreis extracted from the response and sent to the following hook.

```
Digit.UploadServices.Filefetch([processedFileStore], tenantId)
```

<figure><img src="https://3976166735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmb5VUHEnO0msarLMPz6q%2Fuploads%2FkjePdvBSfzq7Cq6Zp3g2%2Fimage.png?alt=media&amp;token=572ed149-5f11-4c34-874a-b58c130e1342" alt=""><figcaption></figcaption></figure>

This hook returns `fileUrl`, which contains the URL attribute. For example, the URL might look like:

```
https://unified-qa-filestore.s3-ap-south-1.amazonaws.com/mz/HCM-ADMIN-CONSOLE-CLIENT/December/4/1733307220857RYETclexTL.xlsx?...
```

This is a **pre-signed URL** generated by **Amazon S3 (Simple Storage Service)**, which provides temporary access to a specific file stored in an S3 bucket.

When the `fileUrl` is set, the file can be downloaded by clicking a button that uses the following hook:

{% code overflow="wrap" %}

```
Digit.Utils.campaign.downloadExcelWithCustomName({ fileStoreId: file?.filestoreId, customName: fileNameWithoutExtension }); 
```

{% endcode %}

### Step 6: Submit the File

Once the validation status is **completed**:

1. Click **Submit**.
2. The system processes the file.
3. Users are created and mapped to their respective microplan roles.

After successful submission:

* The system navigates back to the User Management page.
* Newly created users appear in the user list.

### Step 7: Download Processed File (Optional)

After validation, the system generates a processed file:

* A temporary download link is created.
* You can download the validated file for review.
* This link provides secure, time-limited access.

### Step 8: Delete Uploaded File (If Needed)

If you need to cancel or restart:

1. Click **Delete**.
2. The uploaded file is removed.
3. You can upload a corrected file again.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/health/v2.0/deploy/configuration/microplan-service-configuration/microplan-web-service-configuration/user-management/bulk-user-create.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
