Keysproperty operations Corbelstone Residential

#398 · Ticket past SLA · Wharf Works

done Mon 12:35 · ticket 5554

Ledger row
policy v2
The call
POST /tickets/5554/dispatch vendor=136
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 46 this hour).
authority
conditions
cooldown
budget
Definition
ticket_sla_breach v1
At stake
urgent ticket, 720 min to the SLA's end
Outcome
Ticket 5554: vendor 136 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": "Wharf Works",
  "building_id": 46,
  "candidate_vendor_ids": [
    136,
    133,
    139
  ],
  "category": "no_heating",
  "currency": null,
  "due_at": "2026-11-03 00:35:12.312032",
  "manager_id": 6,
  "minutes_to_due": 720,
  "mode": "no_vendor",
  "opened_at": "2026-11-02 00:35:12.312032",
  "priority": "urgent",
  "source": "tenant_app",
  "stake_note": "urgent ticket, 720 min to the SLA's end",
  "started_at": "2026-11-02T12:35:12.312032",
  "summary": "No heating or hot water",
  "ticket_id": 5554,
  "trade": "hvac",
  "unit_id": 3248,
  "vendor_id": null,
  "vendor_no_shows_30d": 0
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27075,
        "ticket_id": 5554,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "assigned_at": "2026-11-02T12:35:30",
        "attended_at": "2026-11-02T16:53:16.202632",
        "closed_at": "2026-11-02T21:14:30.950355",
        "completed_at": "2026-11-02T20:14:30.950355",
        "id": 5554,
        "status": "assigned",
        "vendor_id": 136
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "assigned_at": null,
        "attended_at": null,
        "closed_at": null,
        "completed_at": null,
        "id": 5554,
        "status": "new",
        "vendor_id": null
      }
    ]
  },
  "endpoint": "POST /tickets/5554/dispatch vendor=136",
  "note": "Ticket 5554: vendor 136 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_dispatch_vendor"
}

Arguments

{
  "ticket_id": 5554,
  "vendor_id": 136
}