# Managing Flags

## Managing flags

Flags are the core building blocks of **Feature Experimentation and Rollout (FE\&R)**.\
They allow you to safely control feature availability, run experiments, progressively roll out changes, and decouple deployments from releases.

This page explains how to create, manage, organize, and audit your flags efficiently.

***

### Accessing the Flags page

<figure><img src="/files/bMxUmmb9j7DjNH048gi5" alt=""><figcaption></figcaption></figure>

You can access all your flags from the main navigation: **`Feature Experimentation`** → **`Flags`**

This opens the **Flags list**, where you can view, filter, and manage all flags created within your account.

***

### Flags List

The Flags list provides a global view of your feature flags and their current usage.

For each flag, you can see:

| Attribute         | Description                                                                       |
| ----------------- | --------------------------------------------------------------------------------- |
| **Name**          | Technical identifier used in your codebase (e.g. `specialist_chat_progress_bar`). |
| **Type**          | Flag data type: `BOOLEAN`, `STRING`, `NUMBER`, `ARRAY`, or `OBJECT`.              |
| **Tags**          | Labels used to categorize flags (team, feature, page, domain, etc.).              |
| **Creation date** | Date when the flag was created.                                                   |
| **Usage**         | Indicates whether the flag is used in campaigns, and in which status.             |

#### Flag Details Panel

<figure><img src="/files/cByCwFDNQCCCfjKNvcD9" alt=""><figcaption></figcaption></figure>

Clicking on a flag opens a **side panel** with detailed information, including:

* Flag name and type
* Default value and predefined values (when applicable)
* Flag ID
* Creation date
* List of all campaigns using this flag
* Campaign environment (Dev, Preprod, Prod…)
* Campaign status (LIVE, PAUSED, etc.)
* Direct links to each campaign

This view makes it easy to understand where and how a flag is used before taking action.

***

### Creating a Flag

<figure><img src="/files/omXtyvuyWn82YYLBneRj" alt=""><figcaption></figcaption></figure>

To create a new flag:

1. Click **Create flag** (top-right).
2. Define the following fields:
   * **Name**\
     Use a clear, stable, and explicit naming convention to avoid confusion or breaking changes later.
   * **Type**\
     `BOOLEAN`, `STRING`, `NUMBER`, `ARRAY`, or `OBJECT`.
   * **Default value**\
     Required for all types except `NUMBER`. This value is returned when no campaign rule applies.
   * **Predefined values** *(optional)*\
     Useful for `STRING`, `ARRAY`, or `OBJECT` flags to constrain allowed values.
   * **Tags** *(optional)*\
     Used to categorize and organize flags.
3. Click **Save**.

The flag is immediately available and can be used in campaigns.

#### Naming and structure best practices

We strongly recommend using:

* explicit flag names,
* consistent naming conventions,
* descriptive metadata.

***

### Editing a flag

You can edit a flag by clicking **Edit flag** from the flag details panel.

You may update:

* Description
* Default value
* Predefined values
* Tags

{% hint style="danger" %}
**Editing flags already in use**

Editing the name or type of a flag that is already used in one or several campaigns may break your application or website. For this reason, we strongly recommend avoiding such changes once a flag is in use.
{% endhint %}

***

### Deleting a flag

A flag can be deleted only if it is **not used in any LIVE campaign**.

If a flag is currently used in a LIVE campaign, deletion is disabled to prevent breaking production behavior.

{% hint style="warning" %}
Before deleting a flag, always verify its usage across environments and campaign statuses.
{% endhint %}

***

### Filtering and searching flags

<figure><img src="/files/wBJrT4Bl2i4rjmTvXJrM" alt=""><figcaption></figcaption></figure>

The Flags page provides advanced filters to help you quickly find and audit flags at scale.

You can filter flags by:

* **Name or ID**
* **Type** (`BOOLEAN`, `STRING`, `NUMBER`, `ARRAY`, `OBJECT`)
* **Tags**
* **Creation date**
* **Usage**
* **Environment**
* **Codebase analyzer**

#### Environment filter

The **Environment** filter corresponds to the environment where the flag is **used in a campaign**, not where it was created.

For example:

* Filtering by **Prod** shows flags used in campaigns running on the **Production** environment.

#### Usage filter

The **Usage** filter is based on the status of campaigns using the flag.

{% hint style="info" %}

#### **Use case: identify all flags impacting production**

If you want to see **all flags currently impacting your production environment**:

1. Apply **Usage = LIVE**\
   → shows flags used in at least one LIVE campaign.
2. Apply **Environment = Prod**\
   → restricts the list to flags used in LIVE campaigns running on Production.

This combination gives you a reliable view of all flags that are actively affecting users in production.
{% endhint %}

{% hint style="info" %}

#### Use case: clean up unused flags

If you want to identify flags that can potentially be removed:

1. Apply **Usage = UNUSED**\
   → shows flags that are not used in any campaign.

This view is ideal for:

* cleaning up unused flags,
* reducing technical debt,
* improving long-term maintainability of your FE\&R account.
  {% endhint %}

#### Codebase analyzer filter

This filter helps identify flags detected in your source code versus flags that are no longer referenced, supporting safer cleanup and technical audits.

***

### Organizing flags with tags

Tags are the primary way to organize flags in FE\&R.

They are designed to **categorize** flags rather than describe behavior.\
Common tagging strategies include:

* Team ownership (e.g. `team-checkout`, `team-search`)
* Feature or product area (e.g. `checkout`, `onboarding`)
* Page or flow (e.g. `product-page`, `payment-step`)

Using consistent tags allows teams to retrieve all their flags with a single filter and improves long-term maintainability.

***

### ⚙️ Developer focus

To use flags effectively in **Feature Experimentation and Rollout (FE\&R)**, follow these best practices.

#### Flag the right parts of your code

Clearly identify which parts of your application should be **flagged (variabilized)**, such as feature activation, UI behavior, or business logic.\
Focus on meaningful decision points and avoid over-flagging minor elements.

#### Agree on a shared naming convention

Align early with Product teams on a **clear and stable flag nomenclature**.\
Explicit names reduce implementation errors and make flags easier to reuse and audit.

#### Monitor flag usage in your codebase

Use the **Codebase Analyzer** to track flag implementation in your source code and detect inconsistencies between code and campaigns.

👉 Learn more:\
<https://docs.abtasty.com/server-side/integrations/codebase-analyzer>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/feature-experimentation-and-rollout/managing-flags.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
