Skip to main content
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:
PriorityPath checkedDescription
1 (most specific)Zomato + Online Ordering + Riders + rider-456Exact user match
2Zomato + Online Ordering + RidersTeam-level match
3Zomato + Online OrderingDepartment-level match
4ZomatoCompany-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: ZomatoOnline OrderingRiders
  • 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.
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.

Adding an override

1

Open the feature

In the Foff dashboard, navigate to the scope and select the feature you want to override.
2

Click Add override

Click Add override on the feature detail page.
3

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

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

Save

Click Create override. The override is active immediately.

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.

Hierarchy

Learn the full resolution algorithm and how hierarchy paths are evaluated.