{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "SupaMoto KPT Exclusion Claim",
    "description": "Disqualify a household from KPT. You will also say whether this stops the rest of their onboarding. A red star * means you must answer.",
    "pages": [
      {
        "name": "household",
        "title": "Which household?",
        "elements": [
          {
            "type": "text",
            "name": "ecs:householdId",
            "title": "Household ID",
            "description": "The ID of the household being excluded (e.g. H12345678).",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "ecs:householdDid",
            "visible": false,
            "title": "Household Entity DID"
          }
        ]
      },
      {
        "name": "exclusion",
        "title": "Exclusion details",
        "elements": [
          {
            "type": "comment",
            "name": "ecs:kptExclusionReason",
            "title": "Reason for exclusion",
            "description": "Explain why this household is being disqualified from KPT.",
            "isRequired": true
          },
          {
            "type": "boolean",
            "name": "ecs:kptExclusionStopsOnboarding",
            "title": "Does this exclusion stop the customer's onboarding?",
            "description": "Yes: the customer is dropping out completely. Onboarding is cancelled and no order is placed. No: this is a correction, a quota issue or an equipment shortage. The customer carries on with onboarding and only skips the KPT step.",
            "isRequired": true,
            "labelTrue": "Yes - stop onboarding completely",
            "labelFalse": "No - continue onboarding, skip KPT only"
          },
          {
            "type": "text",
            "name": "ecs:kptExclusionDecisionMaker",
            "title": "Decision maker",
            "description": "Who made this decision. Free text for now - the exact format is still to be confirmed with the SupaMoto team.",
            "isRequired": true
          }
        ]
      },
      {
        "name": "reviewAndSubmit",
        "title": "Review",
        "elements": [
          {
            "type": "html",
            "name": "reviewMessageStop",
            "visibleIf": "{ecs:kptExclusionStopsOnboarding} = true",
            "html": "<h3>Almost done!</h3><p>Please review your answers before submitting. Approving this claim disqualifies this household from KPT <b>and cancels the rest of their onboarding</b>. No order will be placed.</p>"
          },
          {
            "type": "html",
            "name": "reviewMessageContinue",
            "visibleIf": "{ecs:kptExclusionStopsOnboarding} = false",
            "html": "<h3>Almost done!</h3><p>Please review your answers before submitting. Approving this claim disqualifies this household from KPT. <b>Their onboarding carries on</b> - only the KPT step is skipped.</p>"
          }
        ]
      }
    ],
    "checkErrorsMode": "onValueChanged",
    "validateVisitedEmptyFields": true,
    "textUpdateMode": "onTyping",
    "showPreviewBeforeComplete": true
  }
}
