Document schemas
A document schema lists the fields the extract step reads from one type of document, such as a pay stub, a bank statement or a W-2.
Build schemas under Extract in the app.
What a schema contains
Each field has a name and a type. A description, synonyms and a required mark are optional.
| Type | For |
|---|---|
| text, number, date | Single values. |
| select | One of a fixed set of options. |
| yesno | A yes or no as printed or ticked. |
| object | A group of nested fields. |
| list | Repeating rows or values, such as the lines of a statement. |
Synonyms are other labels the same field goes by on real paper, such as "statement date" and "date of issue".
A required field that a page does not state is recorded as not stated. That is distinct from unread and from zero. Example: a required ending balance missing from a bank statement is not stated, not $0.00. A document longer than one read (about 100,000 tokens) is read up to it, and a field not found there is not in the part read.
Versions, and the default
Schemas are versioned. A version is a draft until activated, and frozen once active.
A document type with no schema of its own is read with the organization's default schema.
A document no requirement fits is read with the schema of its kind, when that kind has one. Example: a pay stub the list does not ask for is still read with the Pay stub schema.
Why this lives in Sheaf
A schema is saved in your organization under the name of its document type. A request never carries a schema. What your team learns about reading a document accumulates in Sheaf, not in integration code.
Sheaf