An extraction rule is a configuration that tells the platform what to extract from a specific kind of document. You create one per document type — supplier invoices, receipts, application forms, ID documents — each with its own field map.
Step-by-Step
- Open Architect Panel → Data Extraction → Rules and click New Rule.
- Upload a sample document to anchor on.
- Name the rule (e.g. “Standard supplier invoice”) and pick the target datastore.
- For each target field, define how to find it:
- Label nearby: Look for a label (“Invoice #”) and read the value to its right or below.
- Regex: Match a regex against the document text.
- Bounding box: Fixed coordinates (great for highly-standardised forms).
- ML model: Use a pre-trained model for the document type.
- Set the confidence threshold (e.g. 85%).
- Test against more sample documents. Tune rules until extraction is reliable.
- Publish.
Auto-Selecting a Rule
When a new document arrives, the platform identifies which rule to use:
- By upload context (e.g. uploads through the “supplier invoice” form always use the invoice rule).
- By sender (emails from a specific supplier use a supplier-specific rule).
- By document classification (ML classifier picks among defined rules).
Worked Examples
- Supplier-specific invoice rule: One per major supplier (each has a different layout). Falls back to a generic rule for unknown senders.
- Receipt rule: ML model trained on common receipt layouts; extracts merchant, date, total, line items.
- ID document rule: Bounding-box rule for standard passports — MRZ zone parsed, photo cropped, expiry validated.
- Form rule: Fixed bounding-box rule for an internal application form printed from your own template.