- Match and map — the document says
coca cola, your system needsThe Coca-Cola Company. - Match only — you only want to accept values that exist in your list, and leave them as they are.
Mapping format
A mapping is a JSON array of objects. Each object has afrom and an optional to:
fromis the value to look for in the document. Rows without afromare ignored.tois the value the field is set to when the row matches. It is optional — leave it out and the field keeps thefromvalue, which is how you build a match-only list:
to, as in the first example — that is how you fold many spellings into one canonical value. You can also mix mapped and unmapped rows in the same list.
Providing the mapping
- Table
- CSV
- URL
Edit the From and To columns directly in the formatter. This is the simplest option when the list is short and changes rarely.
Connecting a URL
When you connect a URL, Cradl AI calls your endpoint each time a document is processed and uses the response as the mapping. This keeps the list in sync with your own system — a supplier register or product catalogue — without re-importing anything. In Connect with URL you set the endpoint and chooseGET or POST. While a URL is connected the mapping table is read-only, since the endpoint is the source of truth.
Expected response
Your endpoint must answer with a success status and a JSON body that is the mapping array itself — the same format as above, with nothing wrapped around it.[ and the first object should have a from key.
The endpoint is called on every document, so it needs to be publicly reachable and reasonably fast. The dialog takes a URL and an HTTP method only, so the endpoint cannot require custom authentication headers. If the endpoint returns an error status, or something that is not a mapping array, the field is left empty and the formatter reports an error — which sends the document to human review rather than silently writing a wrong value.
Fuzzy matching
By default a value must match afrom exactly. Turn on fuzzy matching to also accept small differences, measured as Levenshtein distance — the number of single-character edits needed to turn one string into the other.
- Threshold — how many edits are allowed.
0means exact match. Enabling fuzzy matching in the app starts at1, and you can raise it. - Ignore case and locale — when on, differences in capitalization and accents cost nothing:
Coca ColaandCOCA COLAare both distance0fromcoca cola, andNestléis distance0fromnestle.
1 and case differences ignored, a from of foo matches foo, Foo, fo and foo6, but not foobar.
What the formatter does
The formatter reads the extracted value, or the raw value if the field has not been formatted yet, and then:
An error leaves the field empty and prevents the document from being automated, so it goes to human review. A warning does not block automation — it just records that the match was ambiguous, which usually means the mapping has near-duplicate
from values worth cleaning up.