Bulk targeting is only available to customers on select plans. To learn more, read about our pricing. To upgrade your plan, contact Sales.
This topic explains how to perform edits on groups of contexts with the “Bulk edit” option, or export all the contexts a flag is targeted to with the “Export as CSV” option.
The bulk edit option lets you manage all of your individual targets for a single feature flag variation. You can use bulk editing with the “user” context kind to make changes in large numbers, such as adding or removing contexts from a flag variation. The export as CSV option lets you export all the context keys for a flag’s targeting settings as a spreadsheet.
We recommend using individual targeting only for very small numbers of individual contexts. Individually targeting more than 10,000 contexts per environment may cause performance degradation, because the SDK takes longer to initialize when the targeting rules payload is large.
Instead, we recommend using targeting rules or segments to target large numbers of contexts. To learn how, read Custom targeting rules and Targeting segments.
If you have a long list of contexts you want to add, remove, or replace within a individual targeting rule, you can bulk edit these contexts from a flag’s Targeting tab.
To add, edit, or remove contexts in bulk:
In the left sidebar, click Code. The CodeControl menu appears.
Click Flags.
Choose the flag you wish to modify. The flag’s Targeting tab opens.
If the flag is off and the rules are hidden, click View targeting rules.
Click Edit in the individual targeting section.

Click the three-dot overflow menu:

Select Bulk edit. A “Bulk editing” dialog appears.
Choose Add, Remove, or Replace from the menu.
Use the menu to do one of the following actions:
Enter a list of context keys in the these users field, separated by a comma or new line. LaunchDarkly looks up contexts with a “user” context kind by key and displays them by name in the list on the right. If you want to target a context that has not yet been encountered by LaunchDarkly, you must enter the key.

You can update the list on the right before you perform the selected action. The options for updating the list include the following:
user-key-123-abc, and a user context with that key already exists in LaunchDarkly, it will show up by name in this list.Click Add N targets, Remove N targets, or Replace N targets to perform the selected action.
If you want to target the same large numbers of user contexts in multiple flags, you can create a segment, set up targeting rules for the segment, and target the segment instead. To learn how, read Segments.
You can download a list of all the contexts a flag variation is targeted to from the flag’s Targeting tab.
To export a list of contexts to a CSV file:
In the left sidebar, click Code. The CodeControl menu appears.
Click Flags.
Choose the flag you wish to export contexts for.
If the flag is off and the rules are hidden, click View targeting rules.
Find the individual targeting rule and click Edit.
Click the three-dot overflow menu:

Click Export CSV. A CSV file including the list of contexts keys a flag variation is targeted to downloads to your machine.