Audiences

Feature Flags

In CloudBees Feature Flags, Audiences allow you to leverage product and user data to segment who can view certain flags at certain times. This is incredibly powerful, as you’ll be able to release features around user properties such as location, device type, and language. Audiences can segment flags by different types of properties, including dynamic target groups using custom attributes that are evaluated at run time.

There are different ways to segment audiences:

There are also different methods for "rolling" or gradually deploying your experiments and flags to these segments, including:

Creating An Audience

  1. Go to CloudBees Feature Flags dashboard.

  2. Click on Experiments on the left panel.

  3. Click the Create Experiment button to create a new experiment.

  4. In the New Experiment window:

    • Add a flag name in the Flag Name field.

    • Click the Set Audience button to continue. The Experiment Details view appears.

  5. Click the drop down arrow in the feature flag box.

  6. Select either True, False, Split or Scheduled. Split allows you to select the percentage of the target group that you want to deploy. Scheduled allows you to schedule a deployment date.

    Audience scheduled

  7. Click Update Audience.

Note:

  • You can not delete the default condition.

  • You can click the Reset link to go back to the state from before you started making changes. Reset only appears when you’ve made saved modifications.

Adding new conditions for feature flags

You can add new conditions such as version, property, target group or feature flags.

To add conditions for feature flags from the Experiment Details view:

  1. Click Add New Condition. The new condition is framed as the if while the default condition becomes the else.

  2. Click the drop down arrow in the Version box.

  3. Select either Versions or All Versions.

  4. Click the drop down arrow in the All Users box.

  5. Select either All Users, Property, Target Group, or Flags.

    Audience add new condition

  6. Click Update Audience.

Note:

  • You can continue to add additional new conditions. Each subsequent addition results in an else if condition.

  • You can also delete any condition with the garbage can icon to the right of the condition.

  • Each condition is draggable and can be moved before or after other conditions. To change a condition order, click and drag the three vertical dots next to an if/else statement.

If your feature flag is a Multi-Variant Flag, the Audience tab presents all the flag variants as they appear in the code.

The following are elements that you can evaluate to segment your deployment:

Element

Definition

Comparison operator

Version

A free text field that does a SemVer comparison to the version set in RoxOptions.

<, >, =, !=

Property

A custom property that you can create from any data that exists in your application. See custom properties for more information.

Boolean, String, Number

Target group

A group of users that you can create. Target Groups for more information.

Matches any of, Matches all, Matches none of

Flag

A flag value. See Flag Dependencies for more information.