> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/data/data-mapping/data-item-linking.md).

# How items link across Duaer nodes

In Duaer, each output item includes metadata that links it to the input item (or items) that generated it, creating a chain you can follow backward.
Later nodes often use .item to read a field from an earlier step. An email may sit on the customer item while the current item is an order; linking tells the run which customer that order came from.

You need this when building programmatic nodes, or when the Code node creates new items.

## Automatic item linking <a href="#automatic-item-linking" id="automatic-item-linking"></a>

If a node does not control how to link inputs to outputs, Duaer tries to guess:

- Single input, single output: the output links to the input.
- Single input, multiple outputs: all outputs link to that input.
- Multiple inputs and outputs: if you keep input items but reorder or drop some, Duaer can usually add the correct links; if the counts match, it links in order.
- If the counts differ, or you create brand-new objects without linking info, Duaer cannot link automatically.

When Duaer cannot link items and the node does not handle linking, it shows an error. See [Item linking errors](/data/data-mapping/data-item-linking/item-linking-errors.md).
## Questions

### Which row does .item refer to?

In Duaer, the input item that belongs to the current output item, not always index 0. An expression follows that link back to a field on an earlier node.

### When does automatic linking work?

In Duaer, usually for one-to-one, one-to-many, same count with reorder, or a single incoming item. It does not when counts differ without clear linking info.

## Related

- [Fix item linking errors in Duaer](https://doc.duaer.com/data/data-mapping/data-item-linking/item-linking-errors.md)
- [Preserve linking in Duaer’s Code node](https://doc.duaer.com/data/data-mapping/data-item-linking/item-linking-code-node.md)
- [Understand Duaer’s data structure](https://doc.duaer.com/data/data-structure.md)

