> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/payroll/payroll-setups/setup-org-units.md).

# Setup Org Units

**Available on:** Desktop · Web · Phone

Navigate to **Payroll Setups** and click on "Setup Org Units".

**Setup Org Units** builds the organisation as a tree: the company at the top, then regions, branches, departments and teams. Each unit can have a **head**. For an employee placed in a unit, the tree decides who their manager is when they have no working Reporting Authority — see [Assign Employees to Org](/logic-erp-learning-hub-tutorials-and-best-practices/payroll/payroll-setups/assign-employees-to-org.md).

## The screen

* **Left: the tree.** Each unit with its type, its head and how many employees are placed in it; an inactive unit is grey and marked *(INACTIVE)*, a new one *(not saved)*. Tick **Show Employees** to list the working employees placed in each unit, with their designation and the head marked *\[HEAD]*. The tree opens fully on every refresh; **Expand All** re-opens any part you closed. Clicking a unit (or an employee) selects its unit's line on the right.
* **Right: the units**, one line each, which you edit.

| Column                       | What to enter                                                                                                                                                                                                |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Unit Name**                | The unit's name, in capitals. Two units under the same unit cannot share a name.                                                                                                                             |
| **Unit Above**               | The unit it sits under; **(TOP)** for the top of the tree. A unit cannot be put under itself or under a unit below it.                                                                                       |
| **Type**                     | COMPANY, REGION / ZONE, BRANCH, DEPARTMENT or TEAM / SECTION. A new line starts as DEPARTMENT.                                                                                                               |
| **Branch**, **Department**   | The unit's branch and department; **(FROM UNIT ABOVE)** takes them from the unit above. They are used by **Fill Suggestions** on Assign Employees to Org, to place employees by their branch and department. |
| **Head Name**, **Head Code** | The unit's head — a working employee. Optional. Head Code fills itself.                                                                                                                                      |
| **Order**                    | Its place among the units under the same unit (−999 to 999); equal orders are sorted by name.                                                                                                                |
| **Inactive**                 | **Yes** for a unit no longer used. Its head is skipped when finding a manager, and it is not offered on Assign Employees to Org.                                                                             |
| **Remarks**                  | An optional note.                                                                                                                                                                                            |
| **Employees**                | Filled in by the screen: how many employees are placed in the unit, including any who have left. Refreshed after Save.                                                                                       |

## Build the tree

### **Step 1: The top unit**

* On the blank last line, type the company as **Unit Name**, choose **Type** COMPANY, and leave **Unit Above** as **(TOP)**.

### **Step 2: The units below**

* Click a unit in the tree or the grid, then press **Add Below Selected**: a new line starts under that unit, with the next type down already chosen.
* Type its **Unit Name**, check its **Type**, and set **Branch** and **Department** where they differ from the unit above.

### **Step 3: The heads**

* In **Head Name**, start typing the head's name: the employee search list opens. Pick the employee, and **Head Code** fills itself. Only a working employee is accepted.
* To remove a head, stand on **Head Name** and press **Delete**.

### **Step 4: Save**

* Press **Save** and confirm. The screen closes without asking if changes are not saved, so save first.

> **Example —** A retailer builds this tree:
>
> * *ACME RETAIL* (COMPANY, head: the managing director)
>   * *NORTH* (REGION / ZONE, head: the regional manager)
>     * *DELHI STORE* (BRANCH, branch Delhi, head: the store manager)
>       * *SALES* (DEPARTMENT, department Sales, branch from the unit above = Delhi, head: Anil)
>
> A salesperson placed in *SALES* with no Reporting Authority reports to Anil. Anil, if he is placed in *SALES* himself with no Reporting Authority, reports to the store manager: *SALES* is skipped because he heads it.

## Changing and deleting

* Moving a unit: change its **Unit Above**.
* Delete a line (F8) and answer **Yes** to *Confirm Deletion*; it goes when you **Save**.
* A unit with units below it, or with employees placed in it (including employees who have left), cannot be deleted. Move them first, or tick **Inactive**.

## Messages you may see

| Message                                                                                                                   | Why                                                                              | What to do                                       |
| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------ |
| Enter the unit name                                                                                                       | The line has no name                                                             | Type the name                                    |
| There is already a unit '…' under the same unit.                                                                          | Two units with one name under one parent                                         | Rename one                                       |
| '…' is not a working employee.                                                                                            | The employee picked as head has left or is deleted                               | Pick a working employee                          |
| '…' has units below it. Move or delete them first.                                                                        | Deleting a unit that has units under it                                          | Move or delete those units, or tick **Inactive** |
| Employees are placed in '…'. Move them (Assign Employees to Org) or mark the unit Inactive.                               | Deleting a unit with employees                                                   | Move them, or tick **Inactive**                  |
| Select the unit to add below first (click it in the tree or the grid).                                                    | **Add Below Selected** with no unit selected                                     | Click a unit first                               |
| The head of '…' has left. / The head of '…' is not an employee.                                                           | On **Save**: a new or changed head is no longer working                          | Pick another head                                |
| A unit that still has units below it cannot be deleted (…). / Employees are placed in '…' - move them before deleting it. | On **Save**: someone changed the units or placements after you opened the screen | Move them first                                  |
| Modification rights are not available...                                                                                  | On **Save**: your user may only view this menu                                   | Ask for modify rights in User Access             |

## On the web

The same screen is on the web. On a phone (and narrow tablets), a switch shows the **Tree** or the **Units**, one at a time.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/payroll/payroll-setups/setup-org-units.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
