Keysproperty operations Corbelstone Residential

#350 · Ticket past SLA · Wren Gardens

done Sun 08:40 · ticket 5507

Ledger row
policy v2
The call
POST /tickets/5507/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 39 this hour).
authority
conditions
cooldown
budget
Definition
ticket_sla_breach v1
At stake
urgent ticket, 717 min to the SLA's end
Outcome
Ticket 5507: 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": "Wren Gardens",
  "building_id": 39,
  "candidate_vendor_ids": [
    136,
    133,
    139
  ],
  "category": "no_heating",
  "currency": null,
  "due_at": "2026-11-01 20:37:24.113444",
  "manager_id": 5,
  "minutes_to_due": 717,
  "mode": "no_vendor",
  "opened_at": "2026-10-31 20:37:24.113444",
  "priority": "urgent",
  "source": "phone",
  "stake_note": "urgent ticket, 717 min to the SLA's end",
  "started_at": "2026-11-01T08:37:24.113444",
  "summary": "No heating or hot water",
  "ticket_id": 5507,
  "trade": "hvac",
  "unit_id": 2630,
  "vendor_id": null,
  "vendor_no_shows_30d": 0
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27066,
        "ticket_id": 5507,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "assigned_at": "2026-11-01T08:40:00",
        "attended_at": "2026-11-01T13:02:02.041604",
        "closed_at": "2026-11-01T15:40:49.951182",
        "completed_at": "2026-11-01T14:40:49.951182",
        "id": 5507,
        "status": "assigned",
        "vendor_id": 136
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "assigned_at": "2026-11-02T10:53:36.010321",
        "attended_at": "2026-11-02T17:30:11.249524",
        "closed_at": null,
        "completed_at": null,
        "id": 5507,
        "status": "in_progress",
        "vendor_id": 117
      }
    ]
  },
  "endpoint": "POST /tickets/5507/dispatch vendor=136",
  "note": "Ticket 5507: vendor 136 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_dispatch_vendor"
}

Arguments

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