# Product hierarchy (/guides/product-hierarchy)

Your AI agent can read and restructure your product hierarchy for you. Once it's connected to Heuristic ([Connect an AI
agent](/mcp/connect)), ask it in your own words, for example "Show me Acme Analytics' hierarchy: its categories and
features." [Ask your agent](#ask-your-agent) has more requests to start from, including changing many categories and
features in one go. The steps below do the same in the web app, where you can also see your hierarchy as a tree.

Heuristic groups the features it finds in your [knowledge base](/guides/knowledge-base) into categories. That tree
of categories and features is your product hierarchy, and every piece of feedback is linked to the feature it is
about. You can see it as a table or as a tree.

Product Owners rebuild categories and edit the hierarchy. Viewers see everything but change nothing.

## Rebuild categories [#rebuild-categories]

When your features have changed a lot, let the AI group them again.

1. In **Settings → Product → Knowledge base**, under **Group into categories**, choose **Rebuild categories**.
2. Choose **Rebuild** to confirm.

The AI regroups all features into new categories. Categories and placements people made are kept. Categories can be
rebuilt once an hour, and not while the knowledge base is being read.

## See your hierarchy as a tree [#see-your-hierarchy-as-a-tree]

The **Product hierarchy** page shows your hierarchy as a table, or as a tree of boxes: the product at the top, its
categories below it, and their features below them, joined by lines. Each box shows the feature's or category's
customers or ARR, as you choose under **Show**; the table shows both.

The table and both trees list things in the same order, until you sort the table by one of its columns. The top-level categories keep their order, so each keeps its
colour. Below them, the subcategories and features of each category, and the features not in a category yet, are
listed alphabetically by name.

1. In the sidebar, choose **Product hierarchy**. The page opens in the **Tree**, which shows one category and what it
   holds.
2. At the right of the page's bar, choose **Full tree** to see the whole tree on one canvas, or **Table** to see it
   as a table. Choose **Tree** to go back.

Heuristic remembers the view you chose on this browser. On a phone you choose between **Tree** and **Table**; a link
to the **Full tree** opens the **Tree** there.

### In the Full tree [#in-the-full-tree]

1. To open a category, choose the round button at the bottom right of its box (**Expand**). Its subcategories and
   features come out below it and the view moves to them.
2. To close it again, choose the same button, which now points up (**Collapse**).
3. To open or close every category at once, choose **Expand all** or **Collapse all** at the bottom left of the
   canvas.
4. To get closer or see more, choose **Zoom in** or **Zoom out**, or hold Ctrl and scroll. Choose **Fit to screen**
   to see the whole tree again. Drag the canvas to move around, or click the small map at the bottom right.

With the keyboard, the arrow keys move between boxes, and Enter or the right and left arrows open and close a
category.

## Move through the levels in the Tree [#move-through-the-levels-in-the-tree]

The **Tree** shows one box in focus, your product or a category, with what it holds below it.

1. To go down a level, choose the round button at the bottom right of a category's box (**Open**). That category
   moves into focus.
2. The levels above the focus box stand as a stack of cards behind it, the nearest one at the front. To go up, choose
   a card: the card in front takes you up one level, a card farther back takes you to its level.
3. From five levels down, the card farthest back is **Back to the top**: choose it to go back to your product.

Your browser's Back and Forward buttons also move you up and down the levels you visited. When you type in **Find a feature**,
the **Tree** moves to the level of the first match.

## Edit the hierarchy [#edit-the-hierarchy]

1. In the sidebar, choose **Product hierarchy**.
2. Choose **Edit hierarchy**.
3. Open the menu at the end of a category's or feature's row, or at the top right of its box in the **Tree** or
   **Full tree**, to **Rename** it,
   **Edit description**, **Add subcategory** or **Add feature**, **Move to…** another category, **Merge into…** another
   one, or **Delete** it. To add a category at the top, choose **Add category**. You can also drag a row or box to its new
   place: in the tree views, drag a box by its grip at its top right onto another box, or in the **Tree** also onto a
   card of the levels above.
4. Choose **Done** when you are finished.

Each change saves at once and shows **Edited** beside what people changed. An added, renamed or moved feature or
subcategory goes straight to its alphabetical place; a new top-level category goes last. A category holds either
subcategories or features, never both. When you delete or merge a feature, its insights move: Heuristic says how many before you
confirm. A deleted feature is not added back when the knowledge base is read again.

## Undo a change [#undo-a-change]

1. While you edit the hierarchy, choose **Undo** (Ctrl+Z) to reverse your last change, and **Redo**
   (Ctrl+Shift+Z) to make it again.
2. To reverse every change you made on the page, choose **Undo all** and confirm.

## Ask your agent [#ask-your-agent]

Once your AI agent is connected to Heuristic ([Connect an AI agent](/mcp/connect)), you can ask it to do these jobs
for you, in your own words:

- "Show me Acme Analytics' hierarchy: its categories and features." ([read the hierarchy](/mcp/tools/get_hierarchy))
- "Group the reporting features under one category called Reporting, and merge Scheduled exports into Exports. Show
  me the changes before you save them." The agent previews every step first, then saves them as one change, which
  you can undo in one step. ([change the hierarchy](/mcp/tools/apply_hierarchy_changes), [undo a
  change](/mcp/tools/undo_change))
- "Rebuild Acme Analytics' categories." ([rebuild categories](/mcp/tools/rebuild_hierarchy))