Notification Banners
Notification Banners let you broadcast a message that appears at the top of the panel (and the customer portal) for a chosen audience over a scheduled time window. Use them for maintenance windows, payment reminders, promo announcements, or anything you want every targeted user to see on their next page load.
Admins broadcast to anyone in the system. Resellers can only broadcast to their own subscribers and sub-resellers, and can only see/edit their own banners.
How to get here
Section titled “How to get here”Sidebar → Notification Banners. Direct URL: /notification-banners.
Requires communication.notifications. The whole /notification-banners route group is gated by that single permission for List, Create, Update, and Delete.
Layout
Section titled “Layout”| Section | What it shows |
|---|---|
| Header | Page title + New Banner button (top right) |
| Banner table | One row per banner you can see |
Table columns
Section titled “Table columns”| Column | Source | Notes |
|---|---|---|
| Title | title | Truncated if long. |
| Type | banner_type | Colored pill: Info (blue), Warning (amber), Error (red), Success (green). |
| Target | target | all, resellers, subscribers, or sub_resellers. |
| Created By | created_by_name | Admin-only column. Purple pill for admin-created (reseller_id = 0), cyan for reseller-created. |
| Start | start_date | When the banner begins showing. |
| End | end_date | When it stops showing. |
| Status | Derived | See below. |
| Actions | — | Edit (pencil) and Delete (trash) per row. |
Status values
Section titled “Status values”The Status column is computed in the browser from enabled, start_date, and end_date:
| Status | Condition |
|---|---|
| Active (green) | enabled = true AND start_date <= now <= end_date |
| Scheduled (grey) | enabled = true but the window has not started yet (or has ended) |
| Disabled (red) | enabled = false |
Creating / editing a banner
Section titled “Creating / editing a banner”Click New Banner (or the pencil on a row) to open the modal. Fields:
| Field | Notes |
|---|---|
| Title | Required. |
| Message | Required. The body text shown in the banner. |
| Type | Info / Warning / Error / Success. Defaults to Info. Drives the banner color. |
| Target | Audience — options differ by role, see below. |
| Target list | Checkbox multi-select of specific resellers / sub-resellers (appears for certain targets). Leave empty to target all. |
| Start Date | Required. datetime-local picker. |
| End Date | Required. datetime-local picker. |
| Dismissible | If checked, viewers can close the banner. Default on. |
| Enabled | Master on/off switch. Default on. A disabled banner never shows regardless of dates. |
| Preview | A live colored preview of the banner renders once a title is entered. |
Target options by role
Section titled “Target options by role”Admins can choose:
- All Users (
all) - Resellers Only (
resellers) — optional checkbox list of specific resellers; empty = every reseller. - Subscribers Only (
subscribers) — optional checkbox list of resellers whose subscribers should see it; empty = all subscribers. - Sub-Resellers (
sub_resellers) — checkbox list of resellers/sub-resellers to target.
Resellers can choose only:
- My Subscribers (
subscribers) — sent to all of the reseller’s own subscribers. - My Sub-Resellers (
sub_resellers) — checkbox list of the reseller’s sub-resellers; empty = all of them. This option is hidden if the reseller has no sub-resellers.
When a reseller saves, the backend forces ownership: the banner’s reseller_id is set to the reseller, and the target is clamped to either subscribers (with target list cleared) or sub_resellers. Resellers cannot create all or resellers banners.
How targeting resolves
Section titled “How targeting resolves”Specific recipients are stored in target_ids as a comma-separated list of reseller IDs. The “active banners” lookup that drives what each viewer sees applies the role-aware rules below.
Admin viewer
Section titled “Admin viewer”An admin sees only admin-created banners (reseller_id = 0) whose window is currently active.
Reseller / sub-reseller viewer
Section titled “Reseller / sub-reseller viewer”A reseller sees the union of:
- Admin banners targeting
all. - Admin banners targeting
resellerswheretarget_idsis empty or contains their reseller ID. - Admin banners targeting
sub_resellerswheretarget_idsis empty or contains their ID. - If they are a sub-reseller: their parent reseller’s banners targeting
sub_resellers(empty or matching their ID). - Their own reseller-created banners.
After the SQL pass, a second exact-match filter runs in Go so a partial LIKE match (e.g. ID 3 matching inside 13) cannot leak a banner to the wrong reseller.
Customer portal viewer
Section titled “Customer portal viewer”A logged-in customer (subscriber) sees:
- Admin banners (
reseller_id = 0) targetingall. - Admin banners targeting
subscriberswheretarget_idsis empty or contains their reseller’s ID. - Their own reseller’s banners targeting
subscribers.
The same exact-ID post-filter is applied so partial matches do not leak across resellers. A subscriber with no reseller only sees admin banners that target all or subscribers with no reseller restriction.
Common workflows
Section titled “Common workflows”Announce scheduled maintenance to everyone
Section titled “Announce scheduled maintenance to everyone”- Click New Banner.
- Title “Scheduled Maintenance”, set the Message.
- Type = Warning, Target = All Users.
- Set Start/End to the maintenance window.
- Leave Dismissible and Enabled on. Save.
The banner auto-appears for all roles when the start time arrives (Status flips from Scheduled to Active) and disappears after the end time — no need to delete it.
Promo to one reseller’s customers (admin)
Section titled “Promo to one reseller’s customers (admin)”- New Banner → Type = Info, Target = Subscribers Only.
- In the reseller checkbox list, tick the one reseller.
- Set the window and save. Only that reseller’s subscribers see it in the portal.
Reseller notice to their own subscribers
Section titled “Reseller notice to their own subscribers”- As a reseller, click New Banner.
- Target defaults to My Subscribers. Fill Title/Message and the window.
- Save. The banner reaches every subscriber under that reseller; other resellers and the admin’s global list are unaffected.
Turn a banner off without deleting it
Section titled “Turn a banner off without deleting it”Edit the banner and uncheck Enabled (Status becomes Disabled), or just let the End Date pass (Status becomes Scheduled/expired). Either way it stops showing.
Permissions
Section titled “Permissions”| Permission | Effect |
|---|---|
communication.notifications | Required for the whole page — viewing, creating, editing, and deleting banners. |
Beyond the permission gate, scope is enforced by role: admins manage all banners, resellers see and manage only banners they own (reseller_id matches), and Update/Delete return Forbidden if a reseller targets a banner that is not theirs.
Related pages
Section titled “Related pages”- Resellers — defines the resellers and sub-resellers you target.
- Subscribers — the customer accounts that see
subscribers/allbanners in the portal. - Communication — the broader notification channels (email / SMS / WhatsApp) that complement in-panel banners.