Custom Schemas
When you need to read something from a document that is not in the system schemas, you define your own.
When It Makes Sense
- A document from a specific supplier with a non-standard layout.
- Industry specialties: weigh tickets, test reports, fuel cards.
- Fields that you need in your system and do not appear elsewhere.
Keep in mind that a document from a custom schema cannot be sent to accounting or exported to accounting formats — they read fixed fields of invoices. Only JSON, XML, YAML, CSV, Excel, and PDF remain. Only documents with the numerical field TotalAmount are counted in reports.
How to Define It
Using the editor in the Schemas tab. It is written in JSON Schema — an object with properties, each field having a type and description, arrays as array with items. Those familiar with the standard will not be surprised; those who are not can start from a template (invoice, VAT invoice, receipt, delivery note, minimum) or from a copy of the system schema.
Links, allOf, oneOf, conditions, and similar constructs are not allowed by the editor; the schema must be a flat tree of fields. A copy of the system schema carries its assignment for the model, thus recognizing it just as well as the template; the Detach button will turn it into a regular custom schema.
Field Description is Guidance for the Model
This is the most important thing on the entire page. The description serves not only for humans but is also read by the model. The difference between “order number” and “order number, starts with Z- and has six digits, usually located in the top right corner near the barcode” is enormous in terms of success.
Limits
The number of fields is governed by the plan: 80 on Free and Starter, 160 on Business, 240 on Scale. Nested fields and item fields are also counted. Names and descriptions are sent to the model with each document, so a longer schema means more expensive processing.
Testing
The editor continuously checks syntax and will not allow saving until the schema is correct. You can only test it on an actual document: upload it with the selected schema, or choose Process Again on an already completed document. Both take credits like regular processing.
Changes and Deletion
The modified schema applies to further processing. Documents that have already passed retain data as they were created. A schema that has recognized at least one document cannot be deleted — documents would lose their control form.