> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Notification Layer

> Follow notification delivery, inspect each notification and its delivery attempts, configure the email, SMS, and webhook delivery profiles, and change the delivery settings in Lerian Console.

The Notification Layer is the Console area for the notifications that the platform sends by email, SMS, and webhook. Use it to:

* Follow the delivery figures on the **Overview** screen.
* Find a notification, read its delivery attempts, and retry or cancel it.
* Configure the delivery profiles that send each channel.
* Change the runtime settings of the delivery service.

## Open the Notification Layer

***

Click the gear icon (<Icon icon="gear" />) in the top navigation bar, then select **Notification Layer**. The same entry is also in the Settings sidebar. The area has its own sidebar with four screens: **Overview**, **Notifications**, **Delivery Profiles**, and **Settings**.

With Access Manager, the entry needs the read permission on notifications. Without that permission, **Notification Layer** does not appear in the gear menu or in the Settings sidebar.

Each screen and action needs its own permission:

| Screen or action | Permission with Access Manager |
| - | - |
| **Overview**, **Notifications**, and the detail of a notification | Read on notifications |
| **Retry delivery** and **Cancel notification** | Create on notifications |
| **Delivery Profiles** and the detail of a profile | Read on delivery profiles |
| **New delivery profile** | Create on delivery profiles |
| **Save changes** and **Edit credentials** on a profile | Update on delivery profiles |
| **Delete** a profile | Delete on delivery profiles |
| **Settings** | Read on systemplane, the resource that holds the runtime settings |
| Save a change on **Settings** | Update on systemplane |

## Overview

***

The **Overview** screen sums up notification delivery across all channels. Six cards stand at the top:

| Card | What it shows |
| - | - |
| **Total** | The number of notifications. |
| **Delivered** | The notifications with the status **Delivered**. |
| **Delivery Rate** | The delivered notifications as a percentage of the delivered and failed ones together. |
| **Failed** | The notifications with the status **Failed** or **Exhausted**. |
| **Pending** | The notifications with the status **Pending** or **Processing**. |
| **p95 Latency** | The 95th percentile of the delivery attempt latency. The 99th percentile shows below it. |

Below the cards:

* **Total Attempts** and **Avg Attempts per Notification** count the delivery attempts.
* **Top Failure Reasons** shows the failures by reason, for example **Invalid recipient** or **Rejected by Twilio**. A reason without a label shows its failure code.
* **Volume by Channel** shows the number of notifications on each channel.
* **Recent Notifications** lists the latest notifications with their **Status**, **Channel**, **Recipient**, **Subject**, **Priority**, and **Created** date.

If the Console cannot read the figures, the screen shows **Could not load notification overview** in place of all of them. Click **Retry** to read them again.

## Notifications

***

The **Notifications** screen lists the notifications of the platform. The table has the columns **Status**, **Channel**, **Subject**, **Recipient**, **Priority**, and **Created**. To open a notification, open the menu in the **Actions** column and select **View**.

### Notification statuses

| Status | Meaning |
| - | - |
| **Pending** | The notification waits for its next delivery attempt. |
| **Processing** | A delivery attempt is in progress. |
| **Delivered** | The provider accepted the message. This status is final. |
| **Failed** | The last attempt failed. |
| **Exhausted** | The service makes no more attempts, because the attempts ran out or the failure is permanent. |
| **Canceled** | Someone canceled the notification. This status is final. |

### Filter the list

Open the **Filters** panel to narrow the list:

* **Status**: click one or more status chips.
* **Channel**: **Email**, **SMS**, or **Webhook**.
* **Recipient**: the exact recipient.
* **Correlation ID**: the correlation identifier of the notification.
* **Failure code**: the failure codes from the overview, the most frequent first.
* **Created from** and **Created to**: the creation date range.

A field with a value shows **Clear** next to its label. **Clear filters** empties every field. **Items per page** sets the page size.

### Notification detail

The **Notification Detail** screen shows one notification in cards:

* The first card shows the status, the channel, **ID**, **Subject**, **Recipient**, **Destination**, **Priority**, and **Correlation ID**.
* **Delivery** shows **Attempts** (used and maximum), **Scheduled at**, **Next attempt at**, **Delivered at**, **Failed at**, **Canceled at**, **Canceled by**, **Provider message ID**, **Failure code**, **Created at**, and **Updated at**.
* **Metadata** and **Failure detail** show as JSON when the notification has them.

**Back to notifications** returns to the list.

### Delivery attempts

The **Delivery attempts** card lists the attempts, oldest first, as **Attempt 1**, **Attempt 2**, and so on. Each attempt shows:

* Its result and the time of the attempt.
* **Provider**: the delivery profile that made the attempt.
* **Response**: the response code, when there is one.
* **Latency**: the duration of the attempt, in milliseconds.
* The error message, when the attempt failed.
* **Response body**: click it to expand the body that the provider returned.

When the notification has no attempt yet, the card shows **No delivery attempts recorded yet.**

### Retry or cancel a notification

**Retry delivery** is available when the status is **Failed** or **Exhausted**. Confirm in the **Retry delivery?** dialog. The notification goes back to **Pending**, and the service attempts delivery again.

**Cancel notification** is available when the status is **Pending**, **Processing**, or **Failed**. Confirm in the **Cancel notification?** dialog. You cannot undo a cancellation. The service makes no new delivery attempt.

## Delivery Profiles

***

A delivery profile connects a channel to a provider and holds the credentials for that provider. The **Delivery Profiles** screen lists the profiles with the columns **Name**, **Channel**, **Provider**, **Status**, **Priority**, **Default**, and **Updated**. The row menu in **Actions** has **View** and **Delete**.

When a channel has more than one active profile, the service uses the profile with the highest priority first. A tie goes to the default profile, then to the oldest profile. The service skips inactive profiles.

### Create a delivery profile

<Steps>
  <Step title="Open the form">
    Click **New delivery profile**.
  </Step>

  <Step title="Name the profile">
    Type a **Name**.
  </Step>

  <Step title="Choose the channel and the provider">
    Select the **Channel**, then the **Provider**. You cannot change either one after you create the profile.
  </Step>

  <Step title="Set the selection fields">
    Set the **Status**, the **Priority**, and the **Default for this channel** switch.
  </Step>

  <Step title="Set the limits">
    Optionally, type a **Rate limit (per second)** and a **Daily limit**. An empty limit means no limit.
  </Step>

  <Step title="Fill in the provider configuration">
    Fill in the fields of the **Provider configuration** section. The fields change with the provider, as the next sections show.
  </Step>

  <Step title="Save">
    Click **Save**. The Console returns to the list.
  </Step>
</Steps>

### Email and SMS providers

Each channel has its own providers. An asterisk (\*) marks a required field.

| Channel | Provider | Configuration fields |
| - | - | - |
| **Email** | **SMTP** | **Host**\*, **Port**\*, **From**\*, **Username**, **Password** |
| **Email** | **AWS\_SES** | **AWS region**\*, **Access key ID**\*, **Secret access key**\*, **Session token**, **From**\* |
| **Email** | **SENDGRID** | **API key**\*, **From**\*, **From name** |
| **SMS** | **TWILIO** | **Account SID**\*, **Auth token**\*, **From**\* |
| **SMS** | **ZENVIA** | **API token**\*, **From**\* |
| **SMS** | **INFOBIP** | **API key**\*, **Base URL**\*, **From**\* |

**From** is the sender that recipients see, such as an email address or an approved SMS sender ID. The SMTP **Port** accepts a value from 1 to 65535.

### Webhook provider

The **Webhook** channel has one provider, **HTTP\_WEBHOOK**. The profile does not hold the endpoint address: each webhook notification carries its own address in **Destination**.

The webhook profile has these fields:

* **Signing secret (HMAC)**: optional. The service signs the request body with this secret, so that the destination can verify the sender.
* **Destination auth**: how the service authenticates to the destination. Select **none** for no authentication.
* **Custom headers**: optional name and value pairs that the service sends on every request.

The **Destination auth** value adds its own fields:

| Destination auth | Fields |
| - | - |
| **basic** | **Username**\*, **Password**\* |
| **bearer\_static** | **Token**\* |
| **oauth2\_client\_credentials** | **Auth URL**\*, **Client ID**\*, **Client secret**\*, **Scope**, **Audience** |
| **jwt\_exchange** | **Auth URL**\*, **Token path**\*, **Expires-in path**\*, **HTTP method**, **Custom headers**, **Request body (JSON)** |

For **oauth2\_client\_credentials** and **jwt\_exchange**, **Auth URL** is the token endpoint that the service calls before it delivers the webhook. For **jwt\_exchange**, **Token path** and **Expires-in path** are the JSON paths of the access token and of its lifetime in the response.

### Delivery profile detail

The **Delivery Profile** screen shows the status, the channel, and the provider of the profile at the top. You can change these fields:

* **Name**
* **Status**
* **Priority**
* **Rate limit**
* **Daily limit**
* **Default profile for this channel**

Click **Save changes** to save them. After the priority or a limit has a value, you can change that value, but you cannot clear it.

The **Lifecycle** section shows **ID**, **Channel**, **Provider type**, **Consecutive failures**, **Last success**, **Last failure**, **Created at**, and **Updated at**. **Consecutive failures** goes back to zero after the next successful delivery.

### Replace the credentials

The **Provider configuration & credentials** section does not show the stored credentials. To replace them:

<Steps>
  <Step title="Open the editor">
    Click **Edit credentials**.
  </Step>

  <Step title="Fill in every field">
    Fill in all the fields you want to keep. Secret fields, such as passwords, API keys, and tokens, open empty.
  </Step>

  <Step title="Save">
    Click **Save credentials**. The new values replace the full provider configuration. To stop, click **Cancel**.
  </Step>
</Steps>

### Delete a delivery profile

Click **Delete** on the profile screen, or select **Delete** in the row menu of the list. Then click **Confirm** in the dialog.

## Settings

***

The **Settings** screen shows the runtime settings of the delivery service, by group. Changes apply without a restart. Each row shows the setting, its key, a description, and the allowed values.

| Group | Setting | Allowed values |
| - | - | - |
| **Delivery & Retry** | **Max delivery attempts** | 1 to 20 |
| **Delivery & Retry** | **Retry base delay (s)** | 5 to 300 |
| **Delivery & Retry** | **Retry max delay (s)** | 60 to 86400 |
| **Delivery & Retry** | **Email concurrency** | 1 to 100 |
| **Delivery & Retry** | **SMS concurrency** | 1 to 50 |
| **Delivery & Retry** | **Webhook concurrency** | 1 to 100 |
| **Delivery & Retry** | **Webhook timeout (s)** | 5 to 120 |
| **Circuit Breaker** | **Failure threshold** | 1 to 50 |
| **Circuit Breaker** | **Recovery timeout (s)** | 10 to 600 |
| **Rate Limiting** | **Default max requests**, **Aggressive max requests**, **Relaxed max requests** | 1 to 100000 |
| **Rate Limiting** | **Default window (s)**, **Aggressive window (s)**, **Relaxed window (s)** | 1 to 3600 |
| **M2M Credentials Cache** | **Credential cache TTL (s)** | 30 to 86400 |
| **Logging** | **Log level** | debug, info, warn, error |

To change settings:

<Steps>
  <Step title="Find the setting">
    Type in the search box, or select a group in the list next to it. **All groups** shows every group.
  </Step>

  <Step title="Change the value">
    Change the value. The screen marks each changed row.
  </Step>

  <Step title="Save">
    Click **Save** with the number of changes, for example **Save 2 changes**.
  </Step>
</Steps>

If a value is out of range, the screen saves nothing and asks you to fix the marked fields. If some changes fail, the screen keeps them marked, so you can save them again.

When runtime configuration is off on the delivery service, the screen shows **Runtime configuration plane is disabled**, and you cannot change the settings.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.