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

# Rules of a channel

> How to change the quiet hours, frequency cap, delay and fallback channel of an event on one channel, with a reason, and what each rule does when sending.

## At a glance

| Field | Value |
| - | - |
| Status | **Available** |
| Route | `/{locale}/notification/catalog/{id}?tab=channels`, **Edit rules** button of a card |
| Menu | Notifications › Catalog › **Event catalog** › an event › **Channels** tab › **Edit rules** |
| Role | Only Notification Admin edits rules; the other roles read them on the card |
| Permission | `notification-event-catalog:update` (without it the button does not show) |
| Feature flag | None |
| Last verified | 2026-11-12 against the #2197 branch (the new dialog texts) |

## What it is for

Rules decide **when** and **how often** an event goes out on a channel, and which channel replaces it if that one
does not arrive. They are set per event and channel: for example, a coupon push waits until 09:00 instead of 08:00,
or the email is the fallback of the push. Each change asks for a reason and stays in the history.

## How to get there

* Open the event from the [catalog list](https://docs.bbrands.io/enterprise/notifications/catalog/list.md), pick the **Channels** tab and press
  **Edit rules** on the channel card.

## What you see

![Rules of Push dialog over the Channels tab of the Cupón canjeado event: Quiet hours switch on, Quiet hours start 22:00, Quiet hours end 09:00, the text Leave both times empty to use the default window: 22:00 – 08:00, Cap: sends empty, Cap window with a number and the minutes unit, the text Leave the cap empty to send without a limit on this channel, Delay with a number and the minutes unit, Fallback for No fallback, Reason field and Cancel and Save rules buttons.](https://mintcdn.com/bbrands/N7_SfPLw3NjOYuO9/images/enterprise-notifications-screens/catalog/rules.en.desktop.webp?fit=max\&auto=format\&n=N7_SfPLw3NjOYuO9\&q=85\&s=7d4fe085f8ead274959e6be1fbb517cb)

The rules dialog of the Push channel, with quiet hours from 22:00 to 09:00.

| # | Element | What it does |
| - | - | - |
| 1 | **Quiet hours** | Switch: when on, sends that fall inside the window wait until it ends. On a channel where it has no effect (email, in-app, or an event that skips it) it is not shown: a note says why instead |
| 2 | **Quiet hours start** / **Quiet hours end** | The window in 24-hour format, in the recipient's time. It can cross midnight (22:00 to 09:00). Left empty, the default window the text below shows applies (22:00 to 08:00, unless the event declares another) |
| 3 | **Cap: sends** | The most sends an account gets on this channel inside the window. The text under the window says what an empty count means: the channel's default cap or no cap. If the event skips the cap, this field and the window are not shown and a note explains it |
| 4 | **Cap window** | The time in which those sends are counted: a whole number and the unit (**minutes**, **hours**, **days**) |
| 5 | **Delay** | How long the send waits before going out, as a number and unit. Empty: it goes out at once |
| 6 | **Fallback for** | If this channel is another one's plan B, which one. **No fallback**: the channel always goes out on its own |
| 7 | **Reason** | Required, at least 3 characters. It stays in the history and on the card as **Last reason** |
| 8 | **Save rules** | Enabled once the reason is valid; it checks every field before sending |

## Step by step

### Change the quiet hours

**1. Open the channel rules**

On the **Channels** tab, press **Edit rules** on the channel card (for example, **Push**).

**2. Set the window**

Leave **Quiet hours** on and type the time in **Quiet hours start** and **Quiet hours end** (hours and minutes,
24-hour format). Leave both empty to use the default window. For a channel without a window, turn the switch
off.

**3. Write the reason and save**

For example "Merchants open at 09:00". Press **Save rules**. You see **Rules saved**: "The change and its reason
are in the history."

**4. Check**

The card shows the new window and, next to **Active by default**, "rules edited {date}". The change also shows on
the [History](https://docs.bbrands.io/enterprise/notifications/catalog/usage-and-history.md) tab.

### Add a delay

**1. Open the channel rules**

Press **Edit rules** on the card.

**2. Type the delay**

In **Delay** type a whole number from 1 to 9999 and pick the unit, for example **30** **minutes**. To remove it,
leave the number empty.

**3. Reason and save**

Write the reason and press **Save rules**.

### Set a frequency cap

**1. Open the channel rules**

Press **Edit rules** on the card.

**2. Type the cap and its window**

In **Cap: sends** type the maximum (1 to 1000) and in **Cap window** the time in which sends are counted, for
example **1** send every **24** **hours**. If you leave **Cap: sends** empty, the channel goes back to its
default cap (marketing: email 2 per 24 hours, push 1 per 24 hours, SMS 1 per 7 days) or has no cap; the text
under the window says which.

**3. Reason and save**

Write the reason and press **Save rules**. The card shows the cap, for example "1 per 24 h (per event)". If the
event skips the cap (every category but marketing, R-09), the dialog does not show these fields.

### Pick a fallback channel

**1. Open the rules of the plan B channel**

For example, the **Email** card if the email must go out when the push does not arrive.

**2. Pick the primary channel**

In **Fallback for** pick **Push**. To remove the fallback, pick **No fallback**. If you pick a channel that is
already a fallback of another, or this channel already backs another one up, the field is marked right away
(R-13).

**3. Reason and save**

Write the reason and press **Save rules**. The card shows **Fallback for: Push**.

### If a field is marked

![Rules of Push dialog with Cap: sends 3 and the Cap window empty, marked in red with the message Set the time in which sends are counted; the reason says Test and the dialog stays open.](https://mintcdn.com/bbrands/N7_SfPLw3NjOYuO9/images/enterprise-notifications-screens/catalog/rules-errors.en.desktop.webp?fit=max\&auto=format\&n=N7_SfPLw3NjOYuO9\&q=85\&s=c54961161b6c9dc65698c1224a86e669)

A cap without a window: the dialog marks the window and does not save.

Each field with a value that does not work is marked in red with its own message and the dialog stays open. If the
server refuses a combination (a fallback, for example), it marks the field too and shows **The change could not be
saved** · "Check the marked fields." Fix the field and press **Save rules** again; the messages are under
[Errors](#errors).

## Business rules

| ID | Rule |
| - | - |
| R-01 | Rules are edited per event and channel: changing the push ones does not touch the email ones or other events |
| R-02 | A rule edited on screen wins over what the code declares, and platform updates do not overwrite it |
| R-03 | Changes apply to sends evaluated after saving. A send that is already deferred keeps its time |
| R-04 | Quiet hours use each recipient's time (their time zone; Chile's if they have no valid one) |
| R-05 | Quiet hours only hold push, SMS, WhatsApp and Live Activities. On email and in-app they have no effect: the dialog does not show them and the card says **Not applicable** |
| R-06 | By event category: **Security** skips quiet hours; **System** respects them only on push and SMS; an event marked **Skips quiet hours** skips them too. In those cases the dialog hides them with a note and the card says **Not applicable** |
| R-07 | If the event expires (its time to live) before the window ends, the send does not go out: it is skipped with **Expired in quiet hours** |
| R-08 | The cap counts sends per account and channel inside the window; once reached, the next one is skipped with **Frequency cap** (it is not bundled or sent later) |
| R-09 | Only **Marketing** events respect a cap when nobody configures one: email 2 per 24 hours, push 1 per 24 hours and SMS 1 per 7 days, counted per category. The other categories skip the cap: the dialog does not show its fields and the card says **Not applicable** |
| R-10 | The cap takes 1 to 1000 sends and needs a window; with the number empty the channel uses its default cap, if any, or has no cap. The marketing default cap can be changed here but not removed. A new cap counts the sends of this event (**per event**); a channel that already had a per-category cap keeps it |
| R-11 | The window and the delay are whole numbers from 1 to 9999 in minutes, hours or days |
| R-12 | With quiet hours and a delay, the send waits for whichever ends later |
| R-13 | The fallback goes out only if the primary channel was skipped or suppressed for that recipient, or failed at delivery. It is one level deep: a channel cannot be its own fallback, nor the fallback of a fallback, nor become a fallback while another channel depends on it |
| R-14 | The card shows what sending applies: with empty times or cap, the default window or cap followed by "(default)"; a cap stored without a scope counts **per category** |

## States and messages

| State | What you see | Why | What to do |
| - | - | - | - |
| Saved | **Rules saved**: "The change and its reason are in the history." | Everything was fine | Nothing |
| Short reason | "Write at least 3 characters." and **Save rules** disabled | The reason has fewer than 3 characters | Write a reason |
| Edited card | "rules edited {date}" next to **Active by default** | Someone changed the rules on screen | Read the reason on the card or in History |
| Default | On the card, for example "22:00 – 08:00 (default)" or "2 per 24 h (per category) (default)" | The channel has no times or cap of its own and uses the platform's | Nothing, or type your own values in **Edit rules** |
| Not applicable | **Not applicable** on the card and a note in the dialog instead of the fields | The rule has no effect on that channel or event (R-05, R-06, R-09) | Nothing |
| No button | The card does not show **Edit rules** | Your role lacks `notification-event-catalog:update` | Ask a Notification Admin for the change |
| Deferred send | In Traceability, the **Deferred** decision with reason **Quiet hours** or **Delayed** | The rule made the send wait | Nothing: it goes out at the time shown |
| Skipped send | **Skipped** with **Frequency cap** or **Expired in quiet hours** | The cap was reached or the event expired during the window | Check whether the rule is too strict |
| Fallback | **Fallback fired** on the primary channel decision | The primary did not arrive and the fallback went out | Nothing |

## Errors

| Message | Cause | Backend code | Support action |
| - | - | - | - |
| "Set the start time or leave both times empty." / "Set the end time or leave both times empty." | Quiet hours with only one of the times | — (on-screen validation) | Type the other time or empty both |
| "Set both times or leave both empty." | The server got only one time | 422 `quiet-hours-incomplete` | Fill or empty both times |
| "The end cannot be the same as the start." | Start and end are equal | — | Change one of them |
| "Use a whole number between 1 and 1000." | Cap with decimals, negative or out of range | — | Fix the number or leave it empty |
| "Set the time in which sends are counted." | Cap with a number and no window | — | Fill the window |
| "Use a whole number between 1 and 9999." | Invalid cap window | — | Fix the number |
| "Use a whole number between 1 and 9999, or leave it empty to send without delay." | Invalid delay | — | Fix or empty it |
| "That channel is already a fallback of another: pick a primary channel." | The channel picked in **Fallback for** is already a fallback (R-13) | 422 `fallback-not-primary` (also checked on screen) | Pick a primary channel or **No fallback** |
| "This channel cannot be a fallback while other channels fall back to it." | Another channel of the event falls back to this one (R-13) | 422 `fallback-has-dependents` (also checked on screen) | Remove the other channel's fallback first |
| "Pick another channel of this event." | The fallback is the same channel or one the event does not declare | 422 `fallback-self` / `fallback-undeclared` | Pick another channel |
| **The change could not be saved** · "Check the marked fields." | The server refused a combination of rules and marked the field | 422 | Fix the marked field |
| **The change could not be saved** · "Some data is not valid. Review the highlighted fields and try again." | The server refused the change for another validation | 422 | Check the values and try again |
| **The change could not be saved** · "You do not have permission for this action…" | The edit permission is missing | 403 | Ask for the Notification Admin role |
| **The change could not be saved** · "Something failed on our side…" | Server error | 5xx | Try again |

## Why it works this way

![Diagram: when an event fires, an inactive event skips the send with Event inactive; an inactive channel with Channel inactive; no published template with No published template; otherwise the channel rules apply and the send is queued or deferred.](https://mintcdn.com/bbrands/_njGa-AUVffoWNDA/images/notification-user-manual/catalog-channel-decision.svg?fit=max\&auto=format\&n=_njGa-AUVffoWNDA\&q=85\&s=23176ead3b0937855581614bcfdc0bb4)

For each channel, the catalog checks the event, the channel and the template before the rules.

Rules protect the customer without turning the notification off: quiet hours avoid waking someone up with a push,
the cap avoids flooding them with marketing and the fallback makes sure an important notification arrives through
another channel. That is why they are set per channel (an email at night does not disturb like a push) and every
change needs a reason that stays in the history.

## Technical detail

| Aspect | Detail |
| - | - |
| Screen | `frontend/horizon-enterprise/app/components/screens/notification/catalog/notification-catalog-detail-screen.tsx` (`ChannelRulesDialog`), fields in `notification-rule-fields.tsx` and validation in `notification-rule-utils.ts` |
| Save | `PATCH /api/v3/notification/catalog/event/{id}/channel/{channel}` with `quiet_hours_*`, `frequency_cap_*`, `delay`, `fallback_for` and `change_reason` |
| Format | The window and the delay travel as ISO 8601 durations (`PT30M`, `PT2H`, `P1D`); times as `HH:MM` |
| Engine | `backend/horizon-api/lib/notification/eligibility/` (`quiet-hours.ts`, `frequency-cap.ts`, `category-rules.ts`, `fallback.ts`) |
| Texts | `messages/{es,en}.json` › `modules.notification.catalogDetail.rules` |
| Cap scope | A new cap is saved with `frequency_cap_scope = event` when the channel had none (#2199) |
| Defaults | The event detail carries, per channel, `default_frequency_cap`, `default_quiet_hours`, `frequency_cap_skip` and `quiet_hours_skip`, computed with the engine's own functions (`category-rules.ts`). Each 422 issue of `patchChannel` carries `code` and `field` (#2197, D-83) |

## FAQ and support cases

> [accordion] A customer did not get a second marketing email
>
> Marketing events have a default cap (email 2 per 24 hours): the card shows it as "2 per 24 h (per category)
> (default)". In Traceability the decision shows **Skipped** with **Frequency cap**.

> [accordion] I want to remove the default cap of a marketing event
>
> **Edit rules** can only change it: emptying the count goes back to the default cap. For an event without a cap,
> the event is marked **Skips frequency cap**; ask the platform team.

> [accordion] Quiet hours say (default)
>
> The channel has the window on without its own times, so it uses the default window: 22:00 to 08:00, recipient
> time, unless the event declares another.

> [accordion] I cannot find quiet hours in the email rules
>
> Quiet hours do not apply to email or in-app: only to push, SMS, WhatsApp and Live Activities. That is why the
> dialog shows a note instead and the card says **Not applicable**.

> [accordion] I changed the window and a push still waited until the old time
>
> That push was already deferred before the change and keeps its time. New sends use the new window.

> [accordion] A customer got the email and not the push
>
> If the email is **Fallback for Push**, it went out because the push was skipped (for example, the customer does
> not have the app or has it turned off) or failed at delivery. Check the push decision in Traceability.

## Related and history

* [Event channels](https://docs.bbrands.io/enterprise/notifications/catalog/channels.md)
* [Usage and history](https://docs.bbrands.io/enterprise/notifications/catalog/usage-and-history.md)
* [Glossary](https://docs.bbrands.io/enterprise/notifications/getting-started/glossary.md)

| Date | Change |
| - | - |
| 2026-11-11 | First version |
| 2026-11-12 | The card and the dialog show the default cap and window, hide rules with no effect and mark a refused fallback (#2197) |


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