> ## 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.

# Push channel

> How a push reaches the phone: OneSignal, the MaihueGO and Maihue Lunch apps, the template fields, quiet hours and the states.

## What it is for

A push is the notification that shows on the phone screen even when the app is closed. It is for what the customer
must know right away: a redeemed coupon, a failed charge or a reminder.

## How it reaches the recipient

**1. Horizon builds the push**

It takes the published template in the recipient's language and replaces the variables.

**2. It waits for quiet hours if needed**

If it is night in the recipient's timezone (by default between 22:00 and 08:00), the send stays **Scheduled**
until the window ends.

**3. OneSignal delivers it**

It leaves on the `notification-push` lane towards the right app: MaihueGO or Maihue Lunch. OneSignal reports the
delivery and the tap.

## What the recipient needs

The app installed, signed in, and notifications accepted on the phone. Without any subscribed device, the send is
skipped with the reason **Unreachable**; if the event has email as its fallback, the email is sent.

## Template fields

| Field | Limit | What for |
| - | - | - |
| Title | 65 characters, required | The first line, in bold |
| Subtitle | 65 characters | iPhone only |
| Body | 240 characters, required | The notification text |
| Buttons | Up to 3, 25 characters each | Actions under the notification (long press on iPhone); each button can have its own action |
| Action | In-app link, route or URL | Where the tap leads; a button without its own action uses this one |
| Image and icon | URL | Rich content |
| App | MaihueGO (`default`) or Maihue Lunch (`lunch`) | Which app it goes to |
| Priority | Normal or high | |

Title, subtitle, body and button texts are translated per language; the rest is shared.

The tap opens the action in the app: an in-app link or a route opens that screen, a URL opens the browser. A
button opens its own action, or the push's when it has none.

## States it reports

| State | Meaning |
| - | - |
| **Scheduled** | Waiting for the end of quiet hours or a delay |
| **Sent** | OneSignal accepted the push |
| **Delivered** | It reached the phone |
| **Clicked** | The customer tapped it |
| **Failed** | It could not be delivered; if the event has a fallback, that channel is tried |
| **Expired** | Its validity ended before it could go out |

Push does not report "opened": it goes from **Delivered** to **Clicked**.

## Rules

| Rule |
| - |
| Quiet hours apply, except for events with the bypass **Skips quiet hours** |
| If the event's validity ends before the quiet hours do, the push is skipped with **Expired in quiet hours** |
| The initial marketing cap is 1 push per 24 hours per account |
| A silent push (no text) is used for device commands, not for notifications |

## FAQ and support cases

> [accordion] The push says Unreachable
>
> The customer does not have the app with notifications accepted. Ask them to turn them on in the phone settings.

> [accordion] A push from last night arrived in the morning
>
> It waited for the end of the customer's quiet hours. That is expected.

## Technical detail

| Aspect | Detail |
| - | - |
| Adapter | `backend/horizon-api/lib/notification/channel/onesignal/push.adapter.ts` |
| Contract | `push.contract.ts` (`title`, `subtitle`, `body`, `buttons`, `action`, `image`, `app`, `priority`, `silent`) |
| Provider events | OneSignal Event Streams → `onesignal-webhook` topic |
| Lane | `notification-push` |
| Action in the data | `pushActionData()` in `push.contract.ts`, shared by template and event sends: a route travels as `path`, a URL as `url`, an in-app link as `deep_link` and `url` |
| Buttons | The adapter sends them as OneSignal action buttons (`buttons: [{ id, text }]`); their actions stay in the data (`buttons`), and the app opens the one of the tapped id |

## Related and history

* [Channels overview](https://docs.bbrands.io/enterprise/notifications/channels/overview.md)
* [Push permission in the MaihueGO app](https://docs.bbrands.io/maihuego/notifications/push-permission.md)
* [Receiving and opening a push in the MaihueGO app](https://docs.bbrands.io/maihuego/notifications/receiving-a-push.md)

| Date | Change |
| - | - |
| 2026-11-11 | First version |
| 2026-11-13 | An in-app link also travels as `url`, so tapping it opens its screen; the buttons reach the phone as OneSignal action buttons, each with its own action (issue #2212) |


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