HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In
Hey! These docs are for version 2.1.0-full-stack, which is no longer officially supported. Click here for the latest version, 1.0!


A feature configuration is a set of **variables** associated with a feature that you can set as part of a feature test. Defining feature variables allows you to iterate on your feature without redeploying the code. Run feature tests to determine the optimal combination of variable values, then set those values as your default feature configuration and launch using a rollout.

## Add a feature configuration

To add feature configuration variables:

  1. On the Features dashboard, click the name of the feature you want to configure.

  2. Click _Add Variable_.

  3. Type a unique variable key, select a type, and enter a default value for each variation in the configuration.

  4. Click _Add Variable_ to add another variable.

  5. Click _Save_ when you are finished adding variables for your feature.

694




  1. Deploy the feature configuration. When you add a feature configuration, Optimizely updates the feature’s example code to include feature variable accessors. The image shows how variable values are dynamically assigned if the feature flag is active.

689




The SDKs offer different [Get Feature Variable](🔗) methods based on the variable's datatype (boolean, double, integer, or string). The maximum length of a string variable is 1500 characters.

The example shows how variable values are dynamically assigned if the feature flag is active.





Define feature variables


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.