Flag types
Every flag has a type, set when you create it. The type determines the shape of the value the SDK returns.| Type | Returns | Example use |
|---|---|---|
boolean | true or false | Gate a feature on or off |
string | A text value | Choose a variant name, theme, or copy |
integer | A whole number | A limit, count, or threshold |
numeric | A decimal number | A rate, multiplier, or price |
json | A structured object | A bundle of related settings |
Variations
A variation is a value a flag can return. A boolean flag has two variations (true and false); other types can have as many as you need — for example a string flag with control, treatment-a, and treatment-b.
When you evaluate a flag, Softlaunch resolves it to exactly one variation based on the flag’s configuration in that environment.
Default values
Every SDK call requires a default value. The SDK returns it when:- The configuration hasn’t loaded yet.
- The flag doesn’t exist in that environment.
- The flag’s type doesn’t match the method you called.
Choose a default that is safe to serve to every user. It’s the value your app falls back to whenever Softlaunch can’t return a definitive answer.
Enabling and disabling
A flag is enabled or disabled per environment. A disabled flag serves its configured off value to everyone, regardless of targeting. This lets you keep the same flag configured differently in Staging and Production.Environments and SDK keys
Learn how a flag can behave differently across environments.