> For the complete documentation index, see [llms.txt](https://docs.solutioo.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.solutioo.de/datanorm-item-import/datanorm_en_us/part-lists-sets/nested-and-optional-lines.md).

# Nested and Optional Lines

Sets inside sets, and how optional lines are handled.

## Nested sets

A set line can itself be a set. DATANORM expresses that through the **component set number**: when it is filled, the line points not at a single article but at another set.

The app resolves the reference to the item of the subordinate set and adds it as a component to the BOM. The result is a multi-level structure:

```
Complete shower set
├── Shower tray
├── Waste fitting
└── Mounting set  (subordinate set)
    ├── Support frame
    └── Fixing material
```

{% hint style="info" %}
Business Central resolves multi-level assembly BOMs on its own during assembly. The supplier's structure is therefore preserved rather than flattened into a single list.
{% endhint %}

## Prerequisite

For a nested set to be resolved, the item of the subordinate set must exist. When it comes in the same delivery, synchronising article staging completely before building the part lists is enough.

If the item is missing, the line is skipped and logged. Add it and run **Build Part Lists** again.

## Protection against circular references

If a set references itself directly or indirectly, resolving it would produce an infinitely deep BOM. The app detects this and skips the affected set with a message instead of running into an endless resolution.

## Optional lines

The **calling flag** of a set line states whether it is a fixed part of the set or selected by the user.

<table><thead><tr><th width="150">Calling flag</th><th width="270">Meaning</th><th>Behaviour of the app</th></tr></thead><tbody><tr><td><strong>1, 3</strong></td><td>inserted automatically</td><td>always taken as a component</td></tr><tr><td><strong>2, 4</strong></td><td>optional line</td><td>only with <strong>Include Optional Set Lines</strong> enabled</td></tr></tbody></table>

### Which setting fits?

<table><thead><tr><th width="290">Situation</th><th>Recommendation</th></tr></thead><tbody><tr><td>The set should reflect the standard scope of supply.</td><td><strong>Include Optional Set Lines</strong> off. The BOM then contains only what is always included.</td></tr><tr><td>You want to see every possible line and remove some on the order.</td><td><strong>Include Optional Set Lines</strong> on, and adjust the BOM on the order.</td></tr><tr><td>You need real variant configuration.</td><td>Not part of the app. Model the variants as items and BOMs of your own, see <a href="https://docs.solutioo.de/datanorm-item-import/datanorm_en_us/importing-datanorm-files/limitations.md">Limitations</a>.</td></tr></tbody></table>

{% hint style="warning" %}
The setting takes effect when the BOM is **built**, not when the file is read. If you change it, run **Build Part Lists** again – the file does not need to be re-imported.
{% endhint %}

## Quantity 0

Optional lines often have a quantity of 0 because the user decides the amount. A BOM line however needs a positive quantity, so the app uses **1**. Adjust the quantity in the BOM or on the assembly order.


---

# 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://docs.solutioo.de/datanorm-item-import/datanorm_en_us/part-lists-sets/nested-and-optional-lines.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.
