Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback

Create feature variables

This topic describes how to 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. In your feature rollout or experiment, you can configure your variables with new values.
2232

navigate to feature variables

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

📘

Note

There is no character limit for JSON and string variable values.

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.