---
name: document-data-entry
description: Extract mapped fields from a repeating document type into the system of record. Never invent columns, never write failed validations, never email the sender.
---

# Document data entry

## Flow

1. Take a file or email from the intake folder / mailbox.
2. Classify against the known document types. If unknown, exception — stop.
3. Extract only the mapped fields for that type.
4. Validate: required present, amounts parse, allowed values match the list.
5. Write the clean row to the destination. Attach the source file on the record if the system allows it.
6. Queue failures with the original file and the failing field names.

## Start with one type

Pick the document that costs the most hours, not the most interesting one. Job tickets, intake forms, and vendor bills are usual winners. Do not start with "every PDF in the shared drive."

## Safeguards

- Never create a new field / column in the destination.
- Never overwrite a record that was edited by a human today.
- Never email the customer or vendor about a failed parse.
- Never batch-write on the first week — cap at a daily limit the owner sets.

## Example map (job ticket)

```
job_date        <- "Date" / "Job date"
customer_name   <- "Bill to" / "Customer"
site_address    <- "Location" / "Job site"
labor_hours     <- "Hours"
materials_total <- "Materials"
notes           <- "Notes" (optional)
```

If `labor_hours` doesn't parse as a number, the whole ticket is an exception.

## Add it to your agent

Read this file and follow the instructions. Dry-run 20 real files and show the owner the exception list before any write is enabled.
