{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "3CX Call — Link to Customer",
    "description": "Link this call to a customer record and capture the outcome. The Call ID is filled in automatically from 3CX.",
    "pages": [
      {
        "name": "ixo:CallLinkClaim",
        "elements": [
          {
            "type": "text",
            "name": "ixo:callId",
            "title": "Call ID",
            "description": "Auto-filled from 3CX. Do not edit.",
            "isRequired": true,
            "readOnly": true
          },
          {
            "type": "text",
            "name": "ixo:linkedCustomer",
            "title": "Customer",
            "description": "Search by customer ID or name. The portal will show matching customers as you type.",
            "isRequired": true,
            "placeholder": "e.g. CUS-1042 or Acme Ltd"
          },
          {
            "type": "radiogroup",
            "name": "ixo:callOutcome",
            "title": "Call outcome",
            "description": "Pick the closest match. Add detail in Notes if needed.",
            "isRequired": true,
            "choices": [
              {
                "value": "resolved",
                "text": "Resolved — customer satisfied"
              },
              {
                "value": "partial",
                "text": "Partial — follow-up needed"
              },
              {
                "value": "complaint",
                "text": "Complaint logged"
              },
              {
                "value": "not-reached",
                "text": "Customer not reached / voicemail"
              },
              {
                "value": "info-provided",
                "text": "Information provided"
              },
              {
                "value": "sale-closed",
                "text": "Sale closed"
              },
              {
                "value": "lead-captured",
                "text": "Lead captured"
              },
              {
                "value": "other",
                "text": "Other (describe in Notes)"
              }
            ]
          },
          {
            "type": "comment",
            "name": "schema:comment",
            "title": "Notes (optional)",
            "description": "Anything the next person needs to know about this call.",
            "maxLength": 2000,
            "rows": 3
          }
        ]
      }
    ],
    "questionErrorLocation": "bottom",
    "completeText": "Submit"
  }
}