Formats

A format essentially defines what you want to get out of a certain type of document. It defines the structure of the output and is very visible in https://contractfit.atlassian.net/wiki/spaces/DA/pages/1355350129 of the Data Entry Companion.

 


Edit Formats

  • Add new format: Click on the blue round button on the top right corner. Type your new format name in the pop-out box and click confirm. This will automatically add a new entry in the formats table.

  • Remove format: Click on the red delete button beside the format that you want to remove.

  • Edit format: Click on the blue edit button beside the format that you want to edit.

     

 

 


Format Table

These fields have a number of properties.

Index

Property

Description

Default

1

Mandatory

You can indicate whether or not a field is required before a file can be submitted. Mandatory fields will be marked as red when not found and will block submission if not filled.

false

2

Field

Type in here the technical name of your fields. These names have to be identical to the field names that we support out-of-the-box (case-sensitive too). If we do not support the field yet, then no predictions will be made.

string

3

Annotation, Tag

  • Annotation: any value that can be directly found on the document

  • Tag: a label whose options you can insert in the data type column

  • Separator: a placeholder row to separate one group of fields from another

  • Computed: a value that is obtained through a formula that you can fill in in the data type column

annotation

4

Data type

Indicates in what format the fields should be saved

string

5

Scope

Indicates whether the scope is a page, a section or a document

section

6

Visible

Indicates whether a field is visible in the review page

true

7

Multiple

Indicates whether a field of interest can appear multiple times in the scope. If this is disabled, the machine will predict only one value for the field.

false

8

Count in evaluation

A flag to decide whether the specific field should be evaluated in the statistics. Setting this property on false enables some fields not to be taken into account in evaluations. This is useful for commentary and other optional fields.

true

9

Conditional

Some fields of interest are only relevant depending on the value of other fields of interest. For example, you may only be interested in the VAT number of an invoice if it has been confirmed that the document is a valid invoice (valid_invoice field == true).

none

10

Display name

This is the label that will be shown in the Front-End to the user of the data entry companion and in the stats pane. As opposed to the Field (2)(or technical field name), you can name the display name to a name that you think is more intuitive than the technical names of our out-of-the-box fields

same as value in Field (2)

11

Technical name

This is the label that will be used when communicating to servers.

 

12

Description

A short text to characterise the field of interest.

 

 

Scope (5) and the importance of page/subpage splitting

It is important to distinguish the different types of scope: file, document, page and sections.

  • A file is a container in which some data is stored. These can be a .pdf, .jpg, .eml, .zip and so on. The illustration above shows one file.

  • A document is a representation of information that can be understood by a human. Here, we talk about invoices, receipts, ID cards, and so on. Each file contains at least one document but can contain more than one. In the illustration above, this one file contains 3 documents: a contract, an invoice, and an ID card document.

  • A page is one side of a document. In the review pane, you can view one page at a time. Page splitting enables the classification of different formats within one file. Each file contains at least one page, and the same goes for documents. The illustration below has 4 pages (1 page of a contract, 2 pages of invoices, and 1 page of an identity card).

  • A section is a part of a bigger item: A file can be split into different documents (sections), and a page can be split into different subpages (sub-sections). Subpage splitting enables the detection of different sections within one page. Sections are encountered usually when smaller receipts or ID cards are processed. For example, the front and back side of ID cards are usually saved in one single page, or several receipts are usually grouped together in one single page. The illustration below shows that the fourth page is divided in 2 sections.

For fields in tables, there can only be one scope chosen per table.

 

Conditional (9)

It is possible to add logical AND/OR conditions for specific fields. Choose any field and click on “show” in the conditional column. On the pop-up screen you can add rules that condition the situation where your selected field will be shown. It is also possible to add groups to manipulate the AND and OR logic. In the illustration below, the condition would work as follows: The field of interest would only be relevant if

  1. The gross amount is not null, AND

  2. Either the amount payable or the net amount is not null.

 

 

Predefined data types

  • “currency”, “language”, “country”: Creating these “currency”, “language”, and “country” fields now will have standardised predictions with our pre-filled predictors such as “USD“, “EUR“, “GBP“, etc. for currency. This also means that annotating currency signs ($) in the Data Entry Companion for currency fields will be correctly formatted to “USD”.

  • date fields: These fields will return a formatted field under the format DD/MM/YYYY. So even if in the Review page, the date is formatted as DD/MM/YY, this field will be correctly reformatted as DD/MM/YYYY.

 


Tables

 

You may also want to create a section for tables.

This would be useful when you process documents with line items or receipt lines. For example: On your invoice you may have a table of all the articles you have bought (each article has its own article number, description, unit price, and quantity). This information is different from the header fields that would generally appear only once in a document, such as one invoice date per invoice.

As shown on the illustration above, you would have two distinct places for header fields and line items: the header fields come in the first part of your format table, right below “Metadata”, whereas the line item fields come in the second part, below the word “Table”.

There will only be one section “Metadata”, where you can enter all the header fields you require, but there can be one or more tables, where you can enter all the line item fields you require.

To add a table, simply click on the last row, which says “Table name”, and enter the name of the table.