{
  "format": "baxly-survey/1.0",
  "notes": "Example 2: a concept test with an A/B experiment (two variants see different concept pages), variables with rules, a matrix, a ranking, a theme, a completion form and a prize-drawing incentive.",
  "survey": {
    "name": "Concept test: new subscription tiers",
    "intro": {
      "headline": "Help us shape our next offer",
      "body": "<p>You will see a short description of a new idea and answer a few questions about it. About <b>5 minutes</b>.</p>",
      "minutes": 5,
      "consent": { "text": "<p>By continuing you agree that your answers may be used for product research. No personal details are shared.</p>" }
    },
    "experiment": {
      "variants": [
        { "key": "a", "label": "Concept A: Essentials" },
        { "key": "b", "label": "Concept B: Premium" }
      ]
    },
    "variables": [
      { "name": "Segment", "value": "General" },
      { "name": "Brand", "value": "Northwind" }
    ],
    "variable_rules": [
      { "name": "Segment", "value": "Power user", "when": { "question": "usage", "selected": "daily" } }
    ],
    "theme": { "style": "cards", "primary": "#0d9488", "width": "standard" },
    "completion_form": {
      "heading": "One more thing",
      "note": "<p>Leave your details to be entered in the drawing. Optional.</p>",
      "button": "Enter the drawing",
      "fields": [
        { "label": "Name", "width": "half" },
        { "label": "Email", "width": "half", "validation": "email", "required": true }
      ]
    },
    "incentive": {
      "type": "contest",
      "description": "Prize drawing: a chance to win a $100 gift card",
      "amount": 100,
      "rules": "<p>No purchase necessary. One entry per person. Winner drawn at random after the survey closes.</p>"
    }
  },
  "pages": [
    {
      "key": "usage_page",
      "title": "How you use {{var.Brand}}",
      "questions": [
        {
          "key": "usage",
          "type": "select_one",
          "text": "How often do you use {{var.Brand}}?",
          "required": true,
          "choices": [
            { "key": "daily", "text": "Daily" },
            { "key": "weekly", "text": "A few times a week" },
            { "key": "monthly", "text": "A few times a month" },
            { "key": "rarely", "text": "Rarely" }
          ]
        }
      ]
    },
    {
      "key": "concept_a",
      "title": "A new idea",
      "intro": "<h2>Essentials</h2><p>Everything you use today, at a lower monthly price, with email support.</p>",
      "show_when": { "variant": "a" },
      "questions": [
        {
          "key": "appeal_a",
          "type": "scale",
          "text": "How appealing is this idea to you?",
          "required": true,
          "settings": { "min": 1, "max": 7, "min_label": "Not at all appealing", "max_label": "Extremely appealing" },
          "ai_followup": { "goal": "Learn what would make the idea more appealing", "max": 2 }
        }
      ]
    },
    {
      "key": "concept_b",
      "title": "A new idea",
      "intro": "<h2>Premium</h2><p>Priority support, early access to new features and a dedicated account manager.</p>",
      "show_when": { "variant": "b" },
      "questions": [
        {
          "key": "appeal_b",
          "type": "scale",
          "text": "How appealing is this idea to you?",
          "required": true,
          "settings": { "min": 1, "max": 7, "min_label": "Not at all appealing", "max_label": "Extremely appealing" },
          "ai_followup": { "goal": "Learn what would make the idea more appealing", "max": 2 }
        }
      ]
    },
    {
      "key": "details",
      "title": "The details",
      "questions": [
        {
          "key": "attributes",
          "type": "matrix",
          "text": "How important is each of these to you?",
          "required": true,
          "rows": ["Price", "Support response time", "New features", "Reliability"],
          "choices": ["Not important", "Somewhat important", "Very important", "Essential"]
        },
        {
          "key": "priorities",
          "type": "ranking",
          "text": "Rank these from most to least important to you.",
          "settings": { "rank_count": 3 },
          "choices": ["Lower price", "Faster support", "More features", "Better reliability"]
        },
        {
          "key": "power_user_note",
          "type": "open_text",
          "text": "As someone who uses {{var.Brand}} every day, what would you change first?",
          "settings": { "multiline": true },
          "show_when": { "variable": "Segment", "equals": "Power user" }
        }
      ]
    }
  ]
}
