Creating a feature flag
Create a flag, choose whether the visual editor or an SDK applies it, set its key, roll it out, and read it from your code.
1. Create it
Experiences → Create experience. The picker asks two questions.
First: how will the change be applied?
| Choose it when | |
|---|---|
| Visual editor | The change is on a web page and you want to author it by pointing at the element. No code, website only |
| SDK | Your own code reads the value by key and decides what to do. Works anywhere — backend, mobile, or a native app |
Then: what should it do? Pick Feature flag.
The first question is about authoring, not about which machine runs your code. A mobile app is SDK, because there is no visual editor for a native screen — not because it is a phone. The The browser SDK does the visual-editor job: it applies editor changes on a page. It has no read-by-key call today, so a flag read from a browser is not yet available.
2. Set the key — SDK flags only
The key is the name your code calls the flag by.
client.boolVariation("checkout_algorithm_v2", context, false);It appears on the flag's setup tab with a copy button. The console greys the key out once the flag leaves draft, because deployed code already calls it by that name and a rename would silently stop matching. Treat that as a convention rather than a guarantee: the API still accepts the rename.
Visual-editor flags need no key — Intempt applies the change for you.
3. Give it a value
Add a variant and set what it serves. A flag's variant carries the value your code receives: a boolean, a string, a number, or a JSON payload.
Set the off value too. That is what everyone receives when the flag is off, and it is what makes "deliberately off" distinguishable from "Intempt was unreachable."
4. Roll it out
The rollout control sets what share of targeted people receive the flag.
Start small. Widen when it looks right. Widening reaches people who have already been evaluated, so you are not limited to new visitors — and narrowing puts the same people back where they were.
5. Read it from your code
This is the shape of the call in every SDK. Today the Java SDK is the only one that implements it, and it is not published to a package registry yet — see which SDKs can serve an Experience.
boolean useNewCheckout = client.boolVariation(
"checkout_algorithm_v2", FlagContext.ofUser(userId), false);
if (useNewCheckout) {
// Serve the new checkout.
}
// The default you pass is what you get when the flag is off, the key is
// unknown, or the service cannot be reached.Always pass a default. It is what your code uses when Intempt cannot be reached, and it means a network problem degrades to your existing behaviour rather than an exception.
6. Turn it off
Set the rollout to 0%. Everyone receives the off value immediately, including people who had the flag a moment earlier. No deploy.
SDKs
Java reads a flag by key. Every other SDK page below documents event capture and consent, not flag reads — the optimization call is not implemented in them:
JavaScript · Node.js · Python · PHP · Android · iOS · React Native
Feature flags
A feature flag serves a value your code reads by key, to a share of people you choose. Roll it out gradually, pull it back instantly, and keep everyone's answer stable while you do.
Analytics
Analytics turns the events you track into reports and dashboards: build Insights, Funnel, and Retention reports on user or account behavior, then combine them onto a dashboard to monitor your KPIs.
