Guides
Submit FeedbackJoin Developer Community

Create feature variables

Create a feature variable

Feature variables (also called remote feature configuration or remote variables) let you avoid hard-coding values in your code, so that Optimizely can dynamically assign those variables to your feature based on your test or rollout. For more information about what feature variables are, see Feature variables.

You can create variables of type Boolean, String, Integer, Double, or JSON. There is no character limit for a JSON variable value.

To define a feature variable with a default value in the Optimizely app:

  1. Navigate to Features and select a feature.
  2. Click Variable Keys and Types.
  3. Edit the Key, Type, and Default Value.
  4. Create as many feature variables as you need for that feature.
  5. Now, in your feature rollout or experiment, you can configure your variables with new values.
navigate to feature variablesnavigate to feature variables

navigate to feature variables

You can create variables of type Boolean, String, Integer, or Double.

For feature rollouts, you can configure different values for feature variables for each audience and each environment.
For experiments, you configure a different value for each feature variable in each variation.

Next Steps

Use your feature variables in an experiment or rollout.
See:
Roll out and roll back
Run feature tests with variables


Did this page help you?