Overview

Affinda’s data-mapping capability lets you normalise extracted values against your own lists, giving you cleaner data and fewer downstream corrections.

When to choose each type

ScenarioOptionsData Source
Data typeShort, fixed list (≈ 50 values or fewer)Larger, often two-dimensional list from a downstream system
Value prediction mechanismModel predicts the value directlyRaw data from the document matched by string comparison

Options

A field whose Data Type is set to Options stores a single column of permitted values. Enter the items directly in the field editor. Any value outside this list is flagged during validation. Options field configuration Options field configuration Best practice tips
  • Keep the list concise.
  • Use consistent casing.
  • Review periodically to remove unused terms.

Data Sources

Data Sources serve as lightweight master data tables that you can manage directly within Affinda. Affinda supports CSV, XLSX or JSON files as Data sources, meaning you can upload anything from supplier registers to nested product catalogues. Edit Data Source dialog Edit Data Source dialog

Creating a Data Source

1

Upload a CSV, XLSX or JSON file.

2

Pick the Key Column

A key column is the single field in your source table whose values are guaranteed to be unique; it is used by Affinda to reliably identify each record unambiguously.
3

Pick the Label Column

The label is the human-readable name stored for each record in a Mapping Data Source; it’s what users will see in the validation UI and drop-downs.
4

Click Save. The system assigns a Data Source ID you can reference in API calls.

5

Use Replace Data to overwrite rows later without changing the ID.

Automating updates

Call PUT /data-sources/{id} for full replacement or PATCH /data-sources/{id} for incremental updates. Schedule these calls from your integration.

Mapping document fields

Matching Criteria dialog Matching Criteria dialog
1

Open the field, then Data Source → Configure Matching Criteria.

2

Choose the Document Field to match (e.g. Employer Name).

3

Pick the Data Source Property (e.g. Employer Name).

4

Select a Match Type:

  • Exact – strings must be identical.
  • Partial – succeeds when the extracted string appears anywhere in the candidate.
  • Fuzzy – edit-distance logic allows minor typos.
5

Tick Required if validation should fail when nothing matches for this criterion.

Tips for reliable matching

  • Trim whitespace and normalise case in your source files.
  • Ensure the key column is unique.
  • Keep label strings short so they fit comfortably in the UI.

API reference

GET    /data-sources                # List
POST   /data-sources                # Create
PUT    /data-sources/{id}           # Replace all rows
PATCH  /data-sources/{id}           # Update selected rows
DELETE /data-sources/{id}           # Delete