Predefined strategy types
caution
Predefined strategy types are a legacy implementation. Please use the default strategy with strategy constraints to achieve your desired targeting.
UserIDs
The userWithId
strategy is active for users with a userId
defined in the userIds
list.
Parameters:
- userIds - List of user IDs you want the feature flag to be enabled for
Flexible Gradual Rollout
The flexibleRollout
stategy has the following parameters:
- stickiness - Used to define how we guarantee consistency for a gradual rollout. The same userId and the same rollout percentage should give predictable results. Configuration that should be supported:
- default - Unleash chooses the first value present on the context in defined order userId, sessionId, random.
- userId - Guaranteed to be sticky on userId. If userId not present the behavior would be false
- sessionId - Guaranteed to be sticky on sessionId. If sessionId not present the behavior would be false.
- random - No stickiness guaranteed. For every isEnabled call it will yield a random true/false based on the selected rollout percentage.
- groupId - Used to ensure that different flags will hash differently for the same user. The groupId defaults to feature flag name, but the user can override it to correlate rollout of multiple feature flags.
- rollout - The percentage (0-100) you want to enable the feature flag for.