Keysproperty operations Corbelstone Residential

#314 · Water alarm, no ticket · Heron Court

done Sat 15:55 · alarm 1955

Ledger row
policy v2
The call
POST /tickets source=alarm alarm=1955
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 74 this hour).
authority
conditions
cooldown
budget
Definition
water_alarm_no_ticket v1
At stake
water running 12 min with nobody sent
Outcome
Emergency ticket 5657 opened from alarm 1955, vendor 26 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": 1955,
  "amount_at_risk": null,
  "asset_id": 2202,
  "building": "Heron Court",
  "building_id": 74,
  "currency": null,
  "kind": "water_leak",
  "minutes_active": 12,
  "raised_at": "2026-10-31 15:43:08.331809",
  "sensor": "Home 1107",
  "stake_note": "water running 12 min with nobody sent",
  "started_at": "2026-10-31T15:53:08.331809",
  "unit_id": 5310
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27052,
        "ticket_id": 5657,
        "type": "created"
      },
      {
        "id": 27053,
        "ticket_id": 5657,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "alarm_id": 1955,
        "assigned_at": "2026-10-31T15:55:00",
        "attended_at": "2026-10-31T18:33:07.871706",
        "building_id": 74,
        "category": "leak",
        "closed_at": "2026-10-31T21:26:13.297986",
        "completed_at": "2026-10-31T20:26:13.297986",
        "due_at": "2026-10-31T19:55:00",
        "duplicate_of": null,
        "id": 5657,
        "opened_at": "2026-10-31T15:55:00",
        "priority": "emergency",
        "reported_by": "keys operator",
        "source": "alarm",
        "status": "assigned",
        "summary": "Water alarm: leak detected",
        "trade": "plumbing",
        "unit_id": 5310,
        "vendor_id": 26
      }
    ]
  },
  "before": {
    "tickets": []
  },
  "endpoint": "POST /tickets source=alarm alarm=1955",
  "note": "Emergency ticket 5657 opened from alarm 1955, vendor 26 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_open_ticket_from_alarm"
}

Arguments

{
  "alarm_id": 1955
}