{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/insuremo-com/json-schema/insuremo-com-comm-interaction-schema.json",
  "title": "CommInteraction",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/insuremo-com-connecthub-openapi.yml#/components/schemas/CommInteraction",
  "type": "object",
  "properties": {
    "AssignedTo": {
      "type": "string"
    },
    "Channel": {
      "type": "string"
    },
    "Content": {
      "type": "string"
    },
    "CustomerId": {
      "type": "string"
    },
    "Direction": {
      "type": "string",
      "enum": [
        "INBOUND",
        "OUTBOUND"
      ]
    },
    "ExecutionId": {
      "type": "integer",
      "format": "int64"
    },
    "Files": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CommInteractionFile"
      }
    },
    "HandledBy": {
      "type": "string"
    },
    "HandledStatus": {
      "type": "string",
      "enum": [
        "NEW",
        "ROUTED",
        "CLOSED"
      ]
    },
    "HandledTime": {
      "type": "string",
      "description": "UTC local date-time without offset or zone; date-only means midnight UTC. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "InteractionId": {
      "type": "integer",
      "format": "int64"
    },
    "OccurredAt": {
      "type": "string",
      "description": "UTC local date-time without offset or zone; date-only means midnight UTC. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "PreferenceApplied": {
      "type": "boolean"
    },
    "PreferenceReason": {
      "type": "string"
    },
    "RecipientId": {
      "type": "string"
    },
    "RecordedAt": {
      "type": "string",
      "description": "UTC local date-time without offset or zone; date-only means midnight UTC. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "RecordedBy": {
      "type": "string"
    },
    "RefNumber": {
      "type": "string"
    },
    "RefType": {
      "type": "string"
    },
    "Revision": {
      "type": "integer",
      "format": "int64"
    },
    "RoutedBy": {
      "type": "string"
    },
    "RoutedTime": {
      "type": "string",
      "description": "UTC local date-time without offset or zone; date-only means midnight UTC. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics. Offset-free local date/time. The platform wire format can use yyyy-MM-dd at midnight, yyyy-MM-ddTHH:mm or yyyy-MM-ddTHH:mm:ss[.fraction]; no offset is embedded. Apply the field-specific time-zone semantics."
    },
    "SourceId": {
      "type": "string"
    },
    "SourceSystem": {
      "type": "string"
    },
    "TraceId": {
      "type": "string"
    },
    "Type": {
      "type": "string",
      "enum": [
        "MESSAGE",
        "ACK",
        "FILE",
        "CONTACT",
        "OPT_OUT",
        "BOUNCE",
        "COMPLAINT"
      ]
    }
  },
  "$defs": {
    "CommInteractionFile": {
      "type": "object",
      "properties": {
        "DocId": {
          "type": "integer",
          "format": "int64"
        },
        "FileName": {
          "type": "string"
        },
        "MediaType": {
          "type": "string"
        },
        "SizeBytes": {
          "type": "integer",
          "format": "int64"
        }
      }
    }
  }
}