Auto Matching
Configure how incoming documents match master data such as customers or purchase orders. Match results appear on the document instead of looking up records manually.
Use Auto Matching to compare incoming documents to Master Data. When matching runs, the cockpit links document fields to reference records and can copy values back onto the document.
Open Configuration → Auto Matching in the side menu.
Prerequisites
Before you start, prepare the following:
A document type in Document Configuration with every primary-schema field used by matching or rewrites
A tested Master Data configuration for each source
The auto-matching supervisor and the matcher cloud functions required by your selected modes
Tenant environment settings that map the supervisor to those matcher functions
A post-parse workflow, such as a value stream, that invokes the supervisor
An AI agent and indexed RAG source when you use LLM
Ask the team that provisions your tenant to confirm the runtime functions and workflow. Completing the cockpit configuration does not trigger matching by itself.
Matching configurations
Configurations are grouped by document type in Document Configuration. Select a tab such as Non PO Invoice, Order, or PO Invoice. Each row shows the following:
Order – Same sequence as Execution order on Settings, with lower numbers first
ID – Configuration identifier
Name – Display name of the configuration
Sub-types – Selected sub-types, or All when the configuration is not limited
Master data – Identifier of the selected Master Data configuration
Status – Active (applied to incoming documents) or Draft (not applied)
Select New configuration to create one, or use a row's edit action to open Edit matching configuration. Use a row's move controls to reorder configurations; the new order is saved automatically. To remove an existing configuration, open it and select Delete.
Moving a row renumbers the configurations for that document type in steps of 10, starting at 10 (10, 20, ...). When you enter Execution order manually, use a unique positive whole number. If two configurations have the same value, runtime order falls back to configuration ID and does not express a business priority.

Creating a matching configuration
Set general details
On Settings, under General, provide a localized Name, Document type, and Execution order.
Use Applies to sub-types to limit the configuration to selected Sub-types. Leave Applies to sub-types empty to include all sub-types and documents that do not resolve to a sub-type.
When Applies to sub-types lists one or more values, the configuration runs only for a document whose resolved sub-type is one of those values. The supervisor resolves the sub-type once before the ordered configurations start. Later configurations in that run still follow that resolved sub-type, even after an earlier configuration rewrites it.

Choose the master data source
Under Master data source, set Master data type by selecting the Master Data configuration by name. Its source can be a custom entity or an Emporix core service. The configurations list shows the stored master-data configuration ID.
Set Master data ID field only when this configuration contains a Line item step with Single parent record (by id). It identifies the document field from which that step reads the parent record ID. Leave it empty for header-only, Search across records, Standalone master data record, and cloud-function-only configurations. A header Rewrite field, not Master data ID field, controls where a matched header record ID is stored.
Under Behavior, leave Active off while you build and review the configuration.
Build the matching pipeline
Open Pipeline. Select Add step, then configure the step for this job:
Scope – Header or Line item.
Match mode – How fields are compared. See Match modes.
Match fields – Document fields paired with master data fields.
Rewrite fields – Optional mappings that copy matched values back onto the document.
Steps run from top to bottom. A header step that matches ends the remaining header steps. Line-item steps continue for unmatched rows until every line is matched or the pipeline ends.



For Line item scope, also choose Record lookup:
Single parent record (by id) – Loads one parent from Master data ID field.
Search across records – Queries master data across many records.
Standalone master data record – Matches every document row to its own record, such as a Product. It needs no parent ID or nested master data array.

Select the document line array (Line items in the standalone example, bound to lineItems) before adding line-item mappings. For Single parent record (by id) and Search across records, also select the Master data array field. The item-level fields become available after you set the required arrays.
Choose the lookup from the master-data shape:
Use Single parent record (by id) when a document field identifies one record such as a purchase order whose
linesarray contains every candidate.Use Search across records when several parent records each contain a candidate array such as
lines, and there is no parent ID on the document.Use Standalone master data record when each document row matches one top-level record such as
{ "id": "product-1", "code": "SKU-1" }.
Add more steps in the same configuration as fallbacks for the same job. Header steps stop after the first match. Line-item steps stop separately for each row: later steps receive only rows that remain unmatched.


Save the configuration
Leave Active off and select Save when you want to store the configuration as Draft for later review. When it is ready, turn Active on and save again. If you have already reviewed the complete configuration, you can turn Active on before the first save. Auto matching has no separate deployment or editor test step.
Validate it in a controlled tenant with a representative new incoming document and review the Auto matching results. If the outcome is wrong, turn Active off and save before processing more documents.
Deactivation does not undo rewrites on documents already processed. Correct or discard the test document according to your tenant's operating procedure, update the configuration, and use a new document for the next test. Saving a configuration does not rerun matching on existing documents, and the cockpit has no built-in rerun action.
Typical setup
Use two configurations when one job depends on another, such as matching a header customer and then the lines. Extra steps inside one configuration are fallbacks for the same job, not a second configuration.
A typical header-then-line setup uses two Active configurations. The one with the lower Order runs first, and a later configuration can use values rewritten by an earlier one.
In the list example, Customer (order 10) matches the document header and rewrites the parent ID onto a path such as header.customer.id. The Line item match (order 20) pipeline uses Standalone master data record, so each order line matches its own master data record (for example a Product by SKU). A purchase-order style setup can instead set Master data ID field to the rewritten parent path and use Single parent record (by id) so each line loads that parent.
Use Search across records when lines can come from several records and no parent ID is available.
On a Line item step, Rewrite fields can copy From line item (a field on the matched line) or From record (a field on the master data record that owns that line). For example, copy the matched line id onto the document field grnLineId. From record still applies when you use Search across records: the parent is the record that contains the matched line.
Use Standalone master data record when each document row identifies an independent record. For example, match every order line to a Product by code, then use exact name and LLM name matching only for rows whose code did not match. See the worked Order Auto Matching setup.
Match modes
Exact – all fields
Use when every participating identifier must agree. Empty-value and comparison behavior depends on the scope, as described below.
Exact – any field
Use when any one of several alternative identifiers can establish the match.
Fuzzy
Uses normalized containment rather than an edit-distance threshold. Every participating field must match.
LLM
Uses AI with Agent ID (leave empty for the default autoMatchingAgent) and Prompt. The matching results show an LLM step; matched fields show an AI match badge on Details.
Cloud function
Runs at Header scope, sends Input fields to a tenant function, and writes returned values through Response mapping. It derives values without comparing master data.
Use exact modes when identifiers are stable. Use Fuzzy or LLM when values vary. Exact and Fuzzy matching do not rank candidates by business priority.
At Header scope, Exact – all fields, Exact – any field, and Fuzzy ignore mappings whose document value is empty. If every configured value is empty, the step does not match. Header and standalone-record matching use the source API's query behavior.
At Line item scope, an empty row value still counts as an unmatched mapping for Exact – all fields and Fuzzy, so the row does not match. Exact – any field can still match another non-empty mapping. For comparisons against loaded line candidates, exact modes trim surrounding whitespace and compare text case-sensitively. If master data contains localized text, they prefer a localized value equal to the document text, then English, then the first non-empty localized value.
When more than one candidate qualifies, Exact – any field at Header scope tries match fields in their configured order. API-backed matching then uses the first qualifying API result. Single parent record (by id) uses line-array order. Search across records uses API parent-record order and then nested-array order. Do not rely on these tie-breakers as business prioritization; add identifying fields that make the match unique.
For LLM, Prompt describes how the model matches this step. Leave Prompt empty to use the default autoMatchingAgent.

For Cloud function, Input fields send document values as parameters, and Response mapping writes response values back onto the document. Mapped cloud-function values appear with a Derived badge instead of a master-data match badge.
Cloud function step contract
Set Match mode to Cloud function, then select the tenant Cloud function. Each Input field maps a document path to a parameter name under inputs. For example, mapping header.vendor.id to vendorId sends:
The actual document contains the complete current entity. Map a response path to each target document field. For example, response:
can map risk.code to header.riskCode.
A Cloud function step reports a match when the function returns matched: true, or when matched is omitted and at least one Response mapping writes a value. An explicit matched: false shows No match, but mappings whose response paths exist are still written. A missing response path leaves its target unchanged and marks that mapping as not matched. A function that updates the document itself and uses no response mapping must return matched: true.
Results in the cockpit
The Auto Matching tab appears after the supervisor has run on the document. If the tab is missing, matching has not run yet. When no Active configuration applies, Overall result shows Unknown and the page states No matching configurations were run. This differs from No match, where at least one configuration ran but none matched.
After one or more configurations run, the document shows an Overall result of Matched, Partially matched, or No match:
Matched – Every configuration that ran reported at least one match. For a line-item configuration, some rows can still be unmatched, so inspect its step and row results.
Partially matched – Some configurations reported a match and others did not.
No match – No configuration reported a match.
Within a configuration, a step can show Skipped when no matcher or cloud function is configured, or Error when its call fails. A skipped or failed step does not count as a match. The pipeline continues when possible; a successful later fallback can still make the configuration Matched. If every step is skipped or fails, the configuration shows No match and contributes to No match or Partially matched overall.
Open each step to review field or row results, confidence, and reasoning when the matcher provides them. Rewrite outcomes appear on Details when the target field is visible, often with Updated from master data or Derived. To verify a hidden rewrite during setup, temporarily add that target to the form layout as a read-only field.
For how to review those results, see Managing Documents.
Last updated
Was this helpful?

