Upload Resource Details

Overview

The Upload Resource Details flow enables users to upload all data required to configure a campaign. This process consists of three mandatory uploads followed by a summary and validation step:

  1. Target Data Upload

  2. Facility Data Upload

  3. User Data Upload

  4. Upload Summary & Validation

Each upload uses system-generated Excel templates to ensure data consistency and correctness.

Steps

Step 1: Upload Target Data

When this appears: After the user selects campaign boundaries.

Download Template

  • Click Download Template to download an Excel file.

  • The file contains:

    • ReadMe sheet

    • Boundary Data sheet

    • District-level sheets (lowest boundary level)

  • Users must enter target values at the lowest boundary level.

Upload & Validate

  • Upload the completed Excel file.

  • The system performs validation.

  • Once validation is successful:

    • The user can proceed to the next step.

    • The uploaded file can be deleted if required before moving forward.

Step 2: Upload Facility Data

When this appears: After a successful Target Data upload.

Download Template

  • Click Download Template to download an Excel file containing:

    • ReadMe sheet

    • Facility sheet

    • Boundary Data sheet

  • Users must:

    • Refer to the boundary codes from the Boundary Data sheet.

    • Fill facility details mapped to valid boundary codes.

Upload & Validate

  • Upload the completed Facility Excel file.

  • The system validates facility data before allowing the user to continue.

Step 3: Upload User Data

When this appears: After the Facility Data upload.

Download Template

  • Click Download Template to download an Excel file containing:

    • ReadMe sheet

    • User sheet

    • Boundary Data sheet

  • Users only need to fill out the User sheet.

Upload & Validate

  • Upload the completed User Excel file.

  • Validation is performed before progressing.

Template Generation & Download Flow

  • All templates are generated using the Generate and Download APIs.arrow-up-right

  • The following hook is used to generate a unique upload ID:

    • useGenerateIdCampaign

  • The generated ID is stored in local storage as:

    • HCM_CAMPAIGN_MANAGER_UPLOAD_ID

  • Templates are downloaded using:

    • /project-factory/v1/data/_download

This hook will return the ID which is stored in the local storage according to the type:

Step 4: Upload Summary

Purpose: Review all uploaded files before completing resource setup.

What this screen shows:

  • List of all uploaded files:

    • Target Data

    • Facility Data

    • User Data

  • Validation status of each file

Mandatory Validation Rule

  • All three uploads are mandatory

  • The user cannot proceed unless:

    • All files are uploaded

    • All validations are successful

Schema Validation

Schema-Based Validation

UI Validation (MDMS)

  • Validation rules are defined in MDMS: Schema Data linkarrow-up-right

    • Schema Module: adminSchema

    • Schema Source: adminSchema.json

  • Validation is performed using AJV.

chevron-rightSchemaDefinitionshashtag

Facility Data Validations

  • Facility Type must be:

    • Warehouse or Health Facility

  • Facility Name must be a string.

  • Facility Status must be:

    • Temporary or Permanent

  • Facility sheet headers must match the schema.

By using AJV Validation, we are validating the headers of the facility sheet.

Common Validations (v0.3.1)

  • Sheet names must match expected values.

  • Template locale must match the locale used during generation.

  • Campaign ID in the uploaded file must match the campaign ID:

    • This validation is configurable and can be toggled via DevOps.

Target Data Validations

  • Header and boundary codes are validated using schema.

  • Target value validation at the lowest level:

    • targetValue > 0

    • targetValue < 100000000

Backend Validation

  • Backend validation is handled using:

    • useResourceData hook

  • Before calling the validation API:

    • A base timeout value is fetched from MDMS.

For more information on this schema, you can refer to:

UI Components Used

Component
Purpose

Handles file upload

Displays uploaded Excel preview

Upload screen and validation flow

API Details

End Point
Role
Details

/project-factory/v1/data/_download

CAMPAIGN_MANAGER

Params will be different for different types- 1) boundary tenantId:mz

type:boundary

hierarchyType:ADMIN

id:987eadc3-55a0-4553-925d-bf8087f57e5a 2) facilityWithBoundary tenantId:mz

type:facilityWithBoundary

hierarchyType:ADMIN

id:052f59fc-18a7-4e07-816a-f5d8062b56b5 3) userWithBoundary tenantId:mz

type:userWithBoundary

hierarchyType:ADMIN

id:fbfbd393-d053-4f51-9e12-1068b97da292

/project-factory/v1/data/_create

CAMPAIGN_MANAGER

1) type: boundaryWithTarget { "type": "boundaryWithTarget", ""action": "validate",

"campaignId": "13175791-db53-4d10-be90-2dba1c138756" }

2) type: facility { "type": "facility",

"action": "validate",

"campaignId": "13175791-db53-4d10-be90-2dba1c138756"}

3) type: user { "type": "user",

"action": "validate",

"campaignId": "13175791-db53-4d10-be90-2dba1c138756" }

New Features

A new pop-up has been added, which displays the option to download the template in all three upload screens.

Use Case:

When the user comes after clicking next on the delivery screen and the file is not uploaded, the below pop-up is displayed.

Last updated

Was this helpful?