LumiParser

Guides

Post Processing

Post Processing lets you transform extracted data after the AI has finished parsing. You can use Lookup Tables to enrich values or write Custom JavaScript to apply business logic.

Lookup Tables

Lookup Tables let you match an extracted value against a reference dataset and replace or enrich it. A common use case is mapping a vendor name extracted from a document to an internal vendor ID from your ERP system.

Pro feature

Lookup Tables are available on Pro plans and above.

Lookup Rules

A Lookup Rule defines which field to look up and how to handle the match:

  • Source field — the extracted field whose value you want to look up
  • Lookup file — the CSV file containing your reference data
  • Match column — which column in the CSV to match against
  • Output column — which column value to write back to your extracted data
  • Target field — where to store the matched value

Lookup Files

Upload CSV files to use as lookup tables. Each file can have any number of columns. Files are versioned — uploading a new file replaces the old one without breaking existing rules.

Custom Code

For transformations that go beyond lookups, Custom Code lets you write JavaScript that runs after every parse. Your code receives the extracted data and can modify any field before the result is stored.

Pro feature

Custom Code is available on Pro plans and above.

The data object

Your code runs in a sandbox with access to the data object, which contains all extracted field values keyed by field name:

// data is the extracted result from LumiParser
// Modify it in place — your changes are saved.

if (data.vendor_name === 'Acme Corp') {
  data.vendor_id = 'ACME-001';
}

if (data.total_amount > 10000) {
  data.requires_approval = true;
}

Available utilities

  • _ — Lodash utility library
  • moment — Date parsing and formatting
  • numeral — Number formatting
  • axios — HTTP requests to external APIs
  • console.log() — Output visible in the sandbox

Was this helpful?