Skip to main content
This category explains how to use targeting to control which of your customers receive which of a feature flag. Configuring flags to serve different variations to different end users, or “,” is called “flag targeting.” LaunchDarkly contexts are data objects representing users, devices, organizations, and other entities that interact with your app. These data objects contain context attributes that describe what you know about that context, such as their name, location, device type, or organization they are associated with. LaunchDarkly can pass any context you want to LaunchDarkly, where you can then use those attributes in flag targeting. In addition to targeting specific context attributes, you can individuals, , or specific mobile apps and devices. You can also release features based on custom you create. You can even set expiration dates for flag targeting if you know you only want customers to receive a flag for a specific period of time. Here are example targeting rules on a feature flag:
Targeting rules on a feature flag.

Targeting rules on a feature flag.

Each feature flag can include a combination of , individual targets, and targeting rules. Each feature flag must include a . To learn more about how your application and LaunchDarkly SDKs work together to serve feature flag variations, read LaunchDarkly architecture.
Migration flags are different show different information on their Targeting tab than feature flags do. A migration flag’s Targeting tab shows information about the migration’s health and the it is targeted to. To learn more, read Migration flags.
The topics in this category explain how to create and manage different types of targeting rules and default flag variations:
Agent skill availableIf you use an AI coding agent, you can use the LaunchDarkly launchdarkly-flag-targeting agent skill for this task. It toggles flags, sets percentage rollouts, adds targeting rules and individual targets, and copies flag configurations between environments.To install the skill, run npx skills add https://github.com/launchdarkly/ai-tooling --skill launchdarkly-flag-targeting.To learn more, read LaunchDarkly agent skills.