Product design skills

references/cookiy/cookiy-quant-schema.md

A supporting file of the user-research-cookiy skill.

Quant Survey — JSON Schema

I18nText

Any field marked I18nText accepts a plain string (base language) or a per-language map:

"text": "What is your age?"
"text": { "en": "What is your age?", "zh-Hans": "您的年龄?" }

Top-Level Object

FieldTypeReqDefaultNotes
survey_titleI18nTextyesUpdatable
groupsGroup[]yes
languagesstring[]no["en"]First = base. LimeSurvey locale codes, e.g. en, zh-Hans, zh-Hant-HK, ja.
survey_formatenumno"G"Presentation mode: "G" group-by-group, "A" all on one page, "S" one question per page. Updatable.

Group

FieldTypeReqNotes
titleI18nTextyes
questionsQuestion[]yes
descriptionI18nTextno
relevancestringnoLimeSurvey Expression Manager. Default "1" (always show). e.g. Q1 == 'A1'

Question

FieldTypeReqNotes
codestringyesUnique within survey. ^[A-Za-z][A-Za-z0-9]*$.
typeenumyesSee types below
textI18nTextyesFor equation, outer {…} may be omitted.
helpI18nTextno
mandatorybooleannoDefault false
relevancestringnoExpression Manager. Default "1".
allow_otherbooleannolist_radio only — adds free-text "Other" option
optionsOption[]condRequired for list_radio, list_dropdown, multiple_choice, ranking. Min 2.
array_subrowsSubrow[]condRequired for array_flexible. Min 2.
array_scaleScale[]condRequired for array_flexible. Min 2.

Question Types

typeUIRequired fields
long_textMulti-line input
short_textSingle-line input
numericNumber input
yes_noYes / No
list_radioRadio listoptions (≥2); optional: allow_other
list_dropdownDropdownoptions (≥2)
multiple_choiceCheckboxesoptions (≥2)
rankingDrag-to-rankoptions (≥2)
array_flexibleMatrix / Likert gridarray_subrows (≥2) + array_scale (≥2)
boilerplateDisplay-only text
file_uploadFile upload
equationHidden computed fieldtext = Expression Manager formula

Option / Subrow / Scale

FieldTypeReqNotes
codestringno (Option: auto A1, A2…) / yes (Subrow, Scale)
labelI18nTextyes

Validation

  • allow_otherlist_radio only
  • options/array_subrows/array_scale only on their respective types
  • code must be unique within the survey

Examples

Multi-language:

{
  "survey_title": { "en": "Customer Feedback", "zh-Hans": "客户反馈问卷" },
  "languages": ["en", "zh-Hans"],
  "groups": [{
    "title": { "en": "Satisfaction", "zh-Hans": "满意度" },
    "questions": [{
      "code": "Q1",
      "type": "list_radio",
      "text": { "en": "How satisfied are you?", "zh-Hans": "您的满意度如何?" },
      "mandatory": true,
      "options": [
        { "code": "A1", "label": { "en": "Very satisfied", "zh-Hans": "非常满意" } },
        { "code": "A2", "label": { "en": "Satisfied", "zh-Hans": "满意" } },
        { "code": "A3", "label": { "en": "Neutral", "zh-Hans": "一般" } },
        { "code": "A4", "label": { "en": "Dissatisfied", "zh-Hans": "不满意" } }
      ]
    }]
  }]
}

Conditional logic:

{
  "survey_title": "Product Research",
  "groups": [
    {
      "title": "Screening",
      "questions": [{
        "code": "S1", "type": "yes_no",
        "text": "Have you used our product in the last 30 days?",
        "mandatory": true
      }]
    },
    {
      "title": "Feedback",
      "relevance": "S1 == 'Y'",
      "questions": [
        {
          "code": "Q1", "type": "numeric",
          "text": "How likely are you to recommend us? (0–10)",
          "mandatory": true
        },
        {
          "code": "Q2", "type": "long_text",
          "text": "What would you improve?",
          "relevance": "Q1 <= 6"
        }
      ]
    }
  ]
}

On this page