1. Home
  2. Use Cases

Feature Flagging

Feature flagging can be used to switch features on and off. This can be done by toggling a flag within Flipt.

Once you have a flag created, you can control whether or not a feature is enabled within your application by toggling the enable slider in the Flipt UI.

Flag Enable Slider

An example request to evaluate whether or not this flag is enabled would look like this:

The response will contain a field Enabled, which could be used like this:

Percentage Rollouts

Variant testing can be accomplished by setting up a percentage rollout rule in Flipt. See Getting Started to learn how to accomplish this.

In this example rule, we have two variants that we are targeting, group-a and group-b, each with a 50% distribution.

Flag Targeting

An example request to evaluate this rule within your application would look like this:

Notice that we are using an email address for the EntityId. This does not need to be an email address, it just needs to be a unique identifier for your users.

The response will contain which variant we should show for this user, either group-a or group-b: