> ## Documentation Index
> Fetch the complete documentation index at: https://docs.foff.twospoon.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overrides: Targeted Values for Any Hierarchy Level

> Overrides let you return a different feature value for a specific point in your hierarchy. The most specific match always wins over the default.

An override sets a different value for a feature at a specific level of your hierarchy. When Foff resolves a feature query, it checks for overrides from the most specific hierarchy path down to the least specific, and falls back to the feature's default value only when no override matches. The most specific match always wins.

## How resolution works

Given a scope with the hierarchy `Company → Department → Team → User`, and a query for user `rider-456` in `Zomato → Online Ordering → Riders`, Foff checks these paths in order:

| Priority           | Path checked                                          | Description            |
| ------------------ | ----------------------------------------------------- | ---------------------- |
| 1 (most specific)  | `Zomato` + `Online Ordering` + `Riders` + `rider-456` | Exact user match       |
| 2                  | `Zomato` + `Online Ordering` + `Riders`               | Team-level match       |
| 3                  | `Zomato` + `Online Ordering`                          | Department-level match |
| 4                  | `Zomato`                                              | Company-level match    |
| 5 (least specific) | *(none)*                                              | Feature default value  |

The first path that has an override wins. If no override matches, the feature's default value is returned.

## Concrete example

You have a `dark-mode-ui` feature with a default value of `false`. You want to disable it explicitly for everyone in the `Zomato → Online Ordering → Riders` team — regardless of which individual user is queried.

Create an override with:

* **Hierarchy path**: `Zomato` → `Online Ordering` → `Riders`
* **Value**: `false`

Now, any query that includes that team path returns `false` from the team-level override, even if a higher-level override (say, at the `Zomato` company level) sets a different value.

<Warning>
  Override hierarchy values are **case-sensitive**. `Riders` and `riders` are treated as different hierarchy nodes. Double-check your values match exactly what your application passes at query time, or you will get unexpected results.
</Warning>

## Adding an override

<Steps>
  <Step title="Open the feature">
    In the Foff dashboard, navigate to the scope and select the feature you want to override.
  </Step>

  <Step title="Click Add override">
    Click **Add override** on the feature detail page.
  </Step>

  <Step title="Enter the hierarchy path">
    Fill in the hierarchy levels you want to target. You can specify any prefix of the full hierarchy — for example, just `Company` to target everyone in an organization, or `Company + Department + Team` to target a specific team.
  </Step>

  <Step title="Set the override value">
    Enter the value to return for this path. It must be the same JSON type as the feature's default value.
  </Step>

  <Step title="Save">
    Click **Create override**. The override is active immediately.
  </Step>
</Steps>

## Next steps

To understand the full resolution algorithm — including exactly how Foff walks the hierarchy and what happens at each step — read the hierarchy reference.

<Card title="Hierarchy" icon="sitemap" href="/concepts/hierarchy">
  Learn the full resolution algorithm and how hierarchy paths are evaluated.
</Card>
