Keysproperty operations Corbelstone Residential

#244 · Ticket past SLA · Quarry Tower

done Wed 02:20 · ticket 5250

Ledger row
policy v2
The call
POST /tickets/5250/dispatch vendor=120
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 79 this hour).
authority
conditions
cooldown
budget
Definition
ticket_sla_breach v1
At stake
urgent ticket, 716 min to the SLA's end
Outcome
Ticket 5250: vendor 120 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": "Quarry Tower",
  "building_id": 79,
  "candidate_vendor_ids": [
    120,
    114,
    112
  ],
  "category": "no_heating",
  "currency": null,
  "due_at": "2026-10-28 14:16:34.928848",
  "manager_id": 15,
  "minutes_to_due": 716,
  "mode": "no_vendor",
  "opened_at": "2026-10-27 14:16:34.928848",
  "priority": "urgent",
  "source": "tenant_app",
  "stake_note": "urgent ticket, 716 min to the SLA's end",
  "started_at": "2026-10-28T02:16:34.928848",
  "summary": "No heating or hot water",
  "ticket_id": 5250,
  "trade": "hvac",
  "unit_id": 5539,
  "vendor_id": null,
  "vendor_no_shows_30d": 0
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27025,
        "ticket_id": 5250,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "assigned_at": "2026-10-28T02:20:00",
        "attended_at": "2026-10-28T05:28:31.355284",
        "closed_at": "2026-10-28T08:23:29.829691",
        "completed_at": "2026-10-28T07:23:29.829691",
        "id": 5250,
        "status": "assigned",
        "vendor_id": 120
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "assigned_at": "2026-10-28T03:51:21.769183",
        "attended_at": "2026-10-28T13:00:29.942956",
        "closed_at": "2026-10-29T08:51:06.123115",
        "completed_at": "2026-10-28T15:52:22.808206",
        "id": 5250,
        "status": "closed",
        "vendor_id": 112
      }
    ]
  },
  "endpoint": "POST /tickets/5250/dispatch vendor=120",
  "note": "Ticket 5250: vendor 120 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_dispatch_vendor"
}

Arguments

{
  "ticket_id": 5250,
  "vendor_id": 120
}