Feature flags are powerful when serving variations like true and false. However, they are even more powerful when you can serve variations that are strings, numbers, JSON objects, and JSON arrays — which we call multivariate feature flags.
Previously, we allowed you to create multivariate feature flags with defined variations, but we did not let you add, edit, or delete variations once they were created. Now, you can!
With support for edit variations, you can now edit feature flags after they are created.
You can now:
- Manage pricing in an e-commerce app by serving number variations
- Dynamically control configuration values
- Serve hex values to control CSS styles
- Sunset variations that are no longer necessary
When you navigate to any feature flag, you will notice a new Variations tab. This is where you will be able to edit your flag’s variations.
For boolean flags, you can edit a variation’s name and description, but not the value. This is because boolean flags can only serve true and false values.
For multivariate flags, you can now add, edit, and delete variations even after the flag is created. Moreover, you can edit any variation’s value, name, and description. Keep in mind that you cannot change the “type” of variation being served after the flag is created.
When you add, edit, or delete a variation for a multivariate flag, the change will apply to all environments within that project. For example, if you have a feature flag called “Checkout Flow” with 4 variations: A, B, C, D and you deleted variation D, then every environment will only have 3 variations (A, B, C) for the “Checkout Flow” feature flag.