Keysproperty operations Corbelstone Residential

#268 · Water alarm, no ticket · Heron Works

done Fri 20:35 · alarm 1941

Ledger row
policy v2
The call
POST /tickets source=alarm alarm=1941
Action, tier
open_ticket_from_alarm, tier 0
Decided by
rules: Leak alarm live 12 minutes with no ticket; open an emergency ticket now.
Controller
Allowed: open_ticket_from_alarm is tier 0 (just do it); within budget (0 of 6 actions at building 14 this hour).
authority
conditions
cooldown
budget
Definition
water_alarm_no_ticket v1
At stake
water running 12 min with nobody sent
Outcome
Emergency ticket 5655 opened from alarm 1941, vendor 37 dispatched.
Undo
Close the ticket as raised in error and cancel the dispatch.

Undo

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

Evidence

{
  "alarm_id": 1941,
  "amount_at_risk": null,
  "asset_id": 358,
  "building": "Heron Works",
  "building_id": 14,
  "currency": null,
  "kind": "water_leak",
  "minutes_active": 12,
  "raised_at": "2026-10-30 20:23:43.850066",
  "sensor": "Home 4F",
  "stake_note": "water running 12 min with nobody sent",
  "started_at": "2026-10-30T20:33:43.850066",
  "unit_id": 761
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27045,
        "ticket_id": 5655,
        "type": "created"
      },
      {
        "id": 27046,
        "ticket_id": 5655,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "alarm_id": 1941,
        "assigned_at": "2026-10-30T20:35:00",
        "attended_at": "2026-10-30T22:40:26.846864",
        "building_id": 14,
        "category": "leak",
        "closed_at": "2026-10-31T03:36:05.409831",
        "completed_at": "2026-10-31T02:36:05.409831",
        "due_at": "2026-10-31T00:35:00",
        "duplicate_of": null,
        "id": 5655,
        "opened_at": "2026-10-30T20:35:00",
        "priority": "emergency",
        "reported_by": "keys operator",
        "source": "alarm",
        "status": "assigned",
        "summary": "Water alarm: leak detected",
        "trade": "plumbing",
        "unit_id": 761,
        "vendor_id": 37
      },
      {
        "closed_at": "2026-10-30T22:37:04.758255",
        "duplicate_of": 5655,
        "id": 5461,
        "status": "merged"
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "closed_at": "2026-10-31T19:02:49.862494",
        "duplicate_of": null,
        "id": 5461,
        "status": "closed"
      }
    ]
  },
  "endpoint": "POST /tickets source=alarm alarm=1941",
  "note": "Emergency ticket 5655 opened from alarm 1941, vendor 37 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_open_ticket_from_alarm"
}

Arguments

{
  "alarm_id": 1941
}