Define feature variations
You can create variations of your feature and decide which is shown to each user based on the criteria defined by the feature flag.
Creating feature variations
You can customize any variable you create in the Variables page for any variation. You don't need to code any values into your source code.
To create a feature variation:
- Navigate to your feature flag or create a new one.
- In the left sidebar, click Set up > Variations > Add variation.
- Edit your variation's Name and Variation Key.
- Click Save.
Default feature variations
When you create a new feature flag, Kameleoon generates two default variations: On and Off.
- Off Variation: Users assigned to this variation will see your application/website as it would appear if the feature flag were disabled. This variation lets you test new features on a limited group of users. Keep in mind that any custom variables you've created for the feature flag won't be available in the Off variation.
- On Variation: The On variation presents your flagged feature's default or control version. This variation serves as the baseline experience for your feature and will only use the default values for all defined feature variables.
Utilizing these default variations helps you manage user experience for different segments of your audience. You can view a summary of which variations are being served to your users in the Rollout Summary.
note
The getVariation()
method of our SDK will return the variation key associated with the user.