> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inboxmate.psquared.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Documents (Beta)

> How InboxMate's beta Document Intelligence feature OCRs invoices and receipts arriving by email into structured, searchable records.

<Warning>
  Document Intelligence is in **beta** and enabled per account. If you don't see **Dokumente** in the sidebar, it isn't switched on for your workspace yet — reach out to enable it.
</Warning>

**Dokumente** turns invoice-like attachments arriving in your mailboxes into structured records automatically: no manual data entry, no forwarding to accounting software just to read a number off a PDF.

## What it extracts

When a categorizer runs document extraction on an incoming attachment (PDF or image — scanned or phone-photographed), InboxMate:

1. OCRs it via Azure Document Intelligence
2. Classifies the document type: **Rechnung**, **Beleg**, **Auftragsbestätigung**, **Lieferschein**, **Angebot**, **Gutschrift**, or **Sonstiges**
3. Structures the key fields out of the OCR text — sender company/name, VAT ID, invoice number, PO number, gross amount, currency, document date, due date, IBAN — each with a confidence score

The same file is only ever processed once per account: if the identical attachment arrives again, InboxMate reuses the stored result instead of re-running OCR and re-billing for it.

## Saving to Dokumente

Extraction and filing are two separate categorizer actions you configure on a category:

* **Extract document** (`extract_document`) — OCRs and structures the attachment so its fields can enrich a downstream action, like a reply draft or a support ticket. It doesn't file anything into the Dokumente collection by itself.
* **In Dokumente speichern** (`save_to_page`) — files the thread's attachment into the **Dokumente** collection. By default it extracts first (so the row has structured fields); if extraction hasn't run, it can also file the attachment as-is.

## The Dokumente page

Filter the list by **Postfach** (when you have more than one mailbox), **Dokumententyp**, **Status**, free-text search on filename or invoice number, and a **Nur abgelegte** checkbox to show only documents explicitly saved to the page.

Each row shows the filename (and invoice number, if found), type, sender, amount, date, and status:

| Status (German label) | Meaning                                                                    |
| --------------------- | -------------------------------------------------------------------------- |
| **Ausgelesen**        | Extracted, not yet reviewed                                                |
| **Prüfen**            | Extracted, but at least one field has low confidence and should be checked |
| **Bestätigt**         | An operator reviewed and confirmed the fields as correct                   |
| **Korrigiert**        | An operator corrected one or more fields                                   |
| **Fehlgeschlagen**    | Extraction failed                                                          |

Click a row to open the detail view: a preview of the original PDF/image next to the editable fields, each showing its extraction confidence. Fix anything that's wrong and click **Korrektur speichern**, or click **Bestätigen** to mark the extraction as verified without changes.

## EU-only data and Document Intelligence

If your workspace has **Datenschutz & Verarbeitungsstandort → Nur EU-Rechenzentren** enabled, document extraction stays paused until we've explicitly confirmed the OCR service itself runs in an EU region — separate from (and in addition to) the EU routing already in place for AI models. Until that confirmation, EU-only accounts won't get extraction results even with the beta enabled; the LLM structuring step is EU-routed the same way as everywhere else in InboxMate, but the OCR step needs its own explicit sign-off. If you're on EU-only routing and want Document Intelligence, let us know and we'll confirm the OCR region for your account before turning it on.
