{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.firstmilelabs.com/schemas/webhooks/screening.hit.escalated.v1.json",
  "title": "FirstMileLabs Outbound Webhook — screening.hit.escalated (v1)",
  "description": "Emitted when an analyst escalates a screening match, an adverse-media article or a self-exclusion match from the app, once the senior they picked has been told. Names who escalated it, who was told and whether the email went. Carries no note: the analyst's note to the senior stays in the app. A /v1 escalation doesn't emit it, because it names no senior.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "event",
    "eventId",
    "eventVersion",
    "timestamp",
    "orgId",
    "caseId",
    "hitId",
    "match",
    "escalatedTo",
    "emailed"
  ],
  "properties": {
    "event": { "type": "string", "const": "screening.hit.escalated" },
    "eventId": { "type": "string", "format": "uuid" },
    "eventVersion": { "type": "integer", "const": 1 },
    "timestamp": { "type": "string", "format": "date-time" },
    "orgId": { "type": "string" },
    "crmRecordId": { "type": ["string", "null"] },
    "crmSource": { "type": ["string", "null"] },
    "caseId": { "type": "string" },
    "hitId": { "type": "string", "description": "The escalated hit: the screening hit's id (as on screening.hit.detected), `am:<id>` for an adverse-media article, or the self-exclusion hit's id." },
    "match": { "type": "string", "enum": ["screening_hit", "adverse_media", "self_exclusion"], "description": "What was escalated." },
    "escalatedBy": { "type": ["string", "null"], "description": "The analyst who escalated it." },
    "escalatedTo": { "type": "string", "description": "The senior the analyst picked: one of the tenant's MLROs, Compliance admins or Admins." },
    "emailed": { "type": "boolean", "description": "Whether the email to the senior was sent. false when it couldn't be, for example while their access is suspended." }
  }
}
