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

# Alerting

> Get notified by email or Slack when your AI cost or margin crosses a threshold you set.

Alerts watch a cost or margin metric and notify you when it crosses a threshold. Each one starts as **Healthy**, then reads as **Watch** as the metric approaches the threshold, or **Triggered** once it crosses it. Every project starts with a few suggested alerts, off by default, listed alongside your own.

<Frame>
  <img src="https://mintcdn.com/weflayr/kmshNC-CAXQFGWLo/images/product/alerts-list.png?fit=max&auto=format&n=kmshNC-CAXQFGWLo&q=85&s=a3f956c230a55b53b18b9027dc414f30" alt="Alerts page with a table of usage and margin alerts" width="1440" height="995" data-path="images/product/alerts-list.png" />
</Frame>

## Create an alert

Click **New alert**, then pick a metric: a **usage** metric (Total AI Cost, Cost per feature run, Tokens Consumed, Number of feature run) or a **margin** metric (Gross margin, Adoption). Narrow it to specific customers or features, or leave it at "All".

<Frame>
  <img src="https://mintcdn.com/weflayr/kmshNC-CAXQFGWLo/images/product/alerts-new-drawer.png?fit=max&auto=format&n=kmshNC-CAXQFGWLo&q=85&s=7a088a66ad690de838c6682a25074e54" alt="New alert drawer with the metric, customer and feature fields" width="472" height="1000" data-path="images/product/alerts-new-drawer.png" />
</Frame>

## Get notified by email or Slack

Pick one channel per alert. Email needs no setup. Slack needs the organization connected first, from **Settings**, then you pick the channel and can send a test message before saving.

<Frame>
  <img src="https://mintcdn.com/weflayr/kmshNC-CAXQFGWLo/images/product/settings-slack-connect.png?fit=max&auto=format&n=kmshNC-CAXQFGWLo&q=85&s=d0691a70e0b0d639d7c4648088309aee" alt="Connect the organization to Slack from organization settings" width="1204" height="110" data-path="images/product/settings-slack-connect.png" />
</Frame>

## Absolute vs relative thresholds

An **absolute** threshold is a flat number, e.g. gross margin drops below 60%. A **relative** threshold is a percentage offset from the metric's trailing average, e.g. cost per feature run rises 25% above its 30-day average. Either way, the drawer shows where the metric currently sits against the threshold.

<Frame>
  <img src="https://mintcdn.com/weflayr/kmshNC-CAXQFGWLo/images/product/alerts-threshold-gauge.png?fit=max&auto=format&n=kmshNC-CAXQFGWLo&q=85&s=f01daf193fb6687b5370fa97183f5ae9" alt="Threshold gauge showing the current reading against the alert's threshold" width="472" height="1000" data-path="images/product/alerts-threshold-gauge.png" />
</Frame>
