Keysproperty operations Corbelstone Residential

#319 · Ticket past SLA · Signal Gardens

done Sat 17:40 · ticket 5466

Ledger row
policy v2
The call
POST /tickets/5466/dispatch vendor=166
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 21 this hour).
authority
conditions
cooldown
budget
Definition
ticket_sla_breach v1
At stake
urgent ticket, 717 min to the SLA's end
Outcome
Ticket 5466: vendor 166 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": "Signal Gardens",
  "building_id": 21,
  "candidate_vendor_ids": [
    166,
    169,
    173
  ],
  "category": "roof_gutter",
  "currency": null,
  "due_at": "2026-11-01 05:37:55.865331",
  "manager_id": 1,
  "minutes_to_due": 717,
  "mode": "no_vendor",
  "opened_at": "2026-10-31 05:37:55.865331",
  "priority": "urgent",
  "source": "site_team",
  "stake_note": "urgent ticket, 717 min to the SLA's end",
  "started_at": "2026-10-31T17:37:55.865331",
  "summary": "Gutter overflowing",
  "ticket_id": 5466,
  "trade": "roofing",
  "unit_id": null,
  "vendor_id": null,
  "vendor_no_shows_30d": 0
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27059,
        "ticket_id": 5466,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "assigned_at": "2026-10-31T17:40:00",
        "attended_at": "2026-10-31T21:20:32.382948",
        "closed_at": "2026-11-01T02:02:40.275984",
        "completed_at": "2026-11-01T01:02:40.275984",
        "id": 5466,
        "status": "assigned",
        "vendor_id": 166
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "assigned_at": "2026-11-02T03:30:51.945173",
        "attended_at": "2026-11-02T05:19:52.164508",
        "closed_at": null,
        "completed_at": "2026-11-02T10:33:48.526324",
        "id": 5466,
        "status": "completed",
        "vendor_id": 169
      }
    ]
  },
  "endpoint": "POST /tickets/5466/dispatch vendor=166",
  "note": "Ticket 5466: vendor 166 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_dispatch_vendor"
}

Arguments

{
  "ticket_id": 5466,
  "vendor_id": 166
}