Skip to main content

Table Lookup Rule

The Table Lookup preset matches a document's extracted fields against a lookup table and validates (or enriches) them from the matched record. It is the preferred, no-code way to answer questions like "is this a known vendor?", "does this invoice match an approved purchase order?", or "fill in the vendor's tax ID from our master list". It is a document-level validation rule that stays fully editable in the visual Rule Editor.

What a lookup table is​

A lookup table is a tenant-wide reference table: an easy-to-edit copy of an external list or database. Each record has typed columns. Common examples:

  • a vendor list (each record: name, address, tax ID, IBAN),
  • a purchase-order list (PO number, line item, quantity, price),
  • a budget/cost-code list.

You manage lookup tables and their records on the Lookup Tables page (Integrate > Lookup Tables). A single lookup table can be reused by many projects and many rules.

When to use it​

Use a table lookup instead of a script when you want to check extracted data against a maintained list and, optionally, pull reference values back into the document. Reach for a code rule only when the match needs logic the preset cannot express (custom scoring, conditional lookups, combining a lookup with other checks).

Creating the rule​

From the document's rules, add a Table Lookup rule and configure:

  1. Lookup table: which reference table to match against.
  2. Field to column mappings: one or more pairs, each tying an extracted field to a lookup table column, with a comparison mode (below).
  3. Confidence threshold: the minimum match score to accept a unique match (default 0.8).
  4. Reviewer permissions: what reviewers may do with the lookup table from the Viewer.

You can also ask the assistant to build it for you: describe the match in plain language ("match the supplier against the Vendors lookup table on tax ID, and fill in the address") and it configures the mapping and saves the rule to your draft.

Comparison modes​

Each field-to-column pair uses one mode:

ModeBehavior
ExactThe field value must equal the column value (after normalization) to match. Use for identifiers: PO numbers, tax IDs, SKUs.
FuzzyApproximate string match (handles spelling and spacing differences). Use for names and addresses.

| Filter | A hard exact constraint that narrows which lookup table records are even eligible before the other pairs match. Use for "match only within this scope". | | Get from table | The field is not used to search. Once a record is matched by the other pairs, this field's value is copied from the lookup table column. Use to enrich the document (fill the tax ID and address from the matched vendor). |

Normalization for text columns ignores case, punctuation, spacing and diacritics, so İzmir Lojistik A.Ş. in the lookup table is found by an OCR reading of Izmir Lojistik A.S. in exact mode, and a fuzzy score is not lowered by accents that OCR dropped or added. The value written back is always the lookup table's own spelling.

Exact vs Filter​

Exact and Filter both require an equal value, but they differ in intent:

  • Exact is a field you are verifying. If it doesn't match, the record still counts as a near miss and the rule reports a mismatch on that field.
  • Filter is a boundary you are matching inside of. Records whose filter column differs are removed from consideration entirely. If the document's filter value is empty, the lookup fails as "no match" (there is nothing to scope to). Filter also scopes the reviewer's manual lookup and add-record to that value, so a reviewer searching by hand only sees records within the same boundary.

A typical Filter use is "suppliers only for this receiving company", or "line items only under this purchase order".

Empty-value handling​

Two independent switches per pair (they do not apply to Filter pairs, which require non-empty values on both sides):

  • Allow empty value in document: if the document field is empty, exclude it from the search (the match proceeds on the other pairs). If a record is then found, the empty field is populated from the lookup table.
  • Allow empty value in lookup table: treat lookup table records whose column is empty as matching regardless of the document value (an empty column does not block the match).

Per-row (per line item) lookups​

If any mapping targets a repeating-group column (a table / line-item column), the rule automatically runs once per row of that table. No separate setting is required: the rule detects the per-row scope from the mapped columns.

Mappings in the same rule that point at non-table fields become shared constraints applied to every row. This is exactly what you want for matching invoice line items against a purchase-order lookup table: the PO number is a single document-level value shared across all lines, while each line's item code is matched per row.

Example: match each invoice line item to the PO Items lookup table:

Document FieldLookup Table ColumnMode
PO Numberpo_numberFilter
Line Items / Item Codeitem_codeExact
Line Items / DescriptiondescriptionGet from table
Line Items / Unit Priceunit_priceGet from table

Each row is matched against the lookup table within the document's PO number. On a match, the description and unit price are filled into that row's cells. An empty table (no rows) runs no lookups, so it raises no errors.

What reviewers see​

In the Transaction Viewer, each lookup produces one of:

  • Unique match: the rule passes. Fields mapped as Get from table are populated, and the engaged fields are auto-confirmed (if "confirm fields on success" is on).
  • No match: the rule raises an error. The failing field (or, for a per-row rule, the failing row's cells) is highlighted red, and a Look up a record action lets the reviewer search the lookup table by hand and apply a record.
  • Ambiguous: more than one record matched above the threshold; the reviewer picks the correct one.

When a reviewer applies a record by hand, the matched values populate the correct field (or the correct row's cells for a per-row rule), the rule re-runs immediately, and the error clears.

Reviewer permissions​

These control what a reviewer may do with the lookup table from the Viewer:

PermissionDefaultEffect
Manual lookupOnSearch the lookup table by hand and apply a record.
Add recordsOffCreate a new lookup table record from the Viewer.
Edit recordsOffEdit an existing record.
Delete recordsOffDelete a record.

Turn add / edit / delete on only when you want reviewers to curate lookup table data during review. A Filter mapping also scopes manual lookup and add-record to the filter's value.

Translating a lookup table for reviewers​

When documents arrive in a language your reviewers do not read (Chinese invoices checked by an English-speaking team), a lookup table of the same suppliers, in the same language, is just as hard to read. Its text columns can be machine-translated for them:

  1. On the Lookup Tables page, open the table and its Schema tab.
  2. In Edit Schema, switch Translate on for the columns to translate: names, addresses, cities. Identifiers such as tax IDs and IBANs need none. Translate is offered on text and text-list columns, and on the text fields of an object list.
  3. In the Translation section under the columns, Add language (up to five). Before anything starts, it says how many texts will be translated.

The translation runs in the background, on your organization's model for the Translate task, and its usage counts toward your organization's budget. After the first run only new and changed values are translated. The Translation section shows each language's progress. Translate again translates a language again on the current model, and the current translations stay in use until the new ones are complete. Removing a language deletes its translations. Changing the languages, the Translate switches and Translate again needs the permission to manage lookup tables.

Reviewers see the translations when the document shows translations (a Translate step translated its pages, or it has translated fields) and the lookup table is translated into the document's translation language:

  • The lookup dialog shows each record's translation under the original, and first in the Translated view. Hovering over a translation says it is a machine translation. The expanded record shows each value's translation beside it.
  • Searching finds records by their translation as well as by the original: type the first words of a name, or paste the field's translation. A record found by its translation has a chip naming the column and the language, such as Name · EN.
  • The validation panel shows the translated name under Matched and Closest, and each lookup table value's translation under it.
  • Picking a record fills in the original values, as always. A field marked Translate also takes the lookup table's translation of its new value, so no model is asked for one. When the rule matches a record itself, during processing or after an edit in the viewer, the fields whose value it changes take the lookup table's translation the same way, unless a person wrote the field's translation.

When the table is translated, but not into the document's language, the lookup dialog says so. A table with no languages, or a document with no translation, looks exactly as before.

The rule never uses translations: it compares the document's original values with the lookup table's original values. When the table is translated, but not into the language your project's Translate step translates into, the rule's form says so and publishing lists a warning. A copied lookup table keeps its translations. A project imported or copied from the library keeps the Translate switches but not the languages, so nothing is translated until someone adds one. Through the API: Translating a lookup table for reviewers.

Updating the lookup table automatically​

Reviewer permissions cover manual curation. If you want the workflow itself to keep the lookup table up to date (for example, register a vendor the first time a document arrives from it), add a Transform step. Its script can look records up through the lookup_table API (catalog, its old name, still works) and queue lookup_table.add_record / lookup_table.update_record / lookup_table.delete_record writes, which are applied when the script finishes successfully. A common pattern pairs the two: the table lookup rule flags documents whose vendor is unknown, and a Transform step later in the workflow registers the missing vendor.

When the table is a copy of data kept in another system (the vendor master in your ERP), keep it in step through the API instead: send the changes as one batch of upserts and deletes, or import the whole table in mode sync. Both match rows to records by your system's own key, so unchanged records keep their ids and only what changed is written. See Syncing a lookup table.

Tips​

  • Put identifiers on Exact, names on Fuzzy. IDs, PO numbers, and tax IDs should match exactly; vendor names and addresses vary, so use fuzzy.
  • Use Filter for a scope, not a check. If a value defines "which records are even eligible" (receiving company, PO number), make it a Filter, not an Exact.
  • Enrich with Get from table. Any field you want filled from the matched record (address, tax ID, unit price) goes on Get from table, not on the search.
  • Verify on a sample. After creating or editing the rule, re-validate a sample transaction and check the Viewer before publishing.

See also: Business Rules overview and Code Rules for logic-heavy matches the preset cannot express.