Learn Something New: Create a Feature

To begin, login to your account and on the Features tab, click the New Featureā€¦ button.

Screen Shot 2019-07-23 at 9.56.13 AM
In the New Feature window, provide the following details:

  1. Feature Key - a unique identifier for the feature. Be sure to use alphanumeric characters, hyphens, and underscores in this unique key. No spaces.

  2. Description - while an optional field, we encourage you to provide a summary of the feature and what is does for ease of identification by the team.
    Screen Shot 2019-07-24 at 12.17.51 PM

  3. Feature Configuration -Defining feature variables allows you to iterate on your feature without redeploying the code. Planning your variables upfront will help developers avoid hard coding when not ideal.

  4. Controls - This is the toggle that turns the flag on/off in the specified environment. You can toggle a feature off to release code quickly without exposing it to users. You can also roll it out to a fraction of your user base to minimize the impact of the launch, allowing you to validate functionality and measure performance prior to rolling out broadly.
    Screen Shot 2019-07-24 at 12.18.04 PM

  5. Audiences - the group(s) of users to whom the feature will be made available. You can safely develop the feature directly in Production, hide it behind the feature flag, and set the audience to whoever you want viewing the feature.
    Screen Shot 2019-07-24 at 12.18.30 PM

  6. Example Code - Copy the appropriate API call with your feature key into your code. Optimizely populates the feature key, in each of the supported languages. The userID can be any non-null string.
    Screen Shot 2019-07-24 at 12.18.43 PM

  7. Create Feature - this saves the feature flag, making it available for implementation in your code.

Return to this feature whenever you want to update the feature flag and its availability. You can add and remove audiences, toggle the feature on in different environments, roll it out or back, and refer to the example code.