> ## Documentation Index
> Fetch the complete documentation index at: https://confidence.spotify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an Individual Targeting Rule

> Learn how to create an individual targeting rule to force a specific variant for testing and debugging.

export const HowToSchema = ({name, description, steps = []}) => {
  const schema = {
    "@context": "https://schema.org",
    "@type": "HowTo",
    name,
    description
  };
  if (steps.length > 0) {
    schema.step = steps.map((s, i) => ({
      "@type": "HowToStep",
      position: i + 1,
      name: typeof s === "string" ? s : s.name,
      text: typeof s === "string" ? s : s.text || s.name
    }));
  }
  return <script type="application/ld+json" dangerouslySetInnerHTML={{
    __html: JSON.stringify(schema)
  }} />;
};

<HowToSchema
  name="Create an Individual Targeting Rule"
  description="Learn how to create an individual targeting rule to force a specific variant for testing and debugging."
  steps={[
"Go to Confidence and select Flags on the left sidebar",
"Go to the flag you want to add a rule to",
"Click the add rule button in the Rules section",
"Select Create individual targeting rule",
{
  name: "Step 1: Add a description (optional)",
  text: "Describe why you're adding this rule. This helps others understand the purpose and intended effect.",
},
{
  name: "Step 2: Configure the targeting",
  text: "- Serve: Select the variant to assign to matching users. - To: Select which attribute in the evaluation context to match against (such as User ID). - Matching: Enter the specific values that should receive the variant. You can add multiple values or paste a list.",
},
{
  name: "Step 3: Choose environments",
  text: "Select whether the rule applies to all environments or only specific environments. This step only appears if you have more than one environment.",
},
{
  name: "Click Create and activate",
  text: "The rule is created and immediately active. To create without activating, use the dropdown menu next to the button.",
},
]}
/>

[Individual targeting rules](../flags/define-rules#individual-targeting-rules) force a specific variant for a set of users.

## Create an Individual Targeting Rule

To create an individual targeting rule, follow these steps.

<Steps>
  <Step title="Go to Confidence and select Flags on the left sidebar" />

  <Step title="Go to the flag you want to add a rule to" />

  <Step title="Click the add rule button in the Rules section" />

  <Step title="Select Create individual targeting rule" />

  <Step title="Step 1: Add a description (optional)">
    Describe why you're adding this rule. This helps others understand the purpose and intended effect.
  </Step>

  <Step title="Step 2: Configure the targeting">
    * **Serve**: Select the variant to assign to matching users.
    * **To**: Select which attribute in the evaluation context to match against (such as User ID).
    * **Matching**: Enter the specific values that should receive the variant. You can add multiple values or paste a list.
  </Step>

  <Step title="Step 3: Choose environments">
    Select whether the rule applies to all environments or only specific environments. This step only appears if you have more than one environment.
  </Step>

  <Step title="Click Create and activate">
    The rule is created and immediately active. To create without activating, use the dropdown menu next to the button.
  </Step>
</Steps>

The rule now gives the selected variant to requests that match any of the values you specified.

<Tip>
  Place individual targeting rules at the top of the rule list to ensure they evaluate first. See [how to reorder rules](./reorder-rules).
</Tip>

## Related Resources

<CardGroup cols={2}>
  <Card title="Rules Reference" href="/docs/flags/define-rules">
    Deep dive into rule types and configuration
  </Card>

  <Card title="Reorder Rules" href="/docs/how-to-guides/reorder-rules">
    Manage rule priority and order
  </Card>

  <Card title="Create Conditional Targeting Rules" href="/docs/how-to-guides/create-conditional-targeting-rule">
    Target users with flexible criteria
  </Card>

  <Card title="Test Flag Resolution" href="/docs/how-to-guides/test-flag-resolution">
    Verify your rules work correctly
  </Card>
</CardGroup>
