You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platform/feature-flags/targeting/randomize-using-custom-property.md
+49-19Lines changed: 49 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,38 +3,68 @@ title: Randomize using a Custom Property
3
3
sidebar_position: 6
4
4
---
5
5
6
-
:::warning
7
-
To use this functionality in conjunction with Server-Side SDKs you must ensure you are on at least these SDK versions:
8
-
- DotNet 4.1.0
9
-
- Go 2.18.1
10
-
- Java 2.3.0
11
-
- Node.js 1.19.0
12
-
- Python 3.7.0
13
-
- Ruby 3.2.0
14
-
- SDK Proxy 2.2.0
15
-
:::
6
+
DevCycle uses User ID as the primary key for delivering variations, rolling out a [feature](docs/platform/feature-flags/features.md), and randomizing distribution. However, there are cases in which a User ID is not the primary identifier of the request to DVC, thus making the usage of DevCycle features, specifically Gradual Rollouts, difficult in these scenarios.
7
+
8
+
This functionality allows you to set a [Custom Property](docs/platform/feature-flags/targeting/custom-properties.md) as the key to rollout / distribute on rather than User ID. Account, Organization, Tenant or Store IDs are some commonly used examples. At DevCycle, we use this feature to gradually roll out new functionality on an organization-by-organization basis rather than on a user-by-user basis to ensure all users in the same organization see the same features.
9
+
10
+
## Minimum Supported Server SDK Versions
16
11
17
-
DevCycle uses User ID as the primary key for delivering variations, rolling out a feature, and randomizing distribution. However, there are cases in which a User ID is not the primary identifier of the request to DVC, thus making the usage of DevCycle features, specifically Gradual Rollouts, difficult in these scenarios.
12
+
To use this functionality in conjunction with Server-Side SDKs, ensure that you are on the following **minimum** SDK versions. Client-side SDKs do not have any version requirements.
18
13
19
-
This functionality allows you to set a [Custom Property](docs/platform/feature-flags/targeting/custom-properties.md) as the key to roll out / distribute on rather than User ID, such as Account, Organization, Tenant or Store ID. For example, at DevCycle, we would use this feature to gradually roll out new functionality on an organization-by-organization basis rather than on a user-by-user basis to ensure all users in the org see the same features.
14
+
| SDK Type | Minimum Version |
15
+
| - | - |
16
+
| Node.js | 1.19.0 |
17
+
| Go | 2.18.1 |
18
+
| Java | 2.3.0 |
19
+
| DotNet | 4.1.0 |
20
+
| Python | 3.7.0 |
21
+
| Ruby | 3.2.0 |
22
+
| SDK Proxy | 2.2.0 |
23
+
24
+
## Targeting Rule setup using a Custom Property for Randomization
20
25
21
-
## Setting Up a Targeting Rule using an Custom Property for Randomization
22
26
Since this functionality is only relevant in specific Targeting Rule use cases, the option to randomize using a Custom Property will only appear when you:
23
27
24
-
* Serve `Random Distribution` (ie. [run an experiment](/platform/experimentation/feature-experimentation#experimentation-using-a-custom-property-for-randomization))
28
+
* Serve `Random Distribution` (i.e. [run an experiment](/platform/experimentation/feature-experimentation#experimentation-using-a-custom-property-for-randomization))
25
29
* Select a `Gradual Rollout`
26
30
* Select a `Multi-Step Rollout`
27
31
28
-
The `Randomize Using` field will appear at the bottom of the Targeting Rule, under the `Schedule` section. The dropdown will also populate with all existing Custom Properties. Select the Custom Property you wish to use for your random distribution or rollout.
32
+
The `Randomize Using` field will appear at the bottom of the Targeting Rule, under the `Schedule` section. The dropdown will be populated with all existing Custom Properties from your project. Select the Custom Property you wish to use for your random distribution or rollout.
29
33
30
34

31
35
32
-
## Expected Behaviour when Using a Custom Property as the Randomization Key
36
+
If you haven't setup Custom Properties, you'll have to create them on the dashboard and define them in code. Take a look at our [Custom Properties](/platform/feature-flags/targeting/custom-properties) page for more info. Here's a sample of how that's setup with the React SDK.
### Behaviour when the Randomize Using Custom Property is Undefined
33
55
34
56
:::info
35
-
Note: If a user does not have the specficied Custom Property key, DevCycle will treat a non-existent randomization key as a static null value. (e.g. "Region" : "null")
57
+
If a user does not have the specified Custom Property key, DevCycle will treat the non-existent Randomization key as a static null value (e.g. "Organization": null) and may continue to rollout / distribute the Feature to the user.
36
58
:::
37
59
38
-
In this case, DevCycle only considers the Targeting Rule definition and does not require a user to have the selected Custom Property defined. Users without a defined randomization key will all be bucketed into the same variation.
60
+
DevCycle only considers the Targeting Rule `Definition` for eligibility in receiving a Feature and does not require a user to have the selected "Randomize Using" Custom Property defined. Users without a defined randomization key will proceed to be bucketed, but these users will all be bucketed into the same variation and rollout threshold.
61
+
62
+
If you want to ensure that you only rollout and/or distribute variants to users who have the selected Custom Property defined, then you must add a filter to your Targeting Rule Definition that targets users where the Custom Property `exists`. If this filter is included in the Targeting Rule definition, users without a value for that Custom Property will not qualify for that rule. Instead, they will be evaluated against the next rule (if one exists), or they will receive the code defaults. Example of such a targeting rule setup:
63
+
64
+

65
+
66
+
## Experimentation using a Custom Property for Randomization
67
+
68
+
In terms of Experimentation, randomization based on Custom Properties allows you to rollout specific variations of your application to user groups that share the same `Custom Property`. This gives you more flexibility to Experiment and A/B test on groups of users that are defined by your Custom Properties, or by another identifier that is not the User ID.
39
69
40
-
If you want to ensure that you only target users who have the selected Custom Property, then you must add a filter where Custom Property `exists`. If this filter is included in the Targeting Rule definition, users without a value for that Custom Property will not qualify for that rule. Instead, they will be evaluated against the next rule, if one exists, or they will receive the code default.
70
+
Learn more about random distribution within the context of experimentation on the [Feature Experimentation](https://docs.devcycle.com/platform/experimentation/feature-experimentation/#experimentation-using-a-custom-property-for-randomization) page.
0 commit comments