Keysproperty operations Corbelstone Residential

#240 · Ticket past SLA · Lantern Court

done Tue 19:35 · ticket 5190

Ledger row
policy v2
The call
POST /tickets/5190/dispatch vendor=37 (replaces)
Action, tier
reassign_vendor, tier 1
Decided by
rules: Vendor 48 did not attend inside the SLA; send the next panel vendor and tell the building manager.
Controller
Allowed: reassign_vendor is tier 1 (do it and tell); within budget (0 of 6 actions at building 53 this hour).
authority
conditions
cooldown
budget
Definition
ticket_sla_breach v1
At stake
urgent ticket, -5 min to the SLA's end
Outcome
Ticket 5190: vendor 37 dispatched.
Undo
Put the first vendor back on the ticket.

Undo

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

Evidence

{
  "amount_at_risk": null,
  "assigned_at": "2026-10-26 23:04:46.745261",
  "building": "Lantern Court",
  "building_id": 53,
  "candidate_vendor_ids": [
    37,
    3,
    52
  ],
  "category": "blocked_drain",
  "currency": null,
  "due_at": "2026-10-27 19:30:03.731671",
  "manager_id": 6,
  "minutes_to_due": -5,
  "mode": "no_show",
  "opened_at": "2026-10-26 19:30:03.731671",
  "priority": "urgent",
  "source": "tenant_app",
  "stake_note": "urgent ticket, -5 min to the SLA's end",
  "started_at": "2026-10-27T19:30:03.731671",
  "summary": "Drain blocked",
  "ticket_id": 5190,
  "trade": "plumbing",
  "unit_id": 3830,
  "vendor_id": 48,
  "vendor_no_shows_30d": 1
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27020,
        "ticket_id": 5190,
        "type": "vendor_reassigned"
      }
    ],
    "tickets": [
      {
        "assigned_at": "2026-10-27T19:35:00",
        "attended_at": "2026-10-27T21:01:53.783205",
        "closed_at": "2026-10-27T23:14:27.382060",
        "completed_at": "2026-10-27T22:14:27.382060",
        "id": 5190,
        "status": "assigned",
        "vendor_id": 37
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "assigned_at": "2026-10-26T23:04:46.745261",
        "attended_at": "2026-10-28T14:49:23.017947",
        "closed_at": "2026-11-02T10:00:35.268624",
        "completed_at": "2026-11-01T13:31:19.113886",
        "id": 5190,
        "status": "closed",
        "vendor_id": 48
      }
    ]
  },
  "endpoint": "POST /tickets/5190/dispatch vendor=37 (replaces)",
  "note": "Ticket 5190: vendor 37 dispatched.",
  "notified": {
    "message_id": 39,
    "to": [
      "building manager"
    ]
  },
  "ok": true,
  "rollback_fn_name": "undo_reassign_vendor"
}

Arguments

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