Skip to content

Creating a Feature Flag

Feature Flags are the building blocks of FlagPal. Before you can create an Experience or Experiment, you need to define the flags you want to control. This guide walks you through creating your first feature flag.


Before You Begin

Make sure you have:

  • Logged in to FlagPal
  • Created or selected a project

Step 1: Navigate to Features

In the left sidebar, click Features.

You'll see a list of all feature flags in your project (empty if this is your first one).


Step 2: Click "New Feature"

Click the New Feature button (usually in the top right of the page).


Step 3: Fill in the Details

You'll see a form with the following fields:

Name (required)

The unique identifier for your flag. This is what your developers use in code to look up the flag value.

Good names:

  • show_new_dashboard
  • checkout_flow_version
  • max_file_uploads
  • enable_dark_mode

Tips for naming: - Use lowercase letters and underscores (no spaces) - Be descriptive — the name should explain what the flag controls - Use a prefix pattern if you have many flags (e.g., billing_, dashboard_, checkout_)

Names are permanent Once you create a feature flag, its name cannot be changed. Choose carefully!

Explain what this flag controls and why it exists. Your teammates will thank you later.

Example:

Controls whether users see the redesigned checkout flow (v2). The old flow uses "classic", the new one uses "redesigned". Launched as part of Q2 checkout improvements project.

Type (required)

Choose the type of value this flag will hold. This determines what kind of data the flag can store.

Type When to Use Example
Boolean On/off features show_banner = true or false
String Named options, text values theme = "light" or "dark"
Integer Numbers, limits max_results = 10
Array Multiple values enabled_tabs = ["chat", "docs"]
Date Date/time values launch_date = "2024-06-01"

Step 4: Add Validation Rules (Optional)

You can define a list of rules to ensure feature flag values are valid. When you application sends a feature flag value to FlagPal, it will be validated against these rules. This prevents unexpected behavior and ensures that the flag is always in the expected format.

Example for a String flag called checkout_style:

Rule Value
in "classic", "minimal", "modern"

Step 5: Save the Feature Flag

Click Create or Save to create the flag.

Your new feature flag will appear in the Features list.


What Happens Next?

A feature flag on its own doesn't do anything. It's just a definition. To put it to work:

  1. Integrate it — target this flag in your application to make it do something
  2. Create an Experience to roll it out to specific users
  3. Create an Experiment to A/B test different values

Editing a Feature Flag

After creating a flag, you can edit its description, type and rules. However, the name cannot be changed.

To edit a flag: 1. Go to Features in the sidebar 2. Click "Edit" next to the flag you want to edit 3. Make your changes and click Save


Viewing Flag Details

Clicking on a feature flag shows you: - The flag's name, type, and description - Its rules (if any)


A Complete Example

Let's say you want to create a flag to control a promotional banner on your homepage.

Field Value
Name show_promo_banner
Description Controls whether the promotional banner is shown on the homepage. Managed per-campaign by the marketing team.
Type Boolean

After creating this flag, you'd create an Experience that sets it to true for users during a specific promotion period.