One of Unleash’s most requested Enterprise features is now available to all users.
You spoke, we listened: Available now, all open-source users of Unleash who upgrade to version 4.16 will get access to strategy constraints and custom context fields.
Add strategy constraints to your Unleash today
Strategy constraints give you granular control over who gets to see a specific feature by adding preconditions to one of your activation strategies. You can add preconditions for any Unleash context field.
As of version 4.16, Unleash supports 15 different constraint operators, fine-tuned for a number of use cases.
Here’s an example: A gradual rollout strategy could target 50% of a user base. But what if you want to only target users with a company email? For that, you’ll need strategy constraints.
Quickly schedule feature releases and feature availability windows. Target feature rollout to users based on variables like region or email address domain. Generate user demand with time-limited feature releases. There are a ton of ways to use strategy constraints, and this is only scratching the surface.
Any strategy on any feature can have as many strategy constraints as you want. Note that when a strategy is evaluated, all strategy constraints must be met for the strategy to pass.
You’ll find that, in most cases, strategy constraints replace the need for custom activation strategies. This means that you no longer need to define custom strategies, then implement them across your SDKs.
Note: Before creating strategy constraints, you’ll need to set up a feature toggle in Unleash, then give it an activation strategy.
Find and select the edit strategy button on the strategy you are working with.
Click the add constraint button to open the constraints menu.
If you want to update an existing constraint, find the constraint in the edit strategy screen and use the constraint's edit button.
Because strategy constraints use Unleash context fields, make sure you pass the relevant context to your client SDK. Read more in the SDK section of our strategy constraints documentation.
While strategy constraints are now free to all users, you won’t have access to the feature unless you upgrade to version 4.16. For users with versions 4.0 and above, you can grab the latest version from the Docker hub. Users of earlier versions should reference our migration guide before upgrading.
Feel free to play around first! Try out our demo instance to get a quick taste of what strategy constraints can do.
In the mood to dig around? Visit Unleash on GitHub to check out the strategy constraints source code.