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

# Portal feature flags

> Every switch that changes what the customer sees in the portal: which section it controls, its default and what happens when it is off.

A **feature flag** is a switch that turns a function on or off per environment (development, certification,
production) without a deploy. The portal's flags belong to the `portal-customer` category and are managed in
**Horizon Enterprise › Feature flags**. The values on this page are the **catalogue defaults**; each
environment's actual value is in Horizon Enterprise.

## Section visibility

One per menu item. On: the section shows in the menu and in the Home shortcuts. Off: it disappears from both
and its address leads to **Home**.

| Flag | Section | Default | When off |
| - | - | - | - |
| `portal-customer-home` | Home | On, **locked** | Cannot be switched off: it is where customers land when another section is off |
| `portal-customer-account` | Account | On | No profile, password or devices in the portal |
| `portal-customer-products` | My products | Off | Hides the section |
| `portal-customer-scheduling` | Schedule maintenance | Off | Hides the section |
| `portal-customer-documents` | Documents | Off | Hides the section |
| `portal-customer-subscriptions` | Subscriptions | Off | Hides the section |
| `portal-customer-payment-methods` | Payment methods | Off | Hides the section |
| `portal-customer-history` | History | Off | Hides the section |
| `portal-customer-benefits` | Benefits (Club catalog) | Off | Hides the catalog, the detail and the Home benefits row |
| `portal-customer-coupons` | Coupons (My coupons) | Off | Hides the wallet |
| `portal-customer-invite` | Invite a friend | Off | Hides the section and the invite banner in Account |
| `portal-customer-support` | Support | Off | Hides the section |

## Onboarding

| Flag | Type | Default | What it controls |
| - | - | - | - |
| `portal-customer-onboarding` | On/off | Off | Blocks invited customers (primary user of a personal account or legal representative of a company) until they validate their identity and add a payment method, and allows sending the invitation e-mail. Off: `/onboarding` leads to Home |
| `portal-customer-onboarding-payment-methods` | JSON | `{"card": ["credit", "debit"], "pac": ["checking_account"]}` | Which method kinds count as current and can be enrolled during onboarding. Toku methods never count |
| `portal-customer-onboarding-redirect-success` | Text | `/home` | Where the customer goes once onboarding is done: a portal path or an `https` URL on maihuechile.cl, maihue.cl or bbrands.io |
| `portal-customer-onboarding-redirect-fail` | Text | `https://www.maihuechile.cl` | Where **Salir** (Exit) takes the customer from an invalid or expired onboarding link |

## Payment methods

| Flag | Type | Default | What it controls |
| - | - | - | - |
| `portal-customer-payment-methods-policy` | JSON | `{"card": ["credit", "debit"], "pac": ["checking_account"]}` | Which method kinds the customer can add from **Payment methods** |

## Club Maihue

| Flag | Category | Default | What it controls |
| - | - | - | - |
| `club-catalog-obtain` | `module-club` | Off | Whether customers can obtain coupons from the catalog. Off: the benefit detail does not allow obtaining it |

## Technical detail

| Aspect | Where |
| - | - |
| Catalogue and descriptions | `backend/horizon-api/database/database.feature-flag.ts` |
| Keys and defaults in the portal | `frontend/portal-customer/app/lib/portal/page-flags.ts` |
| Evaluation | `GET /api/v3/feature-flag/evaluate?category=portal-customer`, uncached (`app/lib/flags.ts`) |
| Section off → Home | `app/lib/portal/portal-feature-gate.tsx` |
| Platform definition | `docs/definitions/feature-flags.md` |

The mobile app gateways have their own flags (`portal-customer-mobile-enrollment-gateway` and
`portal-customer-mobile-enrollment-method-type`); they are out of scope for this manual.


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