# Message priority and attention budget

> How Herald ranks messages into categories and gives each person an attention budget that adapts to how they respond, what happens to a message held back, and how the Send API takes part.

People stop reading when they get too much. Herald keeps each person's messages under a budget that rests on two ideas: every message belongs to a **category**, and every person has an **attention budget** per channel. When someone's budget is full, the higher-ranked message goes first.

Set both under **Settings → Messaging limits** (admins). Each app has its own.

## Categories

A category ranks a kind of message and can cap how many of it one person gets. Every campaign and agent has a **Category** select ("Higher categories win when someone's budget is full."). These are the defaults:

| Category | Rank | Cap per person per channel | Useful for |
|---|---|---|---|
| Transactional | 0 | Never limited, never held, doesn't count toward the budget | n/a |
| Lifecycle | 1 | No cap | 72 hours |
| Engagement | 2 | 2 a day | 48 hours |
| Promotions | 3 | 1 a day, 3 a week | 24 hours |

A lower rank wins. Admins can rename categories, add new ones (rank 1 or higher), reorder them, and change each cap and its "useful for" time. Engagement and Transactional can't be deleted. Deleting another category moves its campaigns and agents to Engagement. Only admins can give a message the Transactional category in the console; any API key can send it through the [Send API](/docs/reference/send-api).

A category cap applies per person per channel, and can't go past the channel's own limit: the cap in force is the lower of the two.

## Channel limits

Each channel has a budget range per person, counted over the trailing 24 hours and the trailing 7 days. An empty maximum means no limit.

| Channel | Max a day | Max a week | Min a week |
|---|---|---|---|
| Push | 3 | 8 | 1 |
| Web push | 3 | 8 | 1 |
| Email | 1 | 4 | 1 |
| SMS | 1 | 2 | 1 |

The same page sets a weekly message aim for long-term value agents and which agent gets a person when several want them. See [Attention as a budget](/docs/concepts/long-term-value#attention-as-a-budget).

## The adaptive budget

Within its range, each person's weekly allowance follows a score from 0 to 1, starting at 0.7:

allowance = min + round((max − min) × score)

A new person on push therefore gets 1 + round(7 × 0.7) = 6 pushes a week. The score moves each night:

| What happened | Score |
|---|---|
| The person opened a message | +0.05 |
| The person clicked | +0.10 |
| From the 3rd send in a row that was ignored | −0.10 for each |
| Opt-out, unsubscribe or complaint on another channel | −0.30 |
| Uninstall, or 14 days inactive | −0.20, at most once per 14 days |
| 7 quiet days | Drifts 0.02 a day back toward 0.7 |

The daily limit is never adaptive. Turn the adaptive weekly budget off and the weekly allowance is the channel's maximum.

### Which sends can show engagement

A send counts as ignored only where Herald records opens, which is email and agent pushes. Campaign and Send API pushes, web push and SMS don't report opens, so on those channels the score changes only on opt-outs, uninstalls and inactivity.

## Observe and Enforce

| Mode | What it does |
|---|---|
| Observe | The default for apps that existed before this feature. Herald records what it would have held back and shows it, but holds nothing new. The old push limit and campaign spacing keep working. |
| Enforce | The default for new apps. The budget replaces the push limit and the 72-hour and 24-hour campaign spacing. |

Switching back to Observe is the kill switch: it stops all budget holds at once.

## When a message is held

- **Campaign messages** (including scheduled ones) wait for the person's next free slot, moved out of quiet hours. If no slot opens within the category's "useful for" time, the message is dropped.
- **AI agent messages** are skipped. The agent decides again on its next run.
- A message queued within the next 24 hours with a higher priority reserves the last slot, so a lower one doesn't take it.

A held message is recorded as suppressed with a reason, shown in the console as "Held back" with one of:

| Console label | Reason |
|---|---|
| person's budget was full | `budget:budget_full` |
| category limit reached | `budget:category_cap` |
| held for a higher-priority message | `budget:reserved` |
| waited, but no slot opened in time | `budget:expired` |

Campaign results show "Delayed by the budget: N, avg wait X h". An agent's performance page has a "Held back" card.

## The Send API

`POST /api/v1/messages/send` takes an optional `category`, one of your app's category keys. An unknown key returns 400 with `category must be one of: <keys>`.

- **With a category:** the normal rules apply. Transactional is exempt. In Enforce mode, any other category is held or deferred like a campaign message.
- **Without one:** nothing changes. The message is never held, and counts toward the channel limit but not toward any category cap.

Pass a category on every send. See the [Send API reference](/docs/reference/send-api).

## Pushes your app sends

A `$external_push` event with `category: "transactional"` doesn't count toward the budget. Other `$external_push` events count toward the push channel only. See [Pushes your app sends](/docs/push-notifications/pushes-your-app-sends).

## Related

- [How delivery works](/docs/concepts/how-delivery-works)
- [Limits](/docs/reference/limits)
