> For the complete documentation index, see [llms.txt](https://doc.dastra.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.dastra.eu/en/getting-started/setup/organizational-units.md).

# Create and set up organizational units

Learn how to create and set up entities and departments in Dastra.

## Introduction

Organizational units structure your workspace. Two types of organizational units can be created:

* **entities**, which correspond to legal entities and represent a controller;
* **departments**, which organize the entities.

In Dastra, a workspace is not a legal entity: **a workspace can refer to several distinct legal entities**, as in a corporate group. However, there can be only one legal representative per legal entity.

{% hint style="info" %}
Each entity in Dastra is considered a controller.
{% endhint %}

## Access the organizational units

In the left menu, click **Workspace settings**, then **Organizational units**.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-c62cd065ac40fcab3d48267df7625b4521a854a6%2Fgetting-started-org-units-1.png?alt=media" alt="Workspace settings menu with the Organizational units entry"><figcaption><p>The Workspace settings menu</p></figcaption></figure>

The screen for **creating and setting up** organizational units opens. It has two tabs: **Organizational units** (the list) and **Organigram**.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-ce233fcf0e2e697f3ce2f9fd12e3e24a3fadc0bc%2Fgetting-started-org-units-2.png?alt=media" alt="List of organizational units with the Create an entity button and its menu"><figcaption><p>The list of organizational units</p></figcaption></figure>

## Create or edit an entity

1. Click **Create an entity**.
2. Fill in the **Entity name** and the **Country**, which are required. You can also indicate the person in charge (the legal representative), the data protection officer and the representative within the European Union, if applicable.
3. Click **Save changes**.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-7c273dcfd1d0cf30b69edf5c034a02b178e0fabb%2Fgetting-started-org-units-3.png?alt=media" alt="Form for creating an entity"><figcaption><p>The form for creating an entity</p></figcaption></figure>

{% hint style="info" %}
Unlike departments, the number of entities (controllers) you can create depends on a quota linked to your subscription. To increase it, [contact the sales team](https://www.dastra.eu/en/contacts).
{% endhint %}

To edit an entity, click the three dots to the right of the entity, then **Edit**. Make your changes and click **Save changes**.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-21c3975bca1f7bc97c296c25f449f33fe4756abd%2Fgetting-started-org-units-4.png?alt=media" alt="Context menu of an organizational unit"><figcaption><p>The three-dot menu of an organizational unit</p></figcaption></figure>

## Create or edit a department

To create a department, open the menu of the **Create an entity** button, click **Create department** and fill in the fields.

To edit it, click the three dots to the right of the department, then **Edit**, make your changes and click **Save changes**.

## Add child units

The three-dot menu of a unit also offers:

* **Add a child department**: creates a department under the unit;
* **Add a child entity**: creates an entity under the unit, for example to represent the subsidiary of a subsidiary.

## Delete an organizational unit and transfer its data

An organizational unit cannot be deleted while items are attached to it. In the three-dot menu, click **Delete**, then click the listed items and assign them to another unit. You can also click **Transfer data** to move the object types of your choice to another unit without deleting the unit.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-7daeebb3ff2f292e4eb216c96074f1e38fd56606%2Fgetting-started-org-units-7.png?alt=media" alt="Organizational unit deletion screen with the list of items to transfer"><figcaption><p>Deleting an organizational unit</p></figcaption></figure>

{% hint style="danger" %}
Deleting an organizational unit is permanent. The associated data is transferred to the unit you choose.
{% endhint %}

## Import and export organizational units

Open the menu of the **Create an entity** button: it offers **Import** and **Export**.

To import, click **Import**, then **Download the file template**. Fill in the file and drop it in the drop box. The file can be in CSV format (UTF-8 encoding, `;` separator), TXT or XLSX.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-7949186727ab84d7ede1b6a27343045a7a39be86%2Fgetting-started-org-units-5.png?alt=media" alt="Organizational unit import window with the Download the file template button"><figcaption><p>The import window</p></figcaption></figure>

Two columns are required:

* `Id`: the identifier of the unit, a text that is unique within the file (80 characters maximum);
* `Label`: the name of the unit (80 characters maximum).

The other columns are optional:

* `ParentId`: the `Id` of the parent unit, if there is one;
* `CountryCode`: the country, as a 2-letter code ([ISO 3166](https://www.iso.org/iso-3166-country-codes.html)). The default value is `FR`;
* `Type`: `Entity` for an entity or `Area` for a department. The default value is `Entity`;
* `City`, `Address`, `ZipCode`, `MailAddress`, `PhoneNumber` and `ImmatriculationNumber`: the contact details of the unit;
* `RepresentativeName` and `RepresentativeType`, `DpoName` and `DpoType`, `ReferentName` and `ReferentType`: the name and type of the stakeholder associated as representative, DPO or person in charge;
* `OwnerEmail`: the email address of the owner of the unit.

{% hint style="warning" %}
Limit the hierarchy to 7 levels (parent-child relationships) so that the import is processed correctly.
{% endhint %}

Example:

<table><thead><tr><th>Id</th><th>ParentId</th><th width="492">Label</th><th>CountryCode</th><th>Type</th></tr></thead><tbody><tr><td>20996</td><td></td><td>HOLDING</td><td>FR</td><td>Entity</td></tr><tr><td>21009</td><td>20996</td><td>IT</td><td>BE</td><td>Area</td></tr></tbody></table>

## View and set up units from the organigram

The **Organigram** tab shows your entities and departments graphically. You can perform most of the operations available in the list from there.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-75d400d04eab7a25c198c08b691467c9599c4ed3%2Fv3-improvements-org-units-3.png?alt=media" alt="Organigram view of the organizational units"><figcaption><p>The Organigram view</p></figcaption></figure>

### Filter the organigram

The bar above the chart is both a legend of the colors and a filter. Use it to display only what you need:

* **Workspace** and **Departments**: clear the box to hide the workspace or the departments. The **Entities** box is always checked, because entities are always displayed.
* **Search for an entity or a department**: type part of a name. The organigram keeps the matching units and the units above them.
* **Entity**: select an entity to display only its branch, meaning the entity and the units below it. The workspace is then hidden.
* **Reset**: restores the full organigram.

A **Filtered view** label reminds you that some units are hidden.

### Include legal information

Turn on **Include legal information** to add a block under each entity: **Head office**, **Country**, **Registration**, **Legal representative**, **DPO**, **EU representative** and **Supervisory authority**. A piece of information that is not filled in the entity shows **Not provided**. The **EU representative** line appears only for an entity located outside the European Union, or without a country.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-41c03bff4d3af3188ee2564b077893bcf63fbb9a%2Fv3-improvements-org-units-1.png?alt=media" alt="Organigram with the filter bar and the legal information of the entities"><figcaption><p>The organigram, filtered on the entities, with the legal information</p></figcaption></figure>

Departments do not show this block. To fill in the information, edit the entity (see the section Create or edit an entity above).

### Export the organigram

Click **Export**, choose **PDF file (.pdf)** or **HTML file (.html)** in the **Export the organigram** window, then click **Download file**. The file contains the organigram as currently filtered, with the legal information if you turned it on, fully unfolded. It shows the workspace name, the date and the active filters at the top. The PDF is a single landscape page, scaled to fit.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-3a834a5ca7b4bac31f490817c6542acf6c9cb3e6%2Fv3-improvements-org-units-2.png?alt=media" alt="Export the organigram window with the PDF and HTML formats"><figcaption><p>The export window of the organigram</p></figcaption></figure>

{% hint style="info" %}
The **Export** button is available if you have the right to manage users.
{% endhint %}

## Restrict access to the content of an organizational unit

You can use teams of users to restrict access to the content attached to an organizational unit. To do so, attach teams to the unit: in the three-dot menu, click **Set permissions for** and add the authorized users or teams.

By default, a child unit inherits the permissions of its parent unit. As soon as you add permissions to the child unit, they replace the inherited ones.

### Restricted access to a child entity only

You can add a user or a team **only to a child entity**, without giving them access to the parent entities. They then have access **exclusively to the data of that entity**, neither to the parent entities nor to the sibling entities.

This mode is useful to delegate the management of a subsidiary or a department to local users without exposing group data. To configure it, open the permissions of the entity and add the user or team directly to that entity, without attaching them to the parent entity.

{% hint style="info" %}
Unlike the standard mode, restricted access to a child entity does not give access to the data of the parent entities.
{% endhint %}

## Go further

{% content-ref url="/pages/K2payr8yY4dmFV4G8nR2" %}
[Create and assign teams](https://doc.dastra.eu/en/getting-started/setup/teams.md)
{% endcontent-ref %}


---

# 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://doc.dastra.eu/en/getting-started/setup/organizational-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.
