Guides
Extraction Templates
Define custom schemas for extracting structured data from your documents.
Extraction Templates
Templates define the fields you want to extract from a document type. DokuBrain includes 12+ built-in templates, and you can create custom ones for any document type.
Built-in templates
DokuBrain ships with templates for common document types. Use them directly by referencing their ID:
| Template ID | Document type | Key fields |
|---|---|---|
invoice | Invoices | vendor, number, date, amounts, line items |
contract | Contracts | parties, dates, clauses, obligations |
receipt | Receipts | merchant, date, total, items |
bank_statement | Bank statements | account, period, balance, transactions |
tax_return | Tax returns | filer, year, income, deductions |
pay_stub | Pay stubs | employee, employer, earnings, deductions |
employment_letter | Employment letters | employee, position, salary, dates |
nda | NDAs | parties, term, scope, exceptions |
purchase_order | Purchase orders | buyer, seller, items, delivery |
insurance_policy | Insurance | policyholder, coverage, premium, limits |
utility_bill | Utility bills | provider, account, period, amount |
government_id | Government IDs | name, number, dates, issuer |
Creating a custom template
Define a custom extraction schema for your document type:
Field types
| Type | Description | Example |
|---|---|---|
string | Free-form text | "Acme Corp" |
number | Numeric value | 1250.00 |
date | Date value | "2026-03-15" |
boolean | True/false | true |
array | List of values | ["item1", "item2"] |
object | Nested fields | { "name": "...", "amount": 100 } |
Using custom templates
Once created, use your template ID when extracting: