You can create multiple Variations of your feature to choose which variant is delivered to each user evaluated by the flag.
How to create feature variations?
Any variables you created in the Variables page can be customized for each individual variation you create, meaning you don’t need to hard-code any values in your code.
- Navigate to your feature flag or create a new one
- In the left side menu, go to Variations under the Setup category
- Create a new Variation by clicking the + Add Variation button, then edit the Name and Variation Key of your variation.
- You can also customize the values of any feature variables you have created
- Create as many variations as needed.
Why use feature variations?
You can variabilize your code from the start and then customize your variations without making code changes by just updating the variables within those variations from the Kameleoon app to save substantial development time and branch out your product into more customized variations.
By default, all users are shown the default (Off) variation, unless targeted by your defined delivery rules in the Rollout planner.
Technical note: the getFeatureVariationKey() method of our SDK will return the variation key associated with the user.