Keysproperty operations Corbelstone Residential

#269 · Ticket past SLA · Driftwood Court

done Fri 23:35 · ticket 5431

Ledger row
policy v2
The call
POST /tickets/5431/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 57 this hour).
authority
conditions
cooldown
budget
Definition
ticket_sla_breach v1
At stake
urgent ticket, 718 min to the SLA's end
Outcome
Ticket 5431: 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": "Driftwood Court",
  "building_id": 57,
  "candidate_vendor_ids": [
    37,
    3,
    52
  ],
  "category": "leak",
  "currency": null,
  "due_at": "2026-10-31 11:33:21.437204",
  "manager_id": 4,
  "minutes_to_due": 718,
  "mode": "no_vendor",
  "opened_at": "2026-10-30 11:33:21.437204",
  "priority": "urgent",
  "source": "tenant_app",
  "stake_note": "urgent ticket, 718 min to the SLA's end",
  "started_at": "2026-10-30T23:33:21.437204",
  "summary": "Water leaking",
  "ticket_id": 5431,
  "trade": "plumbing",
  "unit_id": 4032,
  "vendor_id": null,
  "vendor_no_shows_30d": 0
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27047,
        "ticket_id": 5431,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "assigned_at": "2026-10-30T23:35:00",
        "attended_at": "2026-10-31T02:29:09.844425",
        "closed_at": "2026-10-31T06:53:08.174888",
        "completed_at": "2026-10-31T05:53:08.174888",
        "id": 5431,
        "status": "assigned",
        "vendor_id": 37
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "assigned_at": "2026-10-31T01:29:53.020039",
        "attended_at": "2026-10-31T09:29:35.664487",
        "closed_at": "2026-10-31T14:51:47.035465",
        "completed_at": "2026-10-31T11:53:28.359793",
        "id": 5431,
        "status": "closed",
        "vendor_id": 3
      }
    ]
  },
  "endpoint": "POST /tickets/5431/dispatch vendor=37",
  "note": "Ticket 5431: vendor 37 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_dispatch_vendor"
}

Arguments

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