> ## 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.

# Reorder Rules

> Learn how to control rule evaluation order and understand the impact of reordering.

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="Reorder Rules"
  description="Learn how to control rule evaluation order and understand the impact of reordering."
  steps={[
"Go to Confidence and select Flags on the left sidebar",
"Go to the flag you want to reorder rules for",
{
  name: "Drag a rule up or down in the list",
  text: "Click and hold on a rule card, then drag it to the desired position.",
},
]}
/>

[Rules](../flags/define-rules#order-of-rules) evaluate in order from top to bottom, and the first rule that matches determines the variant assignment.

## Reorder Rules

You can reorder rules by dragging them up and down in the list.

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

  <Step title="Go to the flag you want to reorder rules for" />

  <Step title="Drag a rule up or down in the list">
    Click and hold on a rule card, then drag it to the desired position.
  </Step>
</Steps>

## Best Practices

**Place individual targeting rules at the top.** Individual targeting rules should evaluate first to ensure they take precedence over other rules. This also increases their visibility and makes it quick to turn them off when no longer needed.

**Confidence adds new rules to the bottom.** When you create a new rule, Confidence places it at the bottom of the list to avoid impacting already running tests and rollouts.

<Note type="warning">
  Changing the order of rules can have a significant impact on user experience and may affect the results of A/B tests and rollouts. The first rule that matches a client and user determines the variant, so moving rules can change which users see which variants.
</Note>

## Related Resources

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

  <Card title="Create Individual Targeting Rules" href="/docs/how-to-guides/create-individual-targeting-rule">
    Force specific variants for testing
  </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>
