Keysproperty operations Corbelstone Residential

#267 · Ticket past SLA · Signal Gardens

done Fri 18:10 · ticket 5298

Ledger row
policy v2
The call
POST /tickets/5298/dispatch vendor=215
Action, tier
dispatch_vendor, tier 0
Decided by
rules: No vendor at half the routine 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
routine ticket, 3598 min to the SLA's end
Outcome
Ticket 5298: vendor 215 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": [
    215,
    243,
    202
  ],
  "category": "repair",
  "currency": null,
  "due_at": "2026-11-02 06:08:47.419137",
  "manager_id": 1,
  "minutes_to_due": 3598,
  "mode": "no_vendor",
  "opened_at": "2026-10-28 06:08:47.419137",
  "priority": "routine",
  "source": "tenant_app",
  "stake_note": "routine ticket, 3598 min to the SLA's end",
  "started_at": "2026-10-30T18:08:47.419137",
  "summary": "General repair",
  "ticket_id": 5298,
  "trade": "general",
  "unit_id": 1208,
  "vendor_id": null,
  "vendor_no_shows_30d": 0
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27044,
        "ticket_id": 5298,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "assigned_at": "2026-10-30T18:10:00",
        "attended_at": "2026-10-31T09:43:03.436147",
        "closed_at": "2026-10-31T12:03:53.075137",
        "completed_at": "2026-10-31T11:03:53.075137",
        "id": 5298,
        "status": "assigned",
        "vendor_id": 215
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "assigned_at": "2026-11-02T11:38:48.187664",
        "attended_at": "2026-11-02T15:39:38.467612",
        "closed_at": null,
        "completed_at": "2026-11-02T18:45:49.800537",
        "id": 5298,
        "status": "completed",
        "vendor_id": 222
      }
    ]
  },
  "endpoint": "POST /tickets/5298/dispatch vendor=215",
  "note": "Ticket 5298: vendor 215 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_dispatch_vendor"
}

Arguments

{
  "ticket_id": 5298,
  "vendor_id": 215
}