Keysproperty operations Corbelstone Residential

#261 · Ticket past SLA · Kestrel Works

done Fri 00:05 · ticket 5240

Ledger row
policy v2
The call
POST /tickets/5240/dispatch vendor=283
Action, tier
dispatch_vendor, tier 0
Decided by
rules: No vendor at half the routine SLA; dispatch the best panel vendor.
Controller
Allowed: dispatch_vendor is tier 0 (just do it); within budget (0 of 6 actions at building 84 this hour).
authority
conditions
cooldown
budget
Definition
ticket_sla_breach v1
At stake
routine ticket, 3596 min to the SLA's end
Outcome
Ticket 5240: vendor 283 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": "Kestrel Works",
  "building_id": 84,
  "candidate_vendor_ids": [
    283,
    280,
    276
  ],
  "category": "pests",
  "currency": null,
  "due_at": "2026-11-01 12:01:30.908298",
  "manager_id": 16,
  "minutes_to_due": 3596,
  "mode": "no_vendor",
  "opened_at": "2026-10-27 12:01:30.908298",
  "priority": "routine",
  "source": "tenant_app",
  "stake_note": "routine ticket, 3596 min to the SLA's end",
  "started_at": "2026-10-30T00:01:30.908298",
  "summary": "Pests seen",
  "ticket_id": 5240,
  "trade": "pest",
  "unit_id": 5705,
  "vendor_id": null,
  "vendor_no_shows_30d": 0
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27038,
        "ticket_id": 5240,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "assigned_at": "2026-10-30T00:05:00",
        "attended_at": "2026-10-30T13:05:06.025242",
        "closed_at": "2026-10-30T16:33:16.412646",
        "completed_at": "2026-10-30T15:33:16.412646",
        "id": 5240,
        "status": "assigned",
        "vendor_id": 283
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "assigned_at": "2026-11-01T19:40:51.005739",
        "attended_at": "2026-11-02T01:11:01.588422",
        "closed_at": "2026-11-02T18:44:05.497876",
        "completed_at": "2026-11-02T04:14:18.439866",
        "id": 5240,
        "status": "closed",
        "vendor_id": 283
      }
    ]
  },
  "endpoint": "POST /tickets/5240/dispatch vendor=283",
  "note": "Ticket 5240: vendor 283 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_dispatch_vendor"
}

Arguments

{
  "ticket_id": 5240,
  "vendor_id": 283
}