# alert.inactive

Canonical page: https://docs.ovok.com/signals/standalone/webhooks/alert-inactive

A patient sends no reading for the days set in `alertInactiveDays`. [`patient.inactive`](/signals/standalone/webhooks/patient-inactive) is sent beside it.

## Payload [#payload]

Every delivery is the envelope `type`, `timestamp`, `sequence` and `data`; the delivery's id is the `webhook-id` header. See [Verify webhooks](/signals/standalone/verify-webhooks).

```json
{
  "type": "alert.inactive",
  "timestamp": "2026-10-25T08:00:02.000Z",
  "sequence": 1048,
  "data": {
    "id": "0b9d7e52-1f3a-4e8c-b6a2-7c4d9e1f2a35",
    "patient": "6f1c2a8e-3b7d-4c55-9a0e-2d4b8f6e1a90",
    "component": {
      "code": {
        "coding": [
          {
            "system": "http://loinc.org"
          }
        ]
      }
    },
    "message": "No recent observations",
    "reason": "inactive",
    "createdAt": "2026-10-25T08:00:02.000Z",
    "updatedAt": "2026-10-25T08:00:02.000Z",
    "observationRefId": null,
    "derivedObservation": null,
    "patientRefId": "resident-001",
    "episodeId": null,
    "acknowledgedAt": null,
    "acknowledgedBy": null,
    "version": 1
  }
}
```

The `data` fields are those of [`alert.triggered`](/signals/standalone/webhooks/alert-triggered#payload). `reason` is `inactive`. No reading is behind it, so `observation` is absent and `observationRefId` is `null`.

## Handle the event [#handle-the-event]

Verify the delivery first ([Verify webhooks](/signals/standalone/verify-webhooks)), then act on the verified event as in [Handle an event](/signals/standalone/webhooks#handle-an-event).

<Tabs items={["Node.js", "Python", "Java"]} groupId="language" persist>
<Tab value="Node.js">

```js title="alert-inactive.js"
export async function handle(webhookId, event) {
  if (!(await firstTime(webhookId))) return;
  const { data } = event;
  switch (event.type) {
    case 'alert.inactive':
      await notifyCareTeam(data.patientRefId, data.message);
      break;
    default:
      break;
  }
}
```

</Tab>
<Tab value="Python">

```python title="alert_inactive.py"
def handle(webhook_id: str, event: dict) -> None:
    if not first_time(webhook_id):
        return
    data = event["data"]
    match event["type"]:
        case "alert.inactive":
            notify_care_team(data["patientRefId"], data["message"])
```

</Tab>
<Tab value="Java">

```java title="AlertInactiveHandler.java"
void handle(String webhookId, JsonNode event) {
  if (!firstTime(webhookId)) return;
  JsonNode data = event.get("data");
  switch (event.get("type").asText()) {
    case "alert.inactive" -> {
      notifyCareTeam(data.get("patientRefId").asText(), data.get("message").asText());
    }
    default -> {}
  }
}
```

</Tab>
</Tabs>

## Related [#related]

- [Webhooks basics](/signals/standalone/webhooks)
- [Verify webhooks](/signals/standalone/verify-webhooks)
