> For the complete documentation index, see [llms.txt](https://typless.gitbook.io/typlessapi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://typless.gitbook.io/typlessapi/typless-hub/document-type.md).

# Document type

Explanation of Typless platform UI

Typless hub is made for managing your document types, models, getting your invoices, manually training the models, and much more.\
Here we will take a look at how you can manage your document types. Creating, editing and deleting document types is available to users with the **Tenant Admin** role.

## New document type

You can create a new document type by clicking on the ***New document type*** button above the list of document types.

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-d17a13e31a2be42f9dadd445c2c2678271a267d2%2Fimage.png?alt=media" alt=""><figcaption><p>Creating new document type</p></figcaption></figure>

## Model type

After clicking on the ***New document type*** button, you will be prompted to select the model type: ***Pretrained model*** extracts data immediately, ***Trainable model*** learns from your own documents. You can read more about the model types in [Model type](/typlessapi/typless/document-type/model-type.md).

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-0af5baffe2e7677d93113d2bf0bc53018a55b42f%2Fimage.png?alt=media" alt=""><figcaption><p>Selecting model type</p></figcaption></figure>

## Method

After you select the model type, you will be greeted by the method for creating the new document type. You can either use a predefined template (***Use a Predefined Template***), build custom document type from scratch (***Build Custom Document Type***) or copy existing document type (***Copy Existing Document Type***). In case you select to create a document type from template, you are prompted to select the template:

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-26ca4720a51b8e5eba99c6dceb7b8632e70f741f%2Fimage.png?alt=media" alt=""><figcaption><p>Selecting the predefined template</p></figcaption></figure>

The templates depend on the model type:

* **Pretrained model**: ***Metadata invoice***, ***Line item invoice*** and ***Delivery note***. Every field comes with a preset and a tested description.
* **Trainable model**: ***Simple invoice***, ***Metadata invoice***, ***Vat invoice*** and ***Line item invoice***.

In case you select to create a document type from existing document type, you are prompted to select the document type. The new document type uses the model type you chose in the first step, even if the copied one uses the other:

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-615ad319aaccb0dcba0d031794bc7ced2a00107b%2Fimage.png?alt=media" alt=""><figcaption><p>Creating a new document type from existing</p></figcaption></figure>

## Creation

After choosing your settings, the wizard will either generate all the fields for you or leave everything empty in case you are creating a new document type.\
The form has these sections:

* ***Basic info***: the ***Name*** you use in API requests (letters, numbers, `-`, `_` and `/`; it can't be changed later), a ***Description*** of the documents (pretrained models) and an optional ***Retention period (days)*** that overrides the retention period of your profile for this document type.
* ***Metadata fields***: the fields to extract. Add a field with ***Add field***; each field has a ***Field name***, ***Data type***, an optional ***Preset***, the ***Multiple*** switch and, for pretrained models, a ***Description***. See [Extraction fields](/typlessapi/typless/extraction-fields.md) and [Descriptions and presets](/typlessapi/typless/document-type/descriptions-and-presets.md).
* ***Line item fields***: at least 3 fields for [line item extraction](/typlessapi/typless/line-items-table-extraction.md), if your subscription includes it.
* ***Plugins***: optional [VAT rate extraction](/typlessapi/typless/plugins/vat-rate-plugin.md).

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-8b9184375aa2adea231e848228a3e1186b8beb42%2Fimage.png?alt=media" alt=""><figcaption><p>Form for creating a new document type</p></figcaption></figure>

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-5f64ebad9656229136075fe8b1a9adcf14b6b6c4%2Fdocument-type-01-field-editor.png?alt=media" alt=""><figcaption><p>Editing a field of a pretrained document type</p></figcaption></figure>

## Management

The **Document type view** gives you options to interact with existing document types. You can check the document type name, its model type (***Pretrained*** or ***Trainable***) and training status. Pretrained document types show ***Training not required***. You can train the document type in the training room or use one of the defined actions to change the properties of the document type.

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-d29f5572022ca4a74195733f4ed64e921255d1b5%2Fimage.png?alt=media" alt=""><figcaption><p>Management of document type</p></figcaption></figure>

## Actions

### History

In the **History view**, you can view past extractions for that document type. Open an extraction to see the document next to its extracted values; the switch at the top toggles between the extracted data and the confirmed data, if the document was confirmed.

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-948d3c606ec86effcd909acaac6f42642bfa8a92%2Fimage.png?alt=media" alt=""><figcaption><p>History view</p></figcaption></figure>

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-a65f4b1cddcbb2a3f4cbf16e1c29fdf0552a25f2%2Fdocument-type-04-history-details.png?alt=media" alt=""><figcaption><p>Details of an extraction</p></figcaption></figure>

Line items appear in a resizable ***Line items*** panel under the document.

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-297c32d18a06e4ddac3f923b0eb404b58beef98d%2Fdocument-type-05-line-items-panel.png?alt=media" alt=""><figcaption><p>Extracted line items</p></figcaption></figure>

### Training room

In the **Training room**, you can train documents for your document type and perform test extractions to quickly see results. Each document type has its own training room. Data you confirm here as the correct solution will be used to train your document type.

Upload your own document by drag and drop or pick one of the example documents. Typless extracts the data, and you can correct the values, click a text block on the document to copy its text, and edit, insert or delete line item rows in the ***Line items*** panel before you confirm. For pretrained document types, confirming a document creates its [supplier](/typlessapi/typless/suppliers.md).

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-766be16121cc25e5a9a6d7917cf7946dfd6b0e29%2Fimage.png?alt=media" alt=""><figcaption><p>Training room view</p></figcaption></figure>

### Train models

You can trigger the training process on the [Document types page](https://app.typless.com). Look for your document type in the list, open its actions menu and click ***Train models***. This will change the model status to ***Models in training*** if there are any new documents to train from. Pretrained document types don't need training.

### Models

You can list all your supplier models in the document type and check their confidence score. You can manually trigger the training for a specific supplier, lock it, view its dataset, edit the supplier description of a pretrained model or delete the specific supplier model. See [Managing models](/typlessapi/typless/training/managing-models.md).

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-5ba0ef3d4b6fd9a5b6b176763ac3b988a0a1fedb%2Fimage.png?alt=media" alt=""><figcaption><p>List models view</p></figcaption></figure>

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-5d459b177cc293c7f9a934fd74387a4292f2ba4f%2Fdocument-type-02-model-actions.png?alt=media" alt=""><figcaption><p>Actions of a supplier model</p></figcaption></figure>

#### Edit

If you want to extract additional data from your documents, you can add your fields here. You can add metadata and line item fields, **but you cannot delete existing fields or change their name or data type.** You can change the description and preset of existing fields, the document type description and the retention period. See [Extending and Editing](/typlessapi/typless/document-type/extending-and-editing.md).

<figure><img src="https://2174127710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePXqOCeLb4FOuZhmYG8X%2Fuploads%2Fgit-blob-ea4adc7896c1ecc5be9ad2eb9e332d4622440362%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Delete

You can always delete your document type. Its dataset, models, history and the webhooks set up for it are deleted with it.
