Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Note

Please note the order in which questions are asked during a user session is controlled by the algorithm.json file, it is not the order in which the questions are listed in the questions.json file.

Info

DEFINITIONS & TERMINOLOGIES

Options: Refers to the list of options related to a specific question that the client can pick to answer a question.

Keyword: This refrens to the question, in the example we provide below this is “factor1”.


Please note, C4C is built using POEditor which facilities language translations, this is required even if you do not use this option, to learn more about the C4C multilingual feature, click here.


Work Flow

All questions are stored in the questions.json file, please note the order in which questions are listed in the questions.json file is not important as the logic for which questions are asked in which order is controlled by the algorithm.json file.

The questions.json file will make a call to the POEditor file to extract and present the human-readable format of the question in ChatBot or WebApp.

Question Structure

Code Block
"factor1": {
        "options": {
            "Effectiveness": "",
            "Privacy": "",
            "FewSideEffects": ""
        }
    }

Question Lable (1)

Each question is made up of a two key-value pair, the question is the reference key, and in the example below the key is “factor1”. This label is obtained from the relevant question in the POEditor, as shown below.

Option Labels (2)

The relevant options labels (2) are also obtained from the POEditor app, please note you will only need to enter the last part of the label string as shown in the code snippet above.

Note

Please ensure you maintain the json file structure and pay attention to keep all labels you enter or update enclosed in “double quotations marks”.


Changes

Adding new questions/options

This file is intended to be modified by a developer. If a new question or option is required please contact your ‘C4C Technical Administrator’ and provide the name of the question and options. In case the option is for an existing question, indicate the question (keyword) in which the new option will be located.

Remove questions/options

If a question or option needs to be removed, contact the C4C technical administrator. Provide the keyword or name of the element to remove. Do not intend to remove the question directly, as this can damage the file.