IBM Cloud Docs
Creating a segment

Creating a segment

Use segments to define a group of users or resources based on rules. Feature flags can target segments to deliver variants of a feature based on the needs like beta launches and experiments.

By default, the Segments pane displays the list of segments that are created in the current App Configuration service instance along with Name of the segment, tags, and date of creation.

List of segments
List of segments

Create a segment

To create a segment, complete these steps:

  1. In the App Configuration console, click Segments.

  2. Click Create. The side-panel opens with fields for creating a new segment.

    Create a segment
    Creating a new segment

  3. Provide the segment details:

    • Name - name of the segment.
    • Description - add a description of the segment, which is optional.
    • Optionally, define Tags that are required to identify with the segment.
    • Specify a rule for including users to a segment in the Include user attributes in segment. For further details about adding users to a segment, refer here.
  4. Click Create.

Adding user in a segment

Attributes specify the context of a request that you want to be evaluated as part of a decision. You can add user attributes in a segment by defining rules. You can define more than one rule.

To define a rule, at the time of creating or editing a segment, in Include user attributes in segment, add the following details:

  1. Add an Attribute name. For example, the attribute may be email or part of user name.

  2. Select an operator to be used for the evaluation from the list.

    • starts with
    • ends with
    • is
    • contains
    • greater than
    • greater than and equals
    • less than
    • less than and equals
  3. Enter values for the operator selected.

  4. Click Save rule.

Segments - overflow menu

The overflow menu for each of the segments (three vertical dots) consists of Edit, Copy, and Delete operations.

Overflow menu for a segment
Overflow menu for a segment

  • When Edit option is selected, you can make changes to the Name, Description, add or modify the rule for Including user attributes in segment.
  • When Copy option is selected, the segment information is copied and you need to modify the Name of the segment. Optionally, modify the other details based on your need.
  • When Delete option is selected, a confirmation window is displayed to seek confirmation to delete the selected segment. Deleting option will permanently delete the segment information and the action cannot be undone.

For targeting feature flags to segments, refer here.