# ovok_sdk.resources.omnichannel_alerts

Canonical page: https://docs.ovok.com/python-sdk/reference/resources/omnichannel_alerts

Omni-channel alerts: the rule that decides who hears of each Signals alert event, and its preview.

## NotificationsRulesResource [#notificationsrulesresource]

```python
NotificationsRulesResource(http: HttpClient)
```

The project's alert notifications rule; access it as `ovok.omnichannel_alerts.rules`.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `http` | `HttpClient` |  | The HTTP client scoped to the omni-channel alerts routes. |

### retrieve() [#retrieve]

```python
retrieve() -> Any
```

Read the rule.

**Returns**

- `Any`: The rule under `notifications`, None when the project has none.

### update() [#update]

```python
update(rule: JsonObject) -> Any
```

Set the rule; Ovok checks the channels and recipients it names.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `rule` | `JsonObject` |  | The rule, with its JSON Logic under `logic`. |

**Returns**

- `Any`: The rule as Ovok now runs it.

### remove() [#remove]

```python
remove() -> None
```

Remove the rule, so nobody is told of a new alert.

## OmnichannelAlertsResource [#omnichannelalertsresource]

```python
OmnichannelAlertsResource(http: HttpClient)
```

Ovok runs the project's rule on each Signals alert event and tells the people it names.

For project admins. Created by `Ovok`; access it as `ovok.omnichannel_alerts`.

### preview() [#preview]

```python
preview(preview: JsonObject) -> Any
```

Preview who the rule tells of a sample alert event; nothing is sent.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `preview` | `JsonObject` |  | The `patientId`, an optional `event` (`alert.triggered` when omitted), an optional sample `alert` and an optional `notifications` rule to try. |

**Returns**

- `Any`: The `notify` entries the rule answers, each with the people it reaches.
