Keysproperty operations Corbelstone Residential

#413 · Water alarm, no ticket · Mistral Point

done Mon 17:38 · alarm 2003

Ledger row
policy v2
The call
POST /tickets source=alarm alarm=2003
Action, tier
open_ticket_from_alarm, tier 0
Decided by
rules: Leak alarm live 11 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 42 this hour).
authority
conditions
cooldown
budget
Definition
water_alarm_no_ticket v1
At stake
water running 11 min with nobody sent
Outcome
Emergency ticket 5665 opened from alarm 2003, 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": 2003,
  "amount_at_risk": null,
  "asset_id": 1153,
  "building": "Mistral Point",
  "building_id": 42,
  "currency": null,
  "kind": "water_leak",
  "minutes_active": 11,
  "raised_at": "2026-11-02 17:27:59.796497",
  "sensor": "Home 4I",
  "stake_note": "water running 11 min with nobody sent",
  "started_at": "2026-11-02T17:37:59.796497",
  "unit_id": 2937
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27084,
        "ticket_id": 5665,
        "type": "created"
      },
      {
        "id": 27085,
        "ticket_id": 5665,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "alarm_id": 2003,
        "assigned_at": "2026-11-02T17:38:00",
        "attended_at": "2026-11-02T19:46:03.799570",
        "building_id": 42,
        "category": "leak",
        "closed_at": "2026-11-02T22:57:20.121201",
        "completed_at": "2026-11-02T21:57:20.121201",
        "due_at": "2026-11-02T21:38:00",
        "duplicate_of": null,
        "id": 5665,
        "opened_at": "2026-11-02T17:38:00",
        "priority": "emergency",
        "reported_by": "keys operator",
        "source": "alarm",
        "status": "assigned",
        "summary": "Water alarm: leak detected",
        "trade": "plumbing",
        "unit_id": 2937,
        "vendor_id": 37
      }
    ]
  },
  "before": {
    "tickets": []
  },
  "endpoint": "POST /tickets source=alarm alarm=2003",
  "note": "Emergency ticket 5665 opened from alarm 2003, vendor 37 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_open_ticket_from_alarm"
}

Arguments

{
  "alarm_id": 2003
}