Create and change a feature flag
Define a typed switch, propose a value, have a different person approve it, and set a different value for one company.
Before you begin
A feature flag is a switch that changes behaviour without a new release. Every change needs a proposal and the approval of a different person. Each approved value is kept as a numbered version.
Two flags exist from the start, both Draft and false: platform.enforce_registry (whole workspace) and platform.uninstalled_apps_readable (per company).
Create a flag
- A configuration owner opens Platform > Configuration > Feature flags and presses New.
- Enter the Key: lower-case words joined by dots, 2 to 6 parts (
sales.quick_quote). It cannot change. - Enter the Name and an optional description.
- Choose the Type: Yes / no, Text or Number.
- Choose the Scope: Whole workspace or Per company.
- Optionally set Effective from and Effective to (the end must come after the start).
- Tick Protected control if the flag guards a safety control. Once ticked it cannot be unticked: 'A protected control stays protected.'
- Save. The flag is a Draft, in force = false.
Keys beginning with security., auth., authorization., access., permission., period., posting., ledger., audit., approval., tenancy., rls. or sod. are refused: 'That is a protected control (authorization, periods, posting, audit, approvals or tenancy). It cannot be governed by a feature flag.'
Propose and approve a value
- The configuration owner presses Propose a value and enters the value:
trueorfalsefor yes / no, any number for Number, text up to 400 characters for Text. 'A yes / no flag is true or false.' is shown foryes. - The flag becomes Proposed. The Overview tile Flags waiting for approval goes up. Waiting = the proposed value, In force = still false.
- A different person with the Independent approver role opens the flag and presses Approve. The proposer is refused: 'Somebody other than the person who prepared this flag value must approve it.'
The flag is Active with the value, Version 1 and the approver recorded. An event platform.flag_changed.v1 is raised.
To change an active flag, press Propose a change; the old value stays in force while waiting. After Approve the change it becomes Version 2.
An approver can Refuse a proposed flag with a reason; it returns to Draft. A pending change on an already active flag cannot be refused on screen; it waits until approved or replaced.
Effective dates
Outside the effective dates the flag falls back to its default (false, empty or 0), with no new approval. When the end date passes, In force reads false.
Protected controls
A protected control can only be tightened. A yes / no one can never be proposed false: 'This flag is a protected control: it can be tightened, never switched off.' No company may switch it off either.
Per-company values
For a per-company flag:
- Open the Companies tab.
- Choose a company and enter the value.
- Press Set for this company.
That company reads the new value; other companies keep the flag value. Remove deletes the row and the company falls back to the flag value. A flag for the whole workspace refuses it: 'This flag is set for the whole workspace, not per company.'
A per-company value takes effect at once, without a second person. Treat this tab with the same care as an approval.
Archive
A configuration owner can Archive a flag. An archived flag reads as false. This needs no approver, including for a protected control, so limit who holds the Configuration owner role.
Good to know
- With
platform.uninstalled_apps_readableapproved true for a company, a turned-off app can still be read there but every change is refused. Other companies keep the old behaviour. - With
platform.enforce_registryon, apps whose package has no reviewed or certified version cannot be installed or upgraded.