Review and export
Target schemas and mappings
Decide the shape of the records you want out of your documents with target schemas, connect each document type to one with a mapping, and rebuild records.
D2Transform reads your documents and turns them into final records you can review and export. Three pieces of setup decide what those records look like.
| Piece | What it says | Example |
|---|---|---|
| Document type | What is read from a kind of document | An invoice: bill number, date, seller, total, line items |
| Target schema | The shape of the records you want out | Your "Purchase" record with the columns your accounting system expects |
| Mapping | How the values read from one document type fill the fields of one target schema | Invoice "total" goes into Purchase "amount" |
You find all three in the side menu, under Setup: Document types, Target schemas and Mappings.
Who can set this up
- Manage document types is needed for Document types.
- Manage target schemas and mappings is needed for Target schemas and Mappings.
Owners and Admins have both by default. See Team members, roles and permissions to give them to someone else.
Catalog document types come ready to use
The quickest start is a document type from the catalog. On Document types, choose Browse catalog, then Enable on the type you need.
A catalog type comes with its standard output: a target schema and a mapping that are made for it. Its documents become records straight away, with no setup.
- In Mappings, a catalog mapping is marked Catalog standard.
- You can edit the standard mapping. When you save changes, it becomes your own and catalog updates no longer change it.
- To change the fields that are read for a catalog type, use Make a custom copy on the document type. The copy is yours to edit, does not receive catalog updates and counts toward your plan's custom types. Its mapping is copied too.
- Every document type also maps its fields to shared fields used by all document types, such as
person.full_name,finance.total_amountorhealthcare.test_result, so records from different documents line up in the API (mapped). The Shared field mapping card on the document type shows each choice and who made it; you can change it, reset it, or use Suggest with AI for fields left unmapped. Suggestions are only saved when you accept them and choose Save mapping. - In a custom type, Add from dictionary copies ready-made fields (names, dates, amounts, ID numbers, test results and many more) with the labels they are printed under in several languages. Under More settings a field can have a group heading, a sensitivity label, the options of a Choice field, and rules such as a pattern or the highest value allowed. A value that breaks a rule is kept as written and sent to review.
Plan limits on custom document types
Your plan sets how many custom document types your organization can have. Types enabled from the catalog do not count. Document types shows how many you use, for example "2 of 5 custom types".
When the limit is reached you see: "Your plan's limit for custom document types is reached. Enable a type from the catalog, or delete a custom type you no longer use." Current limits for each plan are on the pricing page.
Create or edit a target schema
Open Target schemas
Choose Target schemas in the side menu, then New target schema. To change an existing one, open it from the list.
Name it
Enter a Name and, if you like, a Description.
Add the fields
Choose Add field for each column of your record. Give each one a Key (lowercase letters, digits and _, starting with a letter), a Label and a Type, and tick Required if every record must have it.
Save
Choose Create for a new target schema, or Save as new version for an existing one.
Field types are Text (short), Text (long), Number, Amount, Date, Yes / No and Table (rows). A table holds a list of rows, such as line items or transactions, with its own Columns. Format is optional: for a date, iso or bs; for an amount, the number of decimals.
Create a mapping
When a document type has no mapping yet, its page shows: "No mapping yet: documents of this type are read, but no records are built." Its documents wait until a mapping exists.
Open Mappings
Choose Mappings in the side menu. Each document type is listed with its target schema, or Not mapped.
Open the document type
Choose Create mapping for a type without a mapping, or Edit mapping to change one. You can also choose Create mapping on the document type's page.
Choose the target schema
Under Target schema, choose the schema these documents should fill. If the mapping has no rules for it yet, they are pre-filled from matching names and types. Suggest mappings fills them in again at any time.
Check each field
Each target field shows its Source expression: the key of an extracted field (listed under Extracted fields), a quoted fixed value, or parts joined with +. Add Transforms such as Trim, Nepali → Latin digits or BS → AD if a value needs changing, and a Default for when nothing was read.
Preview
Under Live preview, choose a Sample document and choose Preview to see the records it would make and any validation errors.
Save
Choose Save mapping (new version). Each save is a new mapping version.
If documents were waiting for this mapping, the page tells you how many. Choose Build records now to make their records.
Rebuild final records after a change
A changed mapping applies to new documents straight away. To apply it to documents you already have, open the mapping and choose Rebuild final records for all followed by the number of documents.
- Pages are not read again, so rebuilding uses no new pages.
- Records that are not yet approved are rebuilt, and corrections made in review are applied again.
- Approved and exported records stay as they are.
After a rebuild, check Review for records that need a person. See Review and correct data.
Was this article helpful?
Your answer stays in this browser; nothing is sent unless you email us.
Related articles
- Document processing and statusesWhat each document status means, what happens after you upload, and how to retry a document that did not finish.
- Review and correct dataCheck values against the original page, correct them, fix table rows such as line items, then approve or reject the record.
- Export dataDownload your records as CSV, Excel or JSON, choose which records and columns to include, or send records and document updates by webhook to your system, Slack, Make, Zapier or n8n.
- Team members, roles and permissionsInvite people to your organization, choose their role, create custom roles, give one person extra or fewer permissions, and disable or remove members.
- Usage and billingHow D2Transform plans work: included pages, organization users, storage, the Free plan, extra pages, annual billing, and how to pay, renew, change or cancel.