Lookup Tables
Match and enrich data with lookup tables
Lookup Tables
Lookup tables let you match extracted data (e.g. vendor names) to reference information (e.g. vendor IDs) from a CSV file. This is useful when you need to add IDs, codes, or other information that isn't in the original document.
What are lookup tables?
A lookup table is a CSV file with reference data. You upload it, then create rules that match extracted fields to columns in the file. When a match is found, DigiParser fills in the value from another column.
Example: You extract "Vendor Name" from invoices, and you have a CSV with vendor names and their IDs. A lookup rule can match the name and automatically add the "Vendor ID" to your extracted data.
How it works
- Upload a CSV file with your reference data (e.g. vendor names and IDs)
- Create a lookup rule that matches an extracted field (e.g. "Vendor Name") to a column in your CSV
- Set which column to use for the output (e.g. "Vendor ID")
- When documents are processed, DigiParser matches values and fills in the output field
Lookup rules work on the flattened output of your parser:
- Document fields (like
vendor_name,invoice_number) are simple key/value pairs. - Table fields (like
line_items) are arrays of rows, each row being an object with columns (e.g.line_items[0].description,line_items[0].quantity).
You can use lookup rules for both:
- Document-level enrichment (fill a single field on the document)
- Table-level enrichment (fill a field on each row in a table)
Setting up lookup tables
Upload a lookup file
- Go to Settings → Post Processing.
- Click the Lookups tab.
- Click Upload Lookup File.
- Choose a CSV file with your reference data (e.g. vendor names, IDs, codes).
- The file is uploaded and its columns are detected.
Create a lookup rule
- In Post Processing → Lookups, click Add Lookup Rule.
- Select a lookup file (the CSV you uploaded).
- Set match conditions: Choose one or more extracted fields and match them to columns in your CSV.
- Choose match type – See Match types below.
- Set output: Choose which column from the CSV to use and which field to fill.
- Click Save.
Match types
When creating a lookup rule, you choose how extracted values are matched to rows in your CSV:
- Exact – Values must be the same (case and extra spaces are ignored). Best for IDs, codes, or when values should match exactly.
- Fuzzy – Allows small typos and minor differences. Use when human-entered text may vary slightly (e.g. "Acme Inc" vs "acme inc.", "P G PACKING LTD" vs "P G PACKING LTD.").
- AI (semantic) – Uses AI to pick the most likely candidate when exact and fuzzy are not enough. Slower and may send field values to the AI provider. Use sparingly for hard cases (acronyms, alternate names).
Document vs table lookups
Lookup rules support two modes:
- Document lookups – Output goes to a document field (for example,
vendor_id).- The rule runs once per document.
- Match conditions use document fields only (like
vendor_name).
- Table (line item) lookups – Output goes to a table field (for example,
line_items.product_id).- The rule runs once per row in that table.
- Match conditions can use:
- Document fields (same for all rows), and
- Columns from that table (for example,
line_items.sku,line_items.description).
When you select a table column as Output To (e.g. line_items.product_id), DigiParser will:
- Run the lookup for each row in the
line_itemstable. - Use the match conditions to find a CSV row for that table row.
- Write the output column (e.g.
product_id) back into that same row.
Example use cases
- Match vendor names to IDs – Extract vendor name, lookup adds vendor ID
- Add category codes – Extract expense description, lookup adds category code
- Enrich with account numbers – Extract client name, lookup adds account number
- Enrich line items with product IDs – Extract
line_items.skuand use a lookup table to addline_items.product_idper row - Add vendor-specific codes per line item – Match on
vendor_name+line_items.skuand fillline_items.vendor_specific_code
Tips
- Use clear column names in your CSV (e.g. "Vendor Name", "Vendor ID")
- Test with a few documents to make sure matching works correctly
- Keep CSV files updated – If reference data changes, upload a new version
Next steps
- Data Transformations – Use pre-built transformations
- Custom Code – Write custom transformation code
How is this guide?