Skip to content

Consider the ability to allocate variants based on custom filters #460

@CuddleBunny

Description

@CuddleBunny

Variants are going to be a huge boon to this library and I'm excited to leverage them. I often find myself creating custom filters that evaluate based on the application state rather than the traditional user centric targeting scenarios. It would be great if we could allocate variants based on these filters. Perhaps something like:

  "FeatureManagement":
  {
      "MyVariantFeatureFlag":
      {   
          "Allocation": {
              "DefaultWhenEnabled": "Small",
              "AllocatedFor": [
                  {
                      "Name": "CustomFilter",
                      "Parameters": {
                          "SomeParam": "SomeValue"
                      },
                      "Variant": "Big"
                  }
              ]
          },
          "Variants": [
              { 
                  "Name": "Big"
              },  
              { 
                  "Name": "Small"
              } 
          ]
      }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions