# Hierarchy relation taxonomy

Every account in your CRM sits somewhere in a corporate tree. The **Hierarchy Relation** field tells you where. It's a single label, picked from eight positions, that reps can sort on, route with, and roll up against.

The taxonomy works the same way across Company, Government, and Education trees. You don't need to learn a separate model for each.

## Hierarchy positions

Every account gets exactly one label. When more than one could apply, the highest priority wins.

| Priority | Label                               | Company tree                                  | Government tree                       | Education tree                                                 |
| -------- | ----------------------------------- | --------------------------------------------- | ------------------------------------- | -------------------------------------------------------------- |
| 1        | **GUP** · Global Ultimate Parent    | Topmost HoldCo or Operating entity            | National Government, IGO              | Education System, standalone HEI                               |
| 2        | **GOP** · Global Operating Parent   | Topmost Operating entity (when GUP is HoldCo) | -                                     | -                                                              |
| 3        | **DUP** · Domestic Ultimate Parent  | Highest entity in its country                 | National Government below an IGO      | -                                                              |
| 4        | **DOP** · Domestic Operating Parent | Highest Operating entity in its country       | -                                     | -                                                              |
| 5        | **Subsidiary**                      | Operating subsidiary                          | Agency, Subnational, Local, Judiciary | Higher-Ed Institution, Pre-tertiary school, Research Institute |
| 6        | **Business Unit**                   | Brand or division inside an Operating entity  | -                                     | Academic Unit                                                  |
| 7        | **Establishment**                   | Branch, office, or site                       | -                                     | -                                                              |
| 8        | **Standalone**                      | Independent company                           | Independent agency                    | Independent institution                                        |

{% hint style="info" %}
**Government and Education don't split Operating vs HoldCo.** That distinction only exists for companies, so `GOP` and `DOP` are skipped for those trees. The classifier jumps straight from `GUP` to `DUP` to `Subsidiary`.
{% endhint %}

## Precedence rules

* Highest priority label wins. An account that qualifies for both `GUP` and `GOP` gets `GUP`.
* `GUP` is always the topmost entity in the tree, even when that entity is Operating (in which case `GOP` doesn't fire).
* `GOP` only exists when the `GUP` is a HoldCo and the tree is a company tree.
* `DUP` only appears when the highest entity in its country differs from the `GUP` or `GOP`.
* `DOP` only exists when the `DUP` is a HoldCo and the tree is a company tree.
* For Government and Education, the classifier skips `GOP` and `DOP` entirely.
* Ties are broken deterministically so the same tree always produces the same labels.

## How classification works

For every account, Kernel walks down this checklist and stops at the first match.

1. Is this the top of the tree? If yes, it's the **GUP**.
2. Is this an Operating company sitting below a HoldCo `GUP`? **GOP**.
3. Is this the highest account in its country, and that country is different from the `GUP`'s country? **DUP**.
4. Is this an Operating company sitting below a HoldCo `DUP`? **DOP**.
5. Is this a physical site (branch, office, plant)? **Establishment**.
6. Is this a brand or academic unit that isn't a legal entity? **Business Unit**.
7. Otherwise, **Subsidiary**.

If the account has no parent in the tree at all, it's a **Standalone**.

## Edge cases

| Case                                                            | What happens                                                   |
| --------------------------------------------------------------- | -------------------------------------------------------------- |
| No parent account anywhere in the tree                          | Labelled `Standalone`                                          |
| The account is the top of its own tree                          | Immediate `GUP`, no further walk needed                        |
| No country on the account                                       | Can't be `DUP` or `DOP`, falls through to `Subsidiary`         |
| Two accounts tied for "highest in country"                      | Deterministic tiebreak, same result every run                  |
| A Government or Education account is tagged HoldCo or Operating | Treated as Operating equivalent, `GOP` and `DOP` still skipped |
| Sub-category we don't recognise                                 | Defaults to `Subsidiary`                                       |

## Examples

Each node shows the entity's **sub-category** and **country**, then the label the classifier assigns. Shading by position: darker sage for the `GUP`, lighter sage for other parent positions, white for leaf positions.

### PE-backed insurance group

The canonical complex case. Every commercial position fires somewhere in this tree.

```mermaid
flowchart TD
  PS["<b>Pollen Street Capital</b><br/>HoldCo · GB<br/>GUP"]:::gup
  MG["<b>Markerstudy Group</b><br/>Operating · GB<br/>GOP"]:::gop
  MIS["<b>Markerstudy Insurance Svcs</b><br/>Operating · GB<br/>Subsidiary"]:::leaf
  MDE["<b>Markerstudy Deutschland</b><br/>HoldCo · DE<br/>DUP"]:::dup
  MDO["<b>Markerstudy DE Operations</b><br/>Operating · DE<br/>DOP"]:::dop
  MBE["<b>Markerstudy Berlin</b><br/>Establishment · DE<br/>Establishment"]:::leaf
  MMU["<b>Markerstudy Munich</b><br/>Establishment · DE<br/>Establishment"]:::leaf
  MES["<b>Markerstudy Spain</b><br/>Operating · ES<br/>DUP"]:::dup

  PS --> MG
  MG --> MIS
  MG --> MDE
  MG --> MES
  MDE --> MDO
  MDE --> MMU
  MDO --> MBE

  classDef gup fill:#b5c4b6,stroke:#343539,stroke-width:1.5px,color:#343539
  classDef gop fill:#d5e2d6,stroke:#98a59c,stroke-width:1px,color:#343539
  classDef dup fill:#e2ede3,stroke:#98a59c,stroke-width:1px,color:#343539
  classDef dop fill:#f0f6f1,stroke:#98a59c,stroke-width:1px,color:#343539
  classDef leaf fill:#ffffff,stroke:#c8d5c9,stroke-width:1px,color:#343539
  linkStyle default stroke:#98a59c,stroke-width:1.5px
```

Markerstudy Insurance Services is a `Subsidiary`, not a `DUP`, because the `GOP` is already in GB. `DUP` requires a different country from the `GUP` or `GOP`. Markerstudy Spain has a single Operating entity in its country, so it takes `DUP` (priority 3) ahead of `DOP` (priority 4).

### Swiss multinational with Operating at the top

When the topmost entity is already Operating, `GUP` and `GOP` collapse into one.

```mermaid
flowchart TD
  N["<b>Nestlé S.A.</b><br/>Operating · CH<br/>GUP"]:::gup
  NUK["<b>Nestlé UK</b><br/>Operating · GB<br/>DUP"]:::dup
  NPU["<b>Nestlé Purina UK</b><br/>Operating · GB<br/>Subsidiary"]:::leaf
  NHS["<b>Nestlé Health Science</b><br/>Operating · CH<br/>Subsidiary"]:::leaf
  NES["<b>Nespresso</b><br/>Operating · CH<br/>Subsidiary"]:::leaf

  N --> NUK
  N --> NHS
  N --> NES
  NUK --> NPU

  classDef gup fill:#b5c4b6,stroke:#343539,stroke-width:1.5px,color:#343539
  classDef dup fill:#e2ede3,stroke:#98a59c,stroke-width:1px,color:#343539
  classDef leaf fill:#ffffff,stroke:#c8d5c9,stroke-width:1px,color:#343539
  linkStyle default stroke:#98a59c,stroke-width:1.5px
```

`GOP` doesn't fire because the `GUP` is already Operating. Swiss children fall to `Subsidiary` because they share a country with the `GUP`.

### Global bank with HoldCo and cross-border operations

Every commercial position in one tree.

```mermaid
flowchart TD
  HH["<b>HSBC Holdings</b><br/>HoldCo · GB<br/>GUP"]:::gup
  HB["<b>HSBC Bank plc</b><br/>Operating · GB<br/>GOP"]:::gop
  HUK["<b>HSBC UK Bank</b><br/>Operating · GB<br/>Subsidiary"]:::leaf
  HUS["<b>HSBC USA Inc.</b><br/>HoldCo · US<br/>DUP"]:::dup
  HBUS["<b>HSBC Bank USA, N.A.</b><br/>Operating · US<br/>DOP"]:::dop
  HHK["<b>HSBC Hong Kong Branch</b><br/>Establishment · HK<br/>Establishment"]:::leaf

  HH --> HB
  HB --> HUK
  HB --> HUS
  HB --> HHK
  HUS --> HBUS

  classDef gup fill:#b5c4b6,stroke:#343539,stroke-width:1.5px,color:#343539
  classDef gop fill:#d5e2d6,stroke:#98a59c,stroke-width:1px,color:#343539
  classDef dup fill:#e2ede3,stroke:#98a59c,stroke-width:1px,color:#343539
  classDef dop fill:#f0f6f1,stroke:#98a59c,stroke-width:1px,color:#343539
  classDef leaf fill:#ffffff,stroke:#c8d5c9,stroke-width:1px,color:#343539
  linkStyle default stroke:#98a59c,stroke-width:1.5px
```

### Brand inside an operating company

Business Units aren't legal entities. They contract through a parent.

```mermaid
flowchart TD
  KH["<b>Kraft Heinz</b><br/>Operating · US<br/>GUP"]:::gup
  KUK["<b>Kraft Heinz UK</b><br/>Operating · GB<br/>DUP"]:::dup
  JO["<b>Jell-O</b><br/>Business unit · US<br/>Business Unit"]:::leaf

  KH --> KUK
  KH --> JO

  classDef gup fill:#b5c4b6,stroke:#343539,stroke-width:1.5px,color:#343539
  classDef dup fill:#e2ede3,stroke:#98a59c,stroke-width:1px,color:#343539
  classDef leaf fill:#ffffff,stroke:#c8d5c9,stroke-width:1px,color:#343539
  linkStyle default stroke:#98a59c,stroke-width:1.5px
```

Jell-O is a brand, not a separate company. It takes the `Business Unit` position.

### US Federal Government

Multi-level government tree. Everything below the `GUP` is flat.

```mermaid
flowchart TD
  USG["<b>United States Government</b><br/>National Government · US<br/>GUP"]:::gup
  HHS["<b>HHS</b><br/>Agency · US<br/>Subsidiary"]:::leaf
  FDA["<b>FDA</b><br/>Agency · US<br/>Subsidiary"]:::leaf
  CDC["<b>CDC</b><br/>Agency · US<br/>Subsidiary"]:::leaf
  NIH["<b>NIH</b><br/>Agency · US<br/>Subsidiary"]:::leaf
  DOD["<b>Department of Defense</b><br/>Agency · US<br/>Subsidiary"]:::leaf
  ARMY["<b>US Army</b><br/>Agency · US<br/>Subsidiary"]:::leaf
  DARPA["<b>DARPA</b><br/>Agency · US<br/>Subsidiary"]:::leaf
  FED["<b>Federal Reserve</b><br/>Agency · US<br/>Subsidiary"]:::leaf

  USG --> HHS
  USG --> DOD
  USG --> FED
  HHS --> FDA
  HHS --> CDC
  HHS --> NIH
  DOD --> ARMY
  DOD --> DARPA

  classDef gup fill:#b5c4b6,stroke:#343539,stroke-width:1.5px,color:#343539
  classDef leaf fill:#ffffff,stroke:#c8d5c9,stroke-width:1px,color:#343539
  linkStyle default stroke:#98a59c,stroke-width:1.5px
```

{% hint style="info" %}
**Government trees are flat below the `GUP`.** Every descendant resolves to `Subsidiary`. To tell FDA apart from HHS from USG, walk the parent relationship rather than relying on the label alone.
{% endhint %}

### EU, member state, subnational, local

`DUP` can fire for a government tree when an IGO sits on top.

```mermaid
flowchart TD
  EU["<b>European Union</b><br/>IGO · no country<br/>GUP"]:::gup
  FR["<b>République française</b><br/>National Government · FR<br/>DUP"]:::dup
  MIN["<b>Ministère de l'Économie</b><br/>Agency · FR<br/>Subsidiary"]:::leaf
  IDF["<b>Région Île-de-France</b><br/>Subnational · FR<br/>Subsidiary"]:::leaf
  PAR["<b>Ville de Paris</b><br/>Local Government · FR<br/>Subsidiary"]:::leaf

  EU --> FR
  FR --> MIN
  FR --> IDF
  IDF --> PAR

  classDef gup fill:#b5c4b6,stroke:#343539,stroke-width:1.5px,color:#343539
  classDef dup fill:#e2ede3,stroke:#98a59c,stroke-width:1px,color:#343539
  classDef leaf fill:#ffffff,stroke:#c8d5c9,stroke-width:1px,color:#343539
  linkStyle default stroke:#98a59c,stroke-width:1.5px
```

The EU has no single country, so it's the `GUP` by default. France is the highest entity in FR, and FR is different from the `GUP`'s country, so France takes `DUP`.

### UK Government with devolved administrations

```mermaid
flowchart TD
  UKG["<b>UK Government</b><br/>National Government · GB<br/>GUP"]:::gup
  HMT["<b>HM Treasury</b><br/>Agency · GB<br/>Subsidiary"]:::leaf
  DFE["<b>Department for Education</b><br/>Agency · GB<br/>Subsidiary"]:::leaf
  OFS["<b>Ofsted</b><br/>Agency · GB<br/>Subsidiary"]:::leaf
  SCOT["<b>Scottish Government</b><br/>Subnational · GB<br/>Subsidiary"]:::leaf
  SE["<b>Scottish Enterprise</b><br/>Agency · GB<br/>Subsidiary"]:::leaf

  UKG --> HMT
  UKG --> DFE
  UKG --> SCOT
  DFE --> OFS
  SCOT --> SE

  classDef gup fill:#b5c4b6,stroke:#343539,stroke-width:1.5px,color:#343539
  classDef leaf fill:#ffffff,stroke:#c8d5c9,stroke-width:1px,color:#343539
  linkStyle default stroke:#98a59c,stroke-width:1.5px
```

Scottish Government is subnational, but country is recorded at the sovereign level (GB), so `DUP` doesn't fire. Same for Welsh and NI governments.

### University of California System

Education tree where `Business Unit` fires via Academic Unit.

```mermaid
flowchart TD
  UC["<b>University of California System</b><br/>Education System · US<br/>GUP"]:::gup
  UCB["<b>UC Berkeley</b><br/>Higher-Ed Institution · US<br/>Subsidiary"]:::leaf
  HAAS["<b>Haas School of Business</b><br/>Academic Unit · US<br/>Business Unit"]:::leaf
  ENG["<b>College of Engineering</b><br/>Academic Unit · US<br/>Business Unit"]:::leaf
  LBL["<b>Lawrence Berkeley Lab</b><br/>Research Institute · US<br/>Subsidiary"]:::leaf
  UCLA["<b>UCLA</b><br/>Higher-Ed Institution · US<br/>Subsidiary"]:::leaf
  AND["<b>Anderson School of Management</b><br/>Academic Unit · US<br/>Business Unit"]:::leaf
  UCSF["<b>UC San Francisco</b><br/>Higher-Ed Institution · US<br/>Subsidiary"]:::leaf

  UC --> UCB
  UC --> UCLA
  UC --> UCSF
  UCB --> HAAS
  UCB --> ENG
  UCB --> LBL
  UCLA --> AND

  classDef gup fill:#b5c4b6,stroke:#343539,stroke-width:1.5px,color:#343539
  classDef leaf fill:#ffffff,stroke:#c8d5c9,stroke-width:1px,color:#343539
  linkStyle default stroke:#98a59c,stroke-width:1.5px
```

### K-12 district

```mermaid
flowchart TD
  LAU["<b>LA Unified School District</b><br/>Education System · US<br/>GUP"]:::gup
  LH["<b>Lincoln High</b><br/>Pre-tertiary · US<br/>Subsidiary"]:::leaf
  RH["<b>Roosevelt High</b><br/>Pre-tertiary · US<br/>Subsidiary"]:::leaf
  GH["<b>Garfield High</b><br/>Pre-tertiary · US<br/>Subsidiary"]:::leaf

  LAU --> LH
  LAU --> RH
  LAU --> GH

  classDef gup fill:#b5c4b6,stroke:#343539,stroke-width:1.5px,color:#343539
  classDef leaf fill:#ffffff,stroke:#c8d5c9,stroke-width:1px,color:#343539
  linkStyle default stroke:#98a59c,stroke-width:1.5px
```

### Standalones

An account with no parent and no children is a `Standalone`.

| Account                                             | Classification | Why                                                                                           |
| --------------------------------------------------- | -------------- | --------------------------------------------------------------------------------------------- |
| **Shopify Inc.** (Operating · CA)                   | Standalone     | No parent, tree of one                                                                        |
| **Harvard University** (Higher-Ed Institution · US) | Standalone     | Independent, no system parent                                                                 |
| **Federal Reserve** (Agency · US)                   | Standalone     | Only when imported without a USG parent. Otherwise `Subsidiary` as in the US Federal example. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kernel.ai/concepts/hierarchy-relation-taxonomy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
