Feature flags
Turn a feature in your app on and off without shipping a new release, and roll it out gradually to a percentage of users. Text, number or JSON values also serve as remote configuration. Decision record:…
Turn a feature in your app on and off without shipping a new release, and roll it out gradually to a percentage of users. Text, number or JSON values also serve as remote configuration.
Decision record: docs/adr/0066-ozellik-bayraklari.md.
Values sent to the SDK can be read by anyone who knows the app ID. Do not put passwords, keys or secrets in them.
Creating a flag
Dashboard → Feature Flags → New flag:
| Field | Description | Default |
|---|---|---|
| Key | Used in your app code; cannot be changed later | Required |
| Value type | On/off, text, number, JSON | On/off |
| On and off values | The values users receive, at most 10 KB | Depends on type |
| Target audience | Optional segment | All users |
| Rollout percentage | 0–100 | 100 |
| Scheduled steps | Times at which the percentage changes automatically, at most 10 | None |
| Kill switch | When off, everyone gets the off value | Off |
You can define at most 200 flags per app.
How it is evaluated
- If the kill switch is off, the off value.
- If a segment is selected and the user is not in it, the off value.
- If the user is outside the rollout percentage, the off value.
- Otherwise, the on value.
The same user always gets the same result. When the percentage increases, users who were already in stay in. The percentage is computed separately for each flag, so flags do not land on the same set of users.
Reading with the SDK
Values are refreshed at the start of a session and stored on the device. Without a network, the last value is returned; if none was ever fetched, the default in your code is returned.
if (Pushizo.FeatureFlags.isEnabled('yeni_sepet')) showNewCart();
const limit = Pushizo.FeatureFlags.getValue('sepet_limiti', 10);
await Pushizo.FeatureFlags.refresh();if (Pushizo.FeatureFlags.isEnabled("yeni_sepet")) showNewCart()
val limit = Pushizo.FeatureFlags.getValue("sepet_limiti", 10)
Pushizo.FeatureFlags.refresh()if Pushizo.FeatureFlags.isEnabled("yeni_sepet") { showNewCart() }
let limit = Pushizo.FeatureFlags.value("sepet_limiti", default: 10)
await Pushizo.FeatureFlags.refresh()Available in the Web, Android and iOS SDKs; starting with 0.2.0, the Flutter, React Native, Capacitor, Cordova, MAUI, Unity and KMP bridges offer the same
API (FeatureFlags.refresh, isEnabled, getValue) (the Capacitor and Flutter web targets are wired to the web SDK).
No requests are sent while privacy consent is pending. When there is no subscription, the SDK uses a persistent random ID; in that case, segment-targeted flags return off.
Evaluating from the server
curl -X POST "https://api.pushizo.com/v1/apps/$APP_ID/feature-flags/evaluate" \
-H "Authorization: Bearer $PUSHIZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"external_id":"musteri-1"}'The response returns enabled, value and reason (on, disabled, segment, rollout) for each flag.
| Endpoint | Scope |
|---|---|
GET /v1/apps/{appId}/feature-flags, GET .../{flagId} | analytics:read |
POST .../feature-flags/evaluate | analytics:read |
POST, PATCH, DELETE | admin |
Gradual rollout
Scheduled steps are checked every 5 minutes, and the latest step whose time has come is applied. Changing the percentage manually does not delete the remaining steps. There is no automatic rollback; if something goes wrong, turn off the kill switch.
Limits
- Values are updated at the start of a session, not pushed in real time. Call
refreshto get them immediately. - There is no flag exposure or conversion report; send events from your app for measurement.
- If the target segment is deleted, the flag gives everyone the off value. To turn it back on, change the flag's target.
Global control group
The global control group receives no marketing messages for a fixed percentage of users. Comparing these users' conversions with everyone else's measures the total impact of your messaging. Decision record:…
Analytics and reports
Delivery, subscription, event, conversion, funnel, provider health, engagement heatmap and retention reports; date ranges, comparison, CSV; the public analytics API and ClickHouse scaling.