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

# Receiving and opening a push

> What a MaihueGO push looks like on the iPhone, when it arrives (quiet hours, limits, preferences), where a tap takes the customer, how recharges credited by a compensation show, and the checklist when push does not arrive.

## At a glance

| Field | Value |
| - | - |
| Status | **Available** |
| Where | iPhone Lock Screen, banner at the top of the screen and Notification Center |
| Who receives it | Signed-in customers who allowed push on the phone |
| Feature flag | None for push. Credited recharges (chip and history marks) depend on `customer-compensation` |
| Last verification | 2026-11-24 against `develop` (`060621220`) |

## What it is for

A push tells the customer something right away, even with the app closed: a coupon is now in their wallet, a charge
failed, a reminder. Tapping it opens the right screen of the app, so the customer does not have to look for it.

It also tells the customer when customer care makes up for a problem by crediting recharges: the push opens **Home**,
where the recharge card already shows them, and the recharge history records the case.

## How to get there

Nothing to open: the push shows up on its own. It requires the
[push permission](https://docs.bbrands.io/maihuego/notifications/push-permission.md) and a signed-in session.

## What the customer sees

![iPhone Lock Screen with a MaihueGO \[DEV\] notification: the app icon, the title Coupon obtained, the text “25% de descuento” from Vendetta is now in your wallet, and the time now.](https://mintcdn.com/bbrands/_njGa-AUVffoWNDA/images/maihuego-notifications-screens/push/received.en.ios.webp?fit=max\&auto=format\&n=_njGa-AUVffoWNDA\&q=85\&s=66df4e5499a03b9cf9d1eea313782673)

A MaihueGO push on the Lock Screen: bold title and the text below.

| # | Element | What it shows |
| - | - | - |
| 1 | App icon and name | MaihueGO |
| 2 | Title | The first line, in bold (up to 65 characters) |
| 3 | Subtitle | Optional second line, iPhone only (up to 65 characters) |
| 4 | Text | The message (up to 240 characters) |
| 5 | Image and buttons | Optional: an image, and up to three buttons when the customer long-presses the push |

With the app open, the push still shows as a banner and the inbox badge refreshes at once.

The Club coupon pushes read like this:

| Event | Title | Text |
| - | - | - |
| Coupon obtained | "Coupon obtained" | "“2x1 en café” from Café Altura is now in your wallet." plus, if it expires, " Use it before …" |
| Coupon redeemed | "Coupon redeemed" | "You redeemed “2x1 en café” at Café Altura." plus, with a discount, " You saved …" |
| Coupon about to expire | "Your coupon is about to expire" | "Your coupon “2x1 en café” from Café Altura expires in less than 24 hours." |

The push for recharges credited by a compensation (event `maihue-street.recharge.quota-credited`) reads like this:

| Case | Title | Text |
| - | - | - |
| Recharges with a last day of use | "Case CS-001234: we credited 2 recharges" | "Use them by November 30, 2026. You will see them in your balance." With one recharge: "Use it by … You will see it in your balance." |
| Courtesy restore, no last day | "Case CS-001234: we credited 1 recharge" | "You will see it in your balance." With several: "You will see them in your balance." |

The same notice stays in the [inbox](https://docs.bbrands.io/maihuego/notifications/inbox.md) with the link **View my balance**, and arrives by
e-mail with the MaihueGO brand.

### Credited recharges in the app

| Where | What the customer sees |
| - | - |
| **Home** recharge card | Under the recharge cards, the chip **+2 credited** (**+1 credited** for one). The card totals already count those recharges: the chip only says where they come from. VoiceOver reads it as "2 recharges credited by a compensation" |
| **Refill history**, restored recharge | Under the date of the recharge that failed and was restored, the mark **Compensated · Case CS-001234** |
| **Refill history**, credit without a source recharge | A line of its own with a gift icon: **Credit: +2 recharges · Case CS-001234** (**+1 recharge** for one) and the date it was applied, as `dd/MM/yyyy` |

> [!NOTE]
>
> The iPhone screenshots of the credited recharges push, the chip and the history are pending. They are added after
> the iPhone check with the app version that ships these screens (2026.11.5-alpha.80 or later). Until then, the texts
> in this section are quoted from the app's message files and the event template.

## Step by step

### Open a push

**1. Tap the push**

On the Lock Screen, unlock the phone when iOS asks for it.

**2. The app opens on the right screen**

For a Club coupon, **My coupons** opens on that coupon. If the app was closed, it first finishes starting, then
places **Home** underneath and opens the screen on top.

**3. Go back**

The back arrow returns to Home (or to the screen the customer was on, if the app was already open). A push that
opens a tab (**Home**, **Map**, **Scan QR**, **Alerts**, **My plan** or **Account**) while the app is open on
another screen goes back to the tab bar and closes the screens that were above it, so back does not return to
them.

### See the recharges you were credited

**1. Tap the push “Case CS-…: we credited …”**

The app opens on **Home**. If it was closed, the start already ends on Home and no second one is stacked. The
balance reloads at once, also when the push arrives with the app open.

**2. Look at the recharge card**

Under the cards, the chip **+N credited** shows while credited recharges are left to use.

**3. Open the history**

Tap **SEE MORE** under the day's progress. In **Refill history**, the recharge that failed shows
**Compensated · Case CS-…**. A credit without a source recharge shows as its own line
**Credit: +N recharges · Case CS-…** in the month it was applied.

### Find a push you dismissed

Swipe down from the top of the iPhone to see Notification Center. If the notice also went to the inbox, it is in
[Inbox and notification bell](https://docs.bbrands.io/maihuego/notifications/inbox.md).

## Business rules

| ID | Rule |
| - | - |
| R-01 | **Quiet hours:** a push that falls between 22:00 and 08:00 on the customer's clock waits until 08:00. A customer without a time zone uses Chile's (`America/Santiago`) |
| R-02 | Quiet hours apply to promotions, account notices (unless the event skips them, as **Coupon redeemed** does), payments and service notices. Security notices never wait |
| R-03 | If the event's validity ends while the push is waiting, the push is dropped |
| R-04 | Promotions: at most 1 push per account every 24 hours. The other categories have no limit |
| R-05 | The customer's [preferences](https://docs.bbrands.io/maihuego/notifications/preferences.md) apply before sending, and again when a waiting push is released |
| R-06 | The push goes to every phone where the person is signed in with push allowed |
| R-07 | The text is in the account's language |
| R-08 | Where the tap leads: an app route opens that screen; a tab route (**Home**, **Map**, **Scan QR**, **Alerts**, **My plan**, **Account**) goes back to the tab bar already open instead of opening a second one; a link (for example a sign-in link) goes through the app's link handler or opens outside the app |
| R-09 | If the app was closed and its start does not end on Home (signed out, a plan or document is required), the push destination is dropped and the customer stays where the start took them |
| R-10 | A button with a destination of its own opens that destination; a button without one opens the app the same way as the push itself |
| R-11 | Tapping a push does not mark the inbox copy as read; the inbox and the push are separate channels |
| R-12 | Silent pushes (device commands) show nothing on screen |
| R-13 | The credited recharges notice is an account notice: the push respects quiet hours, has no frequency limit and cannot be turned off in preferences. The inbox copy and the e-mail do not wait for the end of quiet hours. Whoever applies the compensation can leave the notice off |
| R-14 | One notice per case and window: recharge compensations of the same case applied in the same request or within 5 minutes add up to one notice, with the total recharges and the earliest last day of use. A compensation revoked inside the window is left out, and if none is left nothing is sent |
| R-15 | The notice goes to the person who holds the plan seat, also on a company case; never to the paying organization |
| R-16 | The credited recharges push opens **Home** and asks for the balance to reload, when tapped or when received with the app open |
| R-17 | The chip shows the credited recharges still usable. At 0, or with the `customer-compensation` flag off, it does not show and the card looks as before |
| R-18 | The **Compensated** mark goes on the source recharge of a non-revoked credit. Recharges made while credited recharges were available are not marked, and revoking the compensation removes the mark |
| R-19 | The **Credit** line shows only on the holder's profile (not on the children's profiles of the carousel), in the Chile month the compensation was applied |

## States and messages

The customer sees no states. Support sees each push's state in Horizon Enterprise:

| State | Meaning |
| - | - |
| **Scheduled** | Waiting for the end of quiet hours or a delay |
| **Sent** | The push provider accepted it |
| **Delivered** | It reached the phone |
| **Clicked** | The customer tapped it |
| **Failed** | It could not be delivered |
| **Expired** | Its validity ended before it could go out |

A push that never left shows a reason instead, for example **Unreachable** (no phone with push allowed) or the
customer's opt-out.

The credited recharges notice shows in Horizon Enterprise under the event `maihue-street.recharge.quota-credited`,
with the customer care case as its subject. The texts the customer sees in the app are in the **What the customer
sees** block of this page.

## Errors

| Symptom | Cause | Support action |
| - | - | - |
| The tap opens Home and not the expected screen | The app was closed and its start required something first (sign-in, a plan, a document) | Ask the customer to finish that step and open the screen from the app |
| The tap only opens the app | The push carries no destination, or one the app does not handle | Report the event to the notification team |
| The push arrived in the morning | It waited for the end of quiet hours | Expected |
| The **+N credited** chip does not show | The credited recharges were used or expired, the compensation was revoked, or the `customer-compensation` flag is off | Check the case and its compensation in customer care; if they are still valid, ask the customer to close and reopen the app |
| The history shows no **Compensated** mark | The customer is looking at another month or a child's profile, or the recharge was made with credited recharges (those are not marked) | Ask the customer to pick the month of the failed recharge, on their own profile |

## Why it works this way

Push interrupts the customer, so MaihueGO keeps it for what is worth it: quiet hours protect the night, and the
limit keeps promotions from piling up. Security notices skip both because a late warning is useless.

When a push opens a closed app, Home goes underneath so that back returns to a known place instead of an empty
screen.

The credited recharges push opens Home and not the history because Home shows the balance the customer can use. The
card totals already count the credited recharges; the chip only explains where they come from, so the customer does
not think their plan changed. The history marks the recharge that failed and not the ones made later, because no
recharge can be attributed to a particular credit. Several compensations of a case are joined in one notice so the
customer does not get one push per recharge.

## Technical detail

| Aspect | Detail |
| - | - |
| Listeners | `mobile/maihuego-application/hooks/useOneSignal.ts`: `click` (navigation), `foregroundWillDisplay` (badge refresh, the push still shows) |
| Destination | `resolvePushTarget` in `utils/push-navigation.ts`: a tapped button (OneSignal `actionId`) with an action in `additionalData.buttons` goes there; otherwise `additionalData.url` or `deep_link` → `Linking.openURL` (deep link handled by the root link listener), and `additionalData.path` → `openRoute(path, 'push')` (`hooks/useNavigationGuard.ts`): a tab route goes back to the tab bar (`dismissTo`) or switches tab inside it (`navigate`), any other route is pushed |
| Cold start | `utils/push-navigation.ts`: the path waits in `queuePushPath` until `resolveInitialRoute()`; `hooks/useRootLayoutController.ts` replaces with `/(with-tabs)/home` and pushes `resolvePushStack(path)` (a Club benefit detail goes through **My coupons**, benefits section) |
| Club coupons | Push data `{ path: "/coupons?coupon=<wallet>", wallet }` (`lib/notification/template/templates/club.template.ts`, `producers/club.producer.ts`) |
| Sending | `backend/horizon-api/lib/notification/channel/onesignal/push.adapter.ts`, lane `notification-push`, OneSignal external id alias. A `deep_link` action travels as `deep_link` and `url` (`pushActionData`, `push.contract.ts`); the payload `buttons` become OneSignal action buttons and keep their actions in the data |
| Rules | `lib/notification/eligibility/category-rules.ts`: `DEFAULT_QUIET_HOURS` 22:00–08:00, `DEFAULT_TIMEZONE`, `MARKETING_FREQUENCY_CAPS.push` 1 per 24 h |
| Credited recharges | Templates `maihueStreetRechargeQuotaCredited{Push,InApp,Email}` in `backend/horizon-api/lib/notification/event/registry/content/maihue-street.content.ts`. The producer `lib/notification/producers/recharge-credit.producer.ts` sends `units_label` and `body_sentence` in five languages and `path` = `/(with-tabs)/home`. Transactional category, `optOutAble: false`, 7-day validity. The push data carries `refresh: "recharge-balance"` |
| Home and chip | `utils/recharge-balance-events.ts`: `refresh: "recharge-balance"` makes Home ask for the balance again. `resolvePushStack` does not stack a second Home. Chip: `components/widget/home-recharge-balance-card/home-recharge-credit-chip.tsx` with `utils/recharge-credit-chip.ts` (`credits.usable` of the balance, which the API sends only with the flag on) |
| History | `GET /api/v3/compensation/recharge-credit/me` (`services/recharge-credit.services.ts`), asked only when the balance carries `credits`. `screens/history/history.compensation.ts` builds the marks and the credit lines; views `screens/history/views/history.item.view.tsx` and `history.bonus-item.view.tsx` |
| Credited recharge texts | `locales/*/home.json` (`recharge.creditedChip`, `recharge.creditedAccessibilityLabel`) and `locales/*/history.json` (`compensation.mark`, `compensation.bonus`) |
| Device commands | `additionalData.bbrands_command` only triggers the device telemetry client, which pulls the commands Horizon issued |
| Findings | Push actions, button actions, event names and the bell label fixed in issue #2212. Pre-permission screen: issue #2136. Still open: turning the inbox on per account (issue #2267) |
| Screenshots | Maestro flows `mobile/maihuego-application/.maestro/manual/push.yaml` and `recharge-credit.yaml` (the latter pending the iPhone check) |

## FAQ and support cases

> [accordion] I don't get push
>
> Check, in this order:
>
> 1. Push allowed in iOS **Settings** › **Notifications** › **MaihueGO** ([Push permission](https://docs.bbrands.io/maihuego/notifications/push-permission.md)).
> 2. Signed in, with the right account.
> 3. Focus or Do Not Disturb off on the iPhone.
> 4. The notice is not a promotion turned off in [preferences](https://docs.bbrands.io/maihuego/notifications/preferences.md), and the
>    promotion limit (1 push per day) was not reached.
> 5. It is not between 22:00 and 08:00.
> 6. In Horizon Enterprise, the send's state and reason (for example **Unreachable**).

> [accordion] I turned off promotions but still get a push
>
> It is not a promotion: security, payment, service and account notices always arrive. See
> [Notification preferences](https://docs.bbrands.io/maihuego/notifications/preferences.md).

> [accordion] I get the same push on two phones
>
> Expected: it goes to every phone where the person is signed in.

> [accordion] I signed out and still get pushes
>
> Signing out unlinks the phone. If the app was deleted without signing out, iOS stops delivering to it. If it
> continues, report the phone and account to Technology.

> [accordion] I opened the push and the inbox still shows it as unread
>
> Expected: push and inbox are separate. Mark it as read in the inbox.

> [accordion] The case had three compensations and only one notice arrived
>
> Expected: recharge compensations of a case applied together or within 5 minutes add up to one notice, for
> example "Case CS-001234: we credited 3 recharges". A compensation applied later sends its own notice.

> [accordion] The customer says their plan now has more recharges
>
> The Home cards add the credited recharges to the plan's. The **+N credited** chip shows how many come from the
> compensation; the plan did not change.

> [accordion] Can the customer turn off the credited recharges notice?
>
> Not from preferences: it is an account notice. Whoever applies the compensation in customer care can leave it
> off.

## Related and history

* [Push permission](https://docs.bbrands.io/maihuego/notifications/push-permission.md)
* [Inbox and notification bell](https://docs.bbrands.io/maihuego/notifications/inbox.md)
* [Push channel](https://docs.bbrands.io/enterprise/notifications/channels/push.md)
* [Event club.coupon.obtained](https://docs.bbrands.io/enterprise/notifications/events/club/coupon-obtained.md)
* [Event maihue-street.recharge.quota-credited](https://docs.bbrands.io/enterprise/notifications/events/maihue-street/recharge-quota-credited.md)

| Date | Change |
| - | - |
| 2026-11-11 | First version |
| 2026-11-12 | Push buttons with their own destination, and a `deep_link` push now opens its destination (issue #2212) |
| 2026-11-16 | A push to a tab route goes back to the tab bar instead of stacking a second one (navigation-responsiveness D-07, #2406) |
| 2026-11-24 | Credited recharges push from a compensation that opens Home, the **+N credited** chip of the recharge card, and the **Compensated** mark and **Credit** line of the history (compensation/recharge-credit T-17). iPhone screenshots pending |


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