Create flag variables
How to create variables in Optimizely Feature Experimentation to remotely configure your flags.
Variables let you remotely configure your flag. Instead of hard-coding and updating your variables by deploying, you can group them in a flag variation and then update them remotely in the Optimizely application.
You can create flag variables of the type:
- Boolean
- String
- Integer
- Double
- JSON
Note
There is no character limit for a JSON variable value.
To create a flag variable:
- Navigate to Flags and select a flag.
- Navigate to Variables and click the add variable button.

Click to enlarge image
- Select the variable's type.

- Edit the Variable Key and optionally update the Description and Default Value.

- Create as many variables as you need for that flag by repeating steps 2-4.
Implementing variables
Once you have created your variables, the next step is to create flag variations. Variations let you avoid hard-coding variables in your application and let you group and reuse variable values using flag rules.
Updated 11 days ago