A flag lets you remotely control the behavior in your application.
Create a Flag
The flag creation wizard guides you through a series of steps. The number of steps depends on the flag type you select.
Go to Confidence and select Flags on the left sidebar
Click Create to open the flag creation wizard
About
Enter the Flag key that uniquely identifies your flag. This is the same ID you use in your code. You can’t change the flag key after creation.Optionally add a Description to explain what the flag is for and how to use it.Select an Owner for the flag. The owner defaults to the current user.
Type
Select the type of flag:
- Boolean: A simple on/off flag to enable or disable a feature. Selecting this option takes you through a 4-step wizard.
- JSON: A flag with a schema that can store multiple values. Selecting this option takes you through a 6-step wizard with additional steps for defining the schema and creating an initial variant.
Boolean Flag Steps
For Boolean flags, the wizard continues with:
Client applications
Select which clients can access this flag. You can skip this step and add clients later. Summary
Review your flag configuration. Click Edit next to any section to make changes. When ready, click Create to create the flag.
When you create a Boolean flag, Confidence automatically creates two variants: enabled and disabled. You can use these variants in rules to turn features on or off for different users.
JSON Flag Steps
For JSON flags, the wizard includes additional steps to define the schema and optionally create a first variant:
Properties
Define the schema for your flag by adding properties. Each property has a name and a type (String, Integer, Double, or Boolean). These properties define the values your flag can return.
First variant (optional)
Create an initial variant with values for your properties. You can modify these values later or skip this step and create variants after the flag is created.
Client applications
Select which clients can access this flag. You can skip this step and add clients later. Summary
Review your flag configuration. Click Edit next to any section to make changes. When ready, click Create to create the flag.
Use a flag key that is understandable and memorable. For example, new-navbar.
Avoid long names, and don’t include the configuration in the name itself.
For example, don’t use new-navbar-mobile-experience or new-navbar-enabled
as the flag key.
Mobile apps and websites batch resolve flags to reduce the number of requests
made to Confidence. Associate a flag with as few clients as possible to limit
the number of resolved flags. Doing so also reduces costs.
Associate a Flag with More Clients
You can associate a flag with more clients by following these steps:
Go to Confidence and select Flags on the left sidebar
Select the flag you want to add a client to
Click the icon next to Clients on the right sidebar
This opens the clients dialog.
Select the clients that should be able to resolve the flag
View Code Snippets
To find instructions on how to use the SDKs for a particular flag, you can use
Confidence’s code snippet feature.
Go to Confidence and select Flags on the left sidebar
Go to the flag you want to preview the code for
Click Code snippets on the right sidebar
Select client and credential
Select client and credential that you want to preview the code for.
Pick the SDK you're interested in
The code snippet shows you how to install, initialize, and resolve using
the Confidence SDK.
Edit Flag Schema
Define the properties and types for your flag
Create Variants
Add variants with different values for your flag
Flags Reference
Deep dive into flag concepts and architecture
Create Flag API
API reference for flags