Delivery Details
Last updated
Last updated
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
In the 'Delivery Details' step, users encounter 3 screens:
Delivery Dates
Cycle Configuration
Delivery
This screen asks a user to fill in the start and end date of the campaign.
On this screen, users specify the number of cycles and deliveries. The number of cycles must be at least 1 and can be up to 5. Once the user has defined the number of cycles and deliveries, they can proceed to enter the start and end dates for each cycle.
The number of cycles and deliveries are configurable based on project type. We can configure it in MDMS:
If data is configured, a user will see the number of cycles and deliveries as per the configuration. A user, however, can increase or decrease if they find it necessary.
The validations added for the start date and the end date of the cycles should not overlap to each other.
After filling in all the cycle details, a user can click on 'Next' and move to the Delivery rules screen. Clicking on 'Next' enables a user to store the cycle data in the local storage.
On this screen, users fill in all the delivery details (adding delivery rules, adding conditions in delivery rules, adding products in the delivery rules) of each cycle and delivery which the user has selected in the cycle details screen.
The delivery screen can also be configured based on project type. A user can configure the number of delivery conditions, their attributes, and products. If the data is configured correctly, a user can see the data preloaded in delivery rules and the user can change, remove, or add, if they find it necessary.
A user can add delivery rules up to 5. A user can add conditions in each delivery rule with attribute options having height, weight, gender, and age. For Project type, LLIN-mz configuration is passed in delivery rules in which two fixed attributes are present for the bednet campaign.
After filling in all the delivery rules details, when a user clicks on next, the data will be stored in the localStorage as well as in the draft API. The delivery rules data will be validated in the preview screen.
Reference files:
Delivery rule's screen file path: https://github.com/egovernments/DIGIT-Frontend/blob/campaign/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/deliveryRule/index.js
API call file path: https://github.com/egovernments/DIGIT-Frontend/blob/campaign/micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/SetupCampaign.js
If you click on configure resources on the delivery screen, a pop-up appears where a user can either select or create a product:
Product Screen: When a user clicks on "Add Products to be delivered", a pop-up screen will appear with a list of product variants where a user can add the products and the number of counts in the delivery rules.
A user can add multiple products to the product screen after clicking on "add more resources" When the user clicks on confirm resources, products will be added to the delivery rules. The user can remove the products as well.
If the product is not present, a user can click on "Add New Product" to create a new product and variant, and subsequently add delivery rules. Clicking on "Add New Product" will open the create product screen.
Users can enter product names, product variants, and product types which are sourced from MDMS data. Additionally, a user can create multiple products using the "Add Products" button. After clicking on 'Confirm,' the product will be created, followed by the creation of product variants.
After successful creation, users will be directed to a success response screen.
Here you can find the config of delivery based on project type.
The following is the structure of the delivery configuration:
projectType: This will be the type of the project. If the selected project type is present in the MDMS, then we use that config.
attrAddDisable: if this is true, we are restricting a user that they cannot add any attribute.
deliveryAddDisable: if this is true, a user cannot add any further delivery rule conditions.
cycleConfig: This will be an object containing cycles and deliveries. This refers to the number of cycles and deliveries that will be shown in the cycle screen.
deliveryConfig: This will be an array of objects, each object representing one delivery condition.
Adding product config is a careful job, adding the wrong product in the config will cause issues while creating a product.
In Value, the product variant ID should be added in the value which will be getting in the below API:product/variant/v1/_search
The name will consist of the name of the product and the variant of the product separated with "-"
for name: product/v1/_search
for variant: product/variant/v1/_search
FilePath:
MDMS:
Bednet config: https://github.com/egovernments/egov-mdms-data/blob/UNIFIED-DEV/data/mz/health/hcm-admin-console/deliveryConfig.json
Product Type: https://github.com/egovernments/egov-mdms-data/blob/UNIFIED-DEV/data/mz/health/hcm-admin-console/productType.json
HOOKS:
We have added Delivery type at each delivery conditions showing the delivery type of the campaign.
It is configurable in mdms for the SMC project type. We can add default delivery type at each conditions.
deliveryConfig: It will contain default data of all deliveries.
conditionConfig: It will contain default data of each delivery condition of each deliveries
deliveryType: Default value of delivery type.
product/variant/v1/_search
POST
{ "ProductVariant": {}, "RequestInfo": { } }
product/v1/_search
POST
{ "Product": { "id": [ "P-2024-01-04-000094", "P-2024-01-04-000094", "P-2024-01-04-000095", "P-2024-01-04-000095", "P-2024-01-04-000096", "P-2024-01-04-000094", "P-2024-01-04-000094", "P-2024-01-04-000095", "P-2024-01-04-000095",] }, "RequestInfo": { } }
product/v1/_create
POST
{ "Product": [ { "tenantId": "mz", "type": "BEDNET", "name": "CHECKTHEONE" } ], "apiOperation": "CREATE", "RequestInfo": { } }
product/variant/v1/_create
POST
{ "ProductVariant": [ { "tenantId": "mz", "productId": "P-2024-05-09-000322", "variation": "1000" } ], "apiOperation": "CREATE", "RequestInfo": { } }
project-factory/v1/project-type/update
POST
{ "CampaignDetails": { "id": "76e7f371-1f85-4739-97dc-feb4ee10fa6b", "tenantId": "mz", "status": "drafted", "action": "draft", "campaignNumber": "CMP-2024-05-09-001413", "campaignName": "TheNewOne", "projectType": "LLIN-mz", "hierarchyType": "ADMIN", "boundaryCode": "", "projectId": null, "startDate": 1716056999000, "endDate": 1716488999000, "additionalDetails": { "beneficiaryType": "HOUSEHOLD", "key": 5 }, "resources": [], "boundaries": [], "deliveryRules": [ { "cycleNumber": 1, "deliveryNumber": 1, "deliveryRuleNumber": 1, "products": [ { "value": "PVAR-2024-01-24-000076", "name": "SP - 500mg", "count": 1 } ], "conditions": [ { "attribute": "CAMPAIGN_BEDNET_INDIVIDUAL_LABEL", "operator": null, "value": null }, { "attribute": "CAMPAIGN_BEDNET_HOUSEHOLD_LABEL", "operator": null, "value": null } ] } ], "auditDetails": { "createdBy": "63a21269-d40d-4c26-878f-4f4486b1f44b", "lastModifiedBy": "63a21269-d40d-4c26-878f-4f4486b1f44b", "createdTime": 1715270852152, "lastModifiedTime": 1715273123616 } }, "RequestInfo": { } }
A info card is been added in both the screens in the delivery details. Which states the criteria of delivery as recommended by WHO.