Environment Flag Settings

Every flag can hold a different configuration per environment. This is where the power of feature flags comes in allowing your application to move between your infrastructure environments and dynamically change its functionality without you needing to change your code.

The environment flag settings page is split into 3 parts, Default Value, Percentage Rollout and User Targeting.

Default Value

The default value is what will be delivered to your application for the given environment. The default value is only delivered if the feature flag is enabled and the user accessing your application does not fall into any targeting groups or percentage rollout is not enabled.

User Targeting

Floodgate allows you to get very specific on selecting which users you want to serve your new features to, this is called User Targeting.

You can add multiple targets and target rules to a given flag. Targets are evaluated in the order show. Once a target has been evaluated as true, no further targets are considered.

Security Concerns

Even though Floodgate requires data about your users to allow for targeted flag evaluations, it's important to understand that this data is never sent to the Floodgate servers. All evaluations are done locally in the SDK within your application.

Simple User Targeting Example

In the example below we are going to return true only if the user country is set to UK.

Document image

Complex User Targeting

In the example below we are going to return true if the user country is set to UK and they are on the Gold or Silver plan or if the user email address end with @floodgate.io.

Document image

Target Evaluation Order

You can change the evaluation order of the targets by dragging them up and down using the target handle in the target top bar.

Adding and Removing Target Rules

You can add as may rules to a target as needed. To add a new rule click the plus button next to the target rule.

If you want to remove a rule from a target, simply click the corresponding trash icon to remove that rule.

Adding and Removing Targets

To add a new target, click the Add Another Target button on the top right of the targets section.

To remove a target completely, click the corresponding trash icon for the target.

Percentage Rollout

Enabling percentage rollout means you can deliver a different value in your application to only a percentage of your user base. Percentage rollout allow you to gradually deploy your application features to a larger audience as and when you are happy with how your application is performing.

In the example below we are serving true to 10% of the users accessing the application, meaning only 10% of the users will see this new feature.

Document image

Remember

User targeting and percentage rollout only work if you provide a User Object to the Floodgate SDK for evaluating. If no user is provided the Default Value will be delivered.