Keysproperty operations Corbelstone Residential

#351 · Ticket past SLA · Fenwick Works

done Sun 08:45 · ticket 5508

Ledger row
policy v2
The call
POST /tickets/5508/dispatch vendor=136
Action, tier
dispatch_vendor, tier 0
Decided by
rules: No vendor at half the urgent SLA; dispatch the best panel vendor.
Controller
Allowed: dispatch_vendor is tier 0 (just do it); within budget (0 of 6 actions at building 58 this hour).
authority
conditions
cooldown
budget
Definition
ticket_sla_breach v1
At stake
urgent ticket, 717 min to the SLA's end
Outcome
Ticket 5508: vendor 136 dispatched.
Undo
Cancel the dispatch.

Undo

Restores the before-snapshot below and writes a new row.

Evidence

{
  "amount_at_risk": null,
  "assigned_at": null,
  "building": "Fenwick Works",
  "building_id": 58,
  "candidate_vendor_ids": [
    136,
    133,
    139
  ],
  "category": "no_heating",
  "currency": null,
  "due_at": "2026-11-01 20:42:11.235828",
  "manager_id": 2,
  "minutes_to_due": 717,
  "mode": "no_vendor",
  "opened_at": "2026-10-31 20:42:11.235828",
  "priority": "urgent",
  "source": "tenant_app",
  "stake_note": "urgent ticket, 717 min to the SLA's end",
  "started_at": "2026-11-01T08:42:11.235828",
  "summary": "No heating or hot water",
  "ticket_id": 5508,
  "trade": "hvac",
  "unit_id": 4336,
  "vendor_id": null,
  "vendor_no_shows_30d": 0
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27067,
        "ticket_id": 5508,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "assigned_at": "2026-11-01T08:45:00",
        "attended_at": "2026-11-01T14:07:05.121617",
        "closed_at": "2026-11-01T18:10:53.764963",
        "completed_at": "2026-11-01T17:10:53.764963",
        "id": 5508,
        "status": "assigned",
        "vendor_id": 136
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "assigned_at": "2026-11-02T12:29:55.845663",
        "attended_at": "2026-11-02T14:25:46.479652",
        "closed_at": null,
        "completed_at": null,
        "id": 5508,
        "status": "in_progress",
        "vendor_id": 139
      }
    ]
  },
  "endpoint": "POST /tickets/5508/dispatch vendor=136",
  "note": "Ticket 5508: vendor 136 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_dispatch_vendor"
}

Arguments

{
  "ticket_id": 5508,
  "vendor_id": 136
}