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

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



There is no character limit for a JSON variable value.

To create a flag variable:

  1. Navigate to Flags and select a flag.
  2. Navigate to Variables and click the add variable button.
Add variable

Click to enlarge image

  1. Select the variable's type.
Add Flag Variable Types
  1. Edit the Variable Key and optionally update the Description and Default Value.
Configure variable screen
  1. 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.