Table of Contents
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.
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.
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.
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 evalued 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.
In the example below we are going to return true only if the user country is set to UK.
In the example below we are going to return true if the user country is set to UK and they are on the Gold plan or if the user email address end with @floodgate.io.
You can change the evaluation order of the targets by dragging them up and down using the target handle as shown below.
You can add as may rules to a target as necessary. To add a new rule click the Add Rule button.
Likewise to remove a rule, click the trash icon next to the rule you want to remove.
To add a new target click the Add Target button and a new target will be shown. To remove a target click the trash icon next to the corrisponding target.
Note that user targeting and percentage rollout only works if you provide a User Object to the Floodgate SDK for evaluating. If no user is provided the Default Value will be delivered.