Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(context): Update doc; add how-to make custom context fields.
- Loading branch information
1 parent
59ec44a
commit e1d1ee2
Showing
4 changed files
with
96 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
website/docs/how-to/how-to-define-custom-context-fields.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: How to define custom context fields | ||
--- | ||
|
||
|
||
## Constrain on custom context fields {#constrain-on-custom-context-fields} | ||
|
||
It is also possible to constrain an activation strategy configuration on custom context fields. A common use case is a multi-tenant service where you want to control roll-out on a tenant identifier. This allows you to decide which customer should get access to your new feature. | ||
|
||
![Custom constraints](/img/custom-constraints.png) | ||
|
||
## Define your own custom fields {#define-your-own-custom-fields} | ||
|
||
> Starting with Unleash-enterprise version 3.2.28 customers can define their custom context fields via the user interface. | ||
You can also define your own custom context fields that you can use together with strategy constraints. We have seen customers use multiple variants of custom context fields to control their feature roll-out: | ||
|
||
- region | ||
- country | ||
- customerType | ||
- tenantId | ||
|
||
Combining strategy constraints with the “flexibleRollout” allows you to do a gradual roll-out to a specific segment of your user base. | ||
|
||
#### Step 1: Navigate to “Context Fields“ {#step-1-navigate-to-context-fields} | ||
|
||
Locate “context fields in the menu | ||
|
||
![Context fields](/img/context-fields.png) | ||
|
||
#### Step 2: Define new context field {#step-2-define-new-context-field} | ||
|
||
Next you can define your new context field. The minimum requirement is to give it a unique _name_. In addition, you can give it a description and define the legal values. | ||
|
||
![New context fields](/img/new_context_field.png) | ||
|
||
#### What is “legal values”? {#what-is-legal-values} | ||
|
||
Legal values defines all possible values for the context field. this will be used in Unleash Admin UI to guide users when working with context fields to make sure they only use legal values. | ||
|
||
![New context fields](/img/constraints_legal_values.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters