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:

Attribute
Description
Example

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

Field
Required
Description

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

Field
Description

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:

  1. Set optionDependency: true on the triggering option

  2. Create a new question object

  3. Set the new question’s parentId to the option ID

  4. Increase the level value

Nesting is supported up to 3 levels.

The question object is represented as a JSON structure with the following key properties:

  1. id (String, Required)

    • A unique identifier for the question.

    • Example: "2d4a7b1e-1f2f-4a8a-9672-43396c6c9a1c"

  2. key (Integer, Required)

    • The question's sequence or order in the questionnaire.

    • Example: 1

  3. type (Object, Required)

    • Represents the type of the question.

    • Contains a code field to specify the question type.

    • Example: { "code": "SingleValueList" }

  4. level (Integer, Required)

    • Indicates the hierarchy level of the question.

    • Example: 1 (Top-level question)

  5. 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?"

  6. value (String/Null, Optional)

    • Holds the selected value once a choice is made.

    • Initially null.

  7. 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:

  8. isActive (Boolean, Optional)

    • Indicates whether the question is active or visible in the form.

    • Example: true

  9. parentId (String/Null, Optional)

    • Specifies the parent question ID if the question is a subquestion.

    • Example: null for top-level questions.

  10. isRequired (Boolean, Optional)

    • Indicates if answering the question is mandatory.

    • Example: false

Last updated

Was this helpful?