If you want to QA a feature experiment or simply rollout a feature variation to an internal group of users, using a whitelist of users, combined with a targeted delivery rule is one of the easiest ways to achieve this goal.
For example, imagine that you want to release a new feature with 2 possible variations: feature A and feature B, but you want first to QA the experiment’s live behavior and show feature A to a first group of internal users and feature B to a second group of stakeholders, you can follow the easy steps below:
1. Create a custom data that includes all your internal user IDs
2. Create segments of whitelisted users (group A and B)
3. Create 1 targeted delivery rule for each group of users
Please note that we do not recommend setting a large number of user IDs (< 20 per variation) as it will increase the size of your datafile and thus the latency as the SDK will have to fetch a bigger file. If you wish to target more users, you can set a custom data attribute for the whole audience (eg. Internal users only) and then target the experience with that audience.
Technical note: you’ll need to call the addData() method of our SDK to associate user IDs to your visitors.
Create a custom data that includes all your internal user IDs (QA)
Here’s how to create a whitelist of internal users:
1. Navigate to Configure > Advanced tools and click the CTA “New”.
2. Select “Custom data” in the first dropdown list.
3. Name your custom data “Whitelist of users (QA)” and select “Kameleoon SDK method” in the first drop down and “List of” in the second one.
4. Click on the bottom left action “Advanced settings”. Specify the list of all your user IDs and corresponding names for those users. You can use the sample code given below:
return [{value:'q2f6hsbzpf', label:'User 1'}, {value:'8ney4225y65a', label:'User 2'}, {value:'3h6vjtz26b', label:'User 3'}, …. ];
The given labels will appear in the Segment builder when you create your targeted delivery rule. The given values are the whitelisted user IDs. Don’t forget to pass in the user ID to the SDK using the addData method before you call the triggerExperiment or getFeatureVariationKey methods. Indeed, the user IDs used in the custom data must match the user IDs passed through the SDK. Otherwise, whitelisting will not work.
Create segments of whitelisted users (group A and B)
Once the custom data has been created, you can create the segments you want to target with your feature variations.
1. Navigate to Configure > Segments and click the CTA “New Segment”.
2. Name your segment “Group A” and look for the custom data “Whitelist of users (QA)”.
3. Select the operator “Among the values” and select the users you want to be part of group A.
Create a targeted delivery rule for each group of users
1. Navigate to Activate > Feature flags and edit your feature flag.
2. Add a new rule and select the option “Targeted delivery”.
3. On the right side pane, select the segment “Group A” and choose the variation you want to serve, for example “Variation A”. All users from “Group A” will receive variation A of your flag.
4. Add a second “Targeted delivery” rule and replicate the same steps for “Variation B” and “Group B”.