> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/administration-and-setup/settings/document-processing/module/barcode-assignment.md).

# Barcode Assignment

### Overview

The **Barcode Assignment** setting adds a barcode tool to the **document validation screen**. It reads the barcodes and QR codes DocBits found in a document and lets you **assign their values to the document’s fields** — for example, filling a purchase-order, reference or delivery-note number from a barcode instead of typing it.

This setting is **disabled by default**.

### What You Get When You Enable It

Once the setting is on, a new **barcode button** (a QR-code icon) appears in the toolbar on the right-hand side of the **validation screen** (`/field_validation_v1/…`). This is the entry point to the whole feature — without the setting, the icon is hidden.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-2f93b38fce45853d6764556fb9b59948dffa0d94%2Fbarcode_assignment_validation_icon.png?alt=media" alt="The barcode (QR-code) icon in the validation toolbar"><figcaption><p>When the setting is enabled, the barcode icon appears in the validation toolbar.</p></figcaption></figure>

Here is the icon in context on the validation screen, next to the document being reviewed:

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-89b8158f68fe7442056c666f3f53b7229d55b8cd%2Fs150-barcode_assignment_validation_screen.png?alt=media" alt="English validation view of a fictional invoice with a barcode and QR code."><figcaption><p>English validation view of a fictional invoice with a barcode and QR code.</p></figcaption></figure>

### How Barcodes Are Read

DocBits detects the barcodes during document processing and offers their decoded values for assignment. A single document can carry several barcode types — for instance a **QR code**, a **Code 128** and an **EAN-13** — each encoding a different value such as a purchase order, an invoice number or a supplier GLN.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-07384d4687fb93fc9475df3a0c3f82f20a2c3cdd%2Fbarcode_assignment_demo_invoice.png?alt=media" alt="Demo invoice carrying several barcode types"><figcaption><p>Example DocBits demo invoice carrying three barcode types (QR code → purchase order, Code 128 → invoice number, EAN-13 → supplier GLN), each encoding a value you can map to a field.</p></figcaption></figure>

{% hint style="info" %}
Which barcode types are detected is controlled by the **Bar-Code / QR Code Extraction** setting (`Barcode Extraction Types`). If the dialog shows *“no barcodes extracted found”*, make sure barcode extraction is enabled and that the expected types (e.g. `QRCODE`, `CODE128`, `EAN13`) are selected. See [Bar-Code / QR Code Extraction](/administration-and-setup/settings/document-processing/module/bar-code-qr-code-extraction.md).
{% endhint %}

### Using the Barcode Assignment Dialog

1. Open a document on the **validation screen**.
2. Click the **barcode icon** in the right-hand toolbar.
3. The **Barcode Assignment** dialog lists every barcode DocBits detected in the document, shown as `Barcode <n> : <value>`.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-9ef1873964cd313768a5c51c10eb93d800cfa3cd%2Fs150-barcode_assignment_dialog.png?alt=media" alt="Map extracted barcodes to document fields."><figcaption><p>Map extracted barcodes to document fields.</p></figcaption></figure>

4. For each barcode, open its dropdown and pick the field the value should go into.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-66e9e2ab5aeeb7ff50c8ae50b533cde5e5bf9554%2Fs150-barcode_assignment_field_options.png?alt=media" alt="Available document fields in the barcode mapping dialog."><figcaption><p>Available document fields in the barcode mapping dialog.</p></figcaption></figure>

5. As soon as you select a field, that field is filled with the barcode’s value.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-2eb9c8d7b353535eef1961336f406bf5c2e1e4d4%2Fs150-barcode_assignment_field_mapped.png?alt=media" alt="Unsaved barcode mapping to the Purchase Order field."><figcaption><p>Unsaved barcode mapping to the Purchase Order field.</p></figcaption></figure>

### How to Enable

1. Go to **Settings**.
2. Select **Document Processing**.
3. Select **Module**.
4. Open the **Document Type** section.
5. Find **Barcode Assignment** and switch the toggle on.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-28b8d5d722cb988a4d56d03c085ebc785342dce0%2Fbarcode_assignment_toggle.png?alt=media" alt="Barcode Assignment toggle"><figcaption><p>The Barcode Assignment toggle in Settings → Document Processing → Module.</p></figcaption></figure>

### Benefits

* **Faster, error-free entry**: Take values straight from a barcode instead of reading and typing them by hand.
* **Fewer typos**: A scanned value is exactly what is encoded in the barcode.
* **Stays in control**: You decide which barcode goes into which field during validation.

### When to Use This Feature

* **Documents with barcodes**: When your documents carry barcodes/QR codes whose values belong in specific fields (e.g. order or reference numbers).
* **Manual validation workflows**: When a person reviews documents and wants to fill fields quickly from barcodes.
* **Leave it off** if your documents have no usable barcodes, or if you only need automatic barcode/QR **extraction** — see [Bar-Code / QR Code Extraction](/administration-and-setup/settings/document-processing/module/bar-code-qr-code-extraction.md).

{% hint style="info" %}
**This feature is for reading a barcode/QR value and assigning it to a field during validation.** Automatically extracting structured data from payment codes (such as Swiss QR Bill or GiroCode) — and splitting a multi-page file at barcode separator pages — are handled by a **different** setting: [Bar-Code / QR Code Extraction](/administration-and-setup/settings/document-processing/module/bar-code-qr-code-extraction.md).
{% endhint %}


---

# 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.docbits.com/administration-and-setup/settings/document-processing/module/barcode-assignment.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.
