# Configuration Levels

Source: https://supernotify.rhizomatics.org.uk/latest/configuration/levels/

## Flexible Configuration

Delivery configuration can be done in lots of different ways to suit different configurations and to keep those configuration as minimal as possible.

Each delivery can be individually configured, or have defaults provided by a `transport` configuration. A limited set of overrides - `target`,`data`,`enabled` - can then be applied by scenarios, people definitions in `recipients` or in the notification call. (The limited set is to keep both the code and configuration from being so flexible its too complicated to work with.)

| Where                       | Where              | Schema                                                                                                                                                               | Notes                                                                                                                                                                                                                                                                                                                                           |
| --------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Action Data                 | Runtime call       | [Delivery Customization](https://supernotify.rhizomatics.org.uk/latest/developer/reference/schemas/Delivery_Customization/index.md)                                  | Only `target`,`enabled` and `data` can be overridden                                                                                                                                                                                                                                                                                            |
| Recipient delivery override | Runtime call       | [Delivery Customization](https://supernotify.rhizomatics.org.uk/latest/developer/reference/schemas/Delivery_Customization/index.md)                                  | Only `target`,`enabled` and `data` can be overridden                                                                                                                                                                                                                                                                                            |
| Scenario delivery override  | Runtime call       | [Delivery Customization](https://supernotify.rhizomatics.org.uk/latest/developer/reference/schemas/Delivery_Customization/index.md)                                  | Multiple scenarios applied in no special order. Only `target`,`enabled` and `data` can be overridden. `enabled` can also be left empty so scenario only applies to deliveries already selected. `enabled: true` will force the delivery on and `enabled: false` will force it off, whether an implicit delivery or selected by another scenario |
| Delivery definition         | Configuration      | [Delivery](https://supernotify.rhizomatics.org.uk/latest/developer/reference/schemas/Delivery_Definition/index.md)                                                   | `message` and `title` are the exceptions which override Action Data                                                                                                                                                                                                                                                                             |
| Transport Delivery Defaults | Configuration      | [Transport Delivery Defaults](https://supernotify.rhizomatics.org.uk/latest/developer/reference/schemas/Transport_Definition/#property-transport-definition-enabled) |                                                                                                                                                                                                                                                                                                                                                 |
| Transport Adaptor Defaults  | Code               | -                                                                                                                                                                    |                                                                                                                                                                                                                                                                                                                                                 |
| Underlying action defaults  | Other Integrations | -                                                                                                                                                                    | These are configured outside Supernotify                                                                                                                                                                                                                                                                                                        |

For example, if there's one specific automation you didn't want to have your `alexa_devices_announce_all` delivery applied, you could disable it like this rather than adding more rules to the supernotify config for just one case:

```yaml
  - action: supernotify.notify
    data:
        title: For Your Eyes Only
        message: There might be someone in the house!!!
        delivery:
            alexa_devices_announce_all:
                enabled: false
```

## Priority order of configuration application

1. Action Data passed at runtime call
1. Recipient delivery override
1. Scenario delivery override
1. Delivery definition
1. Transport defaults
1. Target notification action defaults, e.g. mail recipients ( this isn't applied inside Supernotify )
