Default Templates
Overview
Default checklist templates define the base set of questions that load automatically when a checklist is created for a specific:
Role
Campaign type
Checklist type
These templates are configured in MDMS using the schema:
"role": "DISTRIBUTOR",
"campaignType": "IRS-mz",
"checklistType": "TRAINING_SUPERVISION"A template must be created for every valid combination of:
Role
Campaign type
Checklist type for which a checklist is expected to exist.
Steps
Step 1: Identify the Template Combination
Before creating a template, decide on the following identifiers:
role
User role
DISTRIBUTOR
campaignType
Campaign code
IRS-mz
checklistType
Type of checklist
TRAINING_SUPERVISION
Each unique combination requires a separate template entry in MDMS.
Step 2: Prepare the Checklist Questions
A checklist template consists of a list of question objects, each defining:
Question text
Question type
Options
Dependencies (nested questions)
Mandatory rules
Supported Question Types
SingleValueList→ Radio button (single choice)MultiValueList→ Checkbox (multiple choice)
These types must exist in:
Step 3: Define Question Structure
Each question object follows a consistent JSON structure.
Core Question Fields
id
✅
Unique identifier for the question
key
✅
Display order
type.code
✅
Question type (SingleValueList, MultiValueList)
level
✅
Hierarchy level (1 = parent, 2/3 = nested)
title
✅
Question text
options
✅
List of selectable options
parentId
❌
Parent option ID (for nested questions)
isRequired
❌
Marks question as mandatory
isActive
❌
Enables/disables question
Step 4: Configure Options for a Question
Each option inside a question defines a selectable value.
Option Fields
id
Unique option identifier
key
Display order
label
Option text
optionComment
Allows free-text comment
optionDependency
Triggers a nested question
parentQuestionId
Links option to its question
Step 5: Add Nested (Dependent) Questions
To create sub-questions:
Set
optionDependency: trueon the triggering optionCreate a new question object
Set the new question’s
parentIdto the option IDIncrease the
levelvalue
Nesting is supported up to 3 levels.
The question object is represented as a JSON structure with the following key properties:
id(String, Required)A unique identifier for the question.
Example:
"2d4a7b1e-1f2f-4a8a-9672-43396c6c9a1c"
key(Integer, Required)The question's sequence or order in the questionnaire.
Example:
1
type(Object, Required)Represents the type of the question.
Contains a
codefield to specify the question type.Example:
{ "code": "SingleValueList" }
level(Integer, Required)Indicates the hierarchy level of the question.
Example:
1(Top-level question)
title(String, Required)The text or content of the question.
Example:
"Is there a feedback system for health facilities to report any issues or requests related to bednet distribution?"
value(String/Null, Optional)Holds the selected value once a choice is made.
Initially
null.
options(Array of Objects, Required)A list of predefined choices for the question.
Each option includes:
id: Unique identifier for the option.key: Sequence/order of the option.label: Text describing the option.optionComment: (Boolean) Indicates if a comment is allowed for the option.optionDependency: (Boolean) Indicates if selecting the option triggers a dependent question.parentQuestionId: Links the option to its parent question.
Example:
isActive(Boolean, Optional)Indicates whether the question is active or visible in the form.
Example:
true
parentId(String/Null, Optional)Specifies the parent question ID if the question is a subquestion.
Example:
nullfor top-level questions.
isRequired(Boolean, Optional)Indicates if answering the question is mandatory.
Example:
false
The question object is represented as a JSON structure with the following key properties:
id(String, Required)A unique identifier for the question.
Example:
"23ca54be-038e-42df-a557-bb5fcd374dd5"
key(Integer, Required)The question's sequence or order in the questionnaire.
Example:
3
type(Object, Required)Represents the type of the question.
Contains a
codefield to specify the question type.Example:
{ "code": "MultiValueList" }
level(Integer, Required)Indicates the hierarchy level of the question.
Example:
1(Top-level question)
title(String, Required)The text or content of the question.
Example:
"What services or products do you distribute to health facilities?"
value(Array/Null, Optional)Holds the selected values once options are chosen.
Initially
null.
options(Array of Objects, Required)A list of predefined choices for the question.
Each option includes:
id: Unique identifier for the option.key: Sequence/order of the option.label: Text describing the option.optionComment: (Boolean) Indicates if a comment is allowed for the option.optionDependency: (Boolean) Indicates if selecting the option triggers a dependent question.parentQuestionId: Links the option to its parent question.
Example:
isActive(Boolean, Optional)Indicates whether the question is active or visible in the form.
Example:
true
parentId(String/Null, Optional)Specifies the parent question ID for a subquestion.
Example:
nullfor top-level questions.
isRequired(Boolean, Optional)Indicates if answering the question is mandatory.
Example:
false
The parent question object (SingleValueList) has the following properties:
id(String, Required)A unique identifier for the question.
Example:
"4add5323-fc98-4e71-a783-27dbb922c99f"
key(Integer, Required)The order or sequence of the question.
Example:
2
type(Object, Required)Indicates the question type.
Example:
{ "code": "SingleValueList" }
level(Integer, Required)Denotes the hierarchy level. For parent questions, this is
1.Example:
1
title(String, Required)The content of the question.
Example:
"What types of health facilities do you distribute to?"
value(String/Null, Optional)Holds the selected value after a user chooses an option.
Initially
null.
options(Array of Objects, Required)A list of predefined choices, where:
optionDependency: Determines if selecting the option triggers a nested question.
Example:
isActive(Boolean, Optional)Specifies whether the question is active.
Example:
true
parentId(String/Null, Optional)nullfor top-level (parent) questions.
isRequired(Boolean, Optional)Indicates if the question is mandatory.
Example:
false
Structure of Nested Question
The nested question object is similar to the parent question but includes additional context linking it to the triggering parent question.
id(String, Required)Unique identifier for the nested question.
Example:
"c65ac34b-7cc0-4993-a8fe-37e854d2b189"
key(Integer, Required)Sequence/order of the question.
Example:
4
type(Object, Required)Specifies the type of question.
Example:
{ "code": "SingleValueList" }
level(Integer, Required)The hierarchy level. Nested questions have a higher level (e.g.,
2).Example:
2
title(String, Required)The text of the nested question.
Example:
"Do you have enough products for distribution to health facilities?"
value(String/Null, Optional)Holds the selected value after a user chooses an option.
Initially
null.
options(Array of Objects, Required)The predefined choices for the nested question.
Example:
isActive(Boolean, Optional)Indicates whether the question is active.
Example:
true
parentId(String, Required)Links the nested question to the triggering parent option.
Example:
"23ace43b-e0b5-428f-9d11-12fc5b10b1ac1"
isRequired(Boolean, Optional)Specifies if the nested question is mandatory.
Example:
false
Last updated
Was this helpful?