Keysproperty operations Corbelstone Residential

#252 · Ticket past SLA · Rowan House

done Wed 20:50 · ticket 5307

Ledger row
policy v2
The call
POST /tickets/5307/dispatch vendor=37
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 47 this hour).
authority
conditions
cooldown
budget
Definition
ticket_sla_breach v1
At stake
urgent ticket, 717 min to the SLA's end
Outcome
Ticket 5307: vendor 37 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": "Rowan House",
  "building_id": 47,
  "candidate_vendor_ids": [
    37,
    3,
    52
  ],
  "category": "blocked_drain",
  "currency": null,
  "due_at": "2026-10-29 08:47:03.958953",
  "manager_id": 3,
  "minutes_to_due": 717,
  "mode": "no_vendor",
  "opened_at": "2026-10-28 08:47:03.958953",
  "priority": "urgent",
  "source": "tenant_app",
  "stake_note": "urgent ticket, 717 min to the SLA's end",
  "started_at": "2026-10-28T20:47:03.958953",
  "summary": "Drain blocked",
  "ticket_id": 5307,
  "trade": "plumbing",
  "unit_id": 3449,
  "vendor_id": null,
  "vendor_no_shows_30d": 0
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27032,
        "ticket_id": 5307,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "assigned_at": "2026-10-28T20:50:00",
        "attended_at": "2026-10-29T01:51:54.910151",
        "closed_at": "2026-10-29T04:48:03.796579",
        "completed_at": "2026-10-29T03:48:03.796579",
        "id": 5307,
        "status": "assigned",
        "vendor_id": 37
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "assigned_at": "2026-10-30T07:37:36.228813",
        "attended_at": "2026-10-30T12:24:32.025488",
        "closed_at": null,
        "completed_at": null,
        "id": 5307,
        "status": "in_progress",
        "vendor_id": 6
      }
    ]
  },
  "endpoint": "POST /tickets/5307/dispatch vendor=37",
  "note": "Ticket 5307: vendor 37 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_dispatch_vendor"
}

Arguments

{
  "ticket_id": 5307,
  "vendor_id": 37
}