---
title: "Map a sample export"
description: "Learn how to turn a customer's sample exports into a saved mapping card on the Convert page."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.certinvo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Map a sample export

Use this guide to turn a customer's sample exports into a saved mapping card. Start on the Convert page,
`/convert`, by dropping a file there. Or start on the Mappings page, `/mappings`: choose
**New from file**. Either way the draft opens in the mapping's editor, and the
steps below are the same. It is step 2 of [Set up a customer file](/how-to/customer-files/set-up-a-customer-file).
When something stops you, see [Fix a sample that will not map](/how-to/customer-files/fix-a-sample-that-will-not-map).

Before you start, have the samples ready, as
[Set up a customer file](/how-to/customer-files/set-up-a-customer-file#before-you-start) describes. Choose
**Live** or **Sandbox** in the environment menu. The card is saved for the company you are working in.

Before a draft exists, the page shows a place to drop the samples, and under it the mappings this workspace already
has.

## Upload the samples

1. Drop the samples on the page, or choose **Choose files**. You can choose several files at once. On Convert,
   one file is first offered to your saved mappings; when none reads it, Convert says so and **Create a mapping
   from this file** makes the draft. The draft always opens in its editor under Mappings.
   Files of the same export are read as one source and give one draft over all their columns, not one draft
   each. A column only some of them have is proposed as one a file may lack. Files from more than one system are
   listed by group, under "Multiple source systems": choose **Teach this group** for one group at a
   time. Every source gets a card of its own.
2. Wait for the draft. An EDIFACT INVOIC or an SAP IDoc INVOIC02 starts from Certinvo's standard mapping for its
   message and version: every field that mapping reads is mapped already. Only the places of your file it does not
   read, such as your company's own segments, are left open, with the profiler's proposal where it has one. For any
   other format, the profiler reads the files and proposes a field for each column. A column at the
   same path as one the company confirmed in an earlier card is mapped from memory. A column an earlier
   card left out is ignored again, unless a later card reads it.

One file is first offered to the mappings you already saved, as an upload on Outbound is. The top of
the page says it is looking for one. Then:

- **A saved mapping reads the file.** It is converted at once. No draft opens, and nothing is left to decide.
  The page says so, with **Open in Outbound**, where the invoices are.
- **Two saved mappings read it, and they would make different invoices.** The page lists both. **Convert with
  this one** converts the file there, and the pick is remembered for files like it. **Use this one, retire the
  other** converts it the same way and retires the other mapping, so the question does not come back. Two that
  decide the same are never a question: the newest converts the file, and the other is retired.
- **The mapping that reads it cannot fill a value.** The page names that mapping and says what it could not
  fill. Nothing was converted. Correct the file and drop it again, or choose **Update the mapping with this file**:
  the mapping's next version opens with this file in its editor, and saving it converts the file.
- **No saved mapping reads it.** The draft opens, as in step 2. When a saved mapping knows most of the file and
  the file changed against it, the draft is that mapping's next version, and saving it converts the file.
  When only its dates or amounts are written another way, the draft reads them the new way where one way reads the
  column, and saving confirms it.
- **The file cannot be analysed.** One notice says why, with a title and one sentence, and **Create a mapping from
  this file** is not offered. **Mapping service unavailable** means the service did not answer: **Retry** analyses
  the same file again. **File not readable** gives the reason the file was refused. Other titles name a format that
  is not supported, a file that is too large, a file that is already an e-invoice, or files from several systems.
  Under the notice, the file is shown with its name, its kind (for example `EDIFACT INVOIC D.96A`) and its size. An
  EDIFACT file is shown in the character set its `UNB` header names, so the umlauts of a `UNOC` file read as written.

When the draft arrives:

- The line under the title lists each sample, each with **Remove**.
- The page address names the draft: `/mappings/<id>`. A reload opens it with your samples and every choice you
  made.
- Every choice is saved as you make it. If you leave for another page, open **Mappings**. The draft is listed
  on top, the last changed first, marked **Draft**, and a click or **Open** opens it
  in its editor where you left it. Any browser signed in to the same company finds it there. **Delete** at the end of
  a row deletes a draft you no longer need; it asks once, in the row. A saved mapping is never deleted; it can be retired or merged into another, as
  [Retire or merge a mapping](/how-to/customer-files/retire-or-merge-a-mapping) shows.
- In the editor, **Mappings**, in the path over the title, leads back to that list. The draft stays saved.

When you open one PDF that holds no e-invoice, Convert first asks whether it may read the file with AI.
**Yes, read this file with AI** sends it to the AI service our privacy notice names, and the mapping view
opens with its suggestions on the open columns, marked as read with AI. **Map it myself** sends nothing,
and you map the file as before. Convert asks for every such PDF, whatever Settings say. Our privacy
notice, in its section on reading a PDF invoice with AI, says what is sent and what is kept.

For a spreadsheet, JSON, XML, IDoc or EDIFACT file, the mapping view offers **Map with AI** while columns
are open. Beside it: "No file data sent". It asks about the open columns only, from their names and
value types, never a data value, and only after **Send** in its question. With **AI invoice
recognition** turned on in Settings by an owner or admin, that question is skipped; the setting never
sends a file by itself. Each answer shows on its field as an **AI suggestion**, and **Accept all**
takes every one. A mapped column is never asked. A company can use Map with AI 50 times in 24 hours; after
that the columns are mapped by hand until the oldest of those requests is a day old.

While Convert reads the file, the top of the page says so. When the file is read with AI, it adds that
this can take up to a minute. If a PDF was not read with AI, the note above the page says why: for
example that AI reading is not set up yet, that the service did not answer, or that the PDF is a scan.
You then map it yourself. When the file was read with AI, no note covers the invoice: a line beside **Open in
editor** says how many fields the AI filled that the mapping did not, and the editor opens the whole
invoice for you to check.

To add more files of the same export later, choose **Add file** at the top right. The draft is made again from every
sample, your choices are applied again, and the test runs on all of them. **Remove**, beside a sample's name under the
title, asks once, then makes the draft again from the samples left. To start with a new file, go back to Convert. This
draft stays listed on the Mappings page.

With several samples, the file pane names the one shown; choose another from that list. The card stays one card for all
of them.

## A finished e-invoice

An XML e-invoice in UBL or CII, such as an XRechnung, is mapped by its standard. A line at the top of the page
says each field is mapped from its element in the file. Dropped on its own, it opens on the same page as an export:

- Your file is on the left. Choosing a row or hovering a preview field lights the element it was read from.
  The lit element scrolls into view inside your file's pane only, so the page stays where it is.
- **Mapping** has one decided row per element the standard read: its name, its values and the field it
  became. The lines of the invoice share one row per element, with each line's value.
- **Invoice preview** draws the invoice in your invoice layout, or in Certinvo's. Pointing at a value lights the element it
  was read from. A value of a line item lights that line's element.
- The rows and the invoice cannot be changed. There are no steps, no answers on the rows and no **Save
  mapping**. **Edit** in your file's **...** menu still works as a scratch pad, and what you type is read again.
- What the reader could not carry is listed under the rows. When it could not build an invoice at all,
  the preview says so.

## Read the page

The editor is the invoice's own form: every field of the invoice, under the official sections, such as **Informationen
zum Verkäufer**. A section shows the fields the invoice needs and every field the card fills, so a filled field is
always in view. The empty optional fields wait behind a link such as **Show 4 more fields**. A party only some invoices have, such as
the invoicee or the payer, shows its fields once the card fills them. **Sections**, at the left, jumps to one. Your file is beside the form, on the right; drag the line
between them, or move it with the arrow keys, to make the file wider or narrower.

At the top right are the test's result, **Add file**, **Test** and **Save and convert**. The button says **Save** when
saving converts no file: for a draft opened from Mappings, for a refused invoice's file opened to fix one field, and
for a file **Open a file** on Home brought here.

Over the form:

- **All**, **Mapped**, **To decide**, **Missing** and **Empty** show the fields in that state, each with its count.
  Every field is in one of the four states, so their counts add up to **All**.
- **Search fields**, at the right, searches the form.

Over the file are **File**, **Invoice** and **Columns** at the left: the file, the invoice the card makes, or every column of the file, as
[Check the preview](#check-the-preview) describes. At the right, over the file, is **Search file**, which marks every
place the words stand; over **Columns** the filter stands there instead. There is no row under these controls. They stay in one row whether a file is beside the form or not, so adding a
file moves nothing on the page.

The **...** menu beside the file's name (**More about the file**) says how the file is read: for a CSV its delimiter,
encoding and grouping, and for an XML export its encoding and where one invoice is. **Change** there changes it. The
same menu lists what the tabs do not show: a file added twice, and the values the reader read and no mapping can use.

A PDF or a scan shows its page. A workbook shows its first record as a table.

## Decide every field

Each field is one row: its name, a star when the invoice needs it, its BT code, the column it reads with the column's
path under it, the value that column holds, and its state: **Mapped**, **To decide**, **Missing** or **Empty**.

- Every field is named by an official body. In German it is KoSIT's label; in English it is the EN 16931 term. A few
  fields of Certinvo's own model that no official body names keep Certinvo's name, such as the Skonto days.
- Hovering the BT code shows the EN 16931 name for the field and its official definition in your language. The German
  definition is KoSIT's, the English one is from the Factur-X specification. Under them, **Standards** lists each
  standard whose official term list holds the code, such as EN 16931, XRechnung or ZUGFeRD EXTENDED. When FeRD's
  French column gives the code its own French id, **France** shows that id with FeRD's French term.
- Pointing at a field lights its value in your file and scrolls the file to it. Pointing at a value in your file
  lights the fields that read it and scrolls the form to them, when they are out of view. Clicking a value in your
  file opens its field.

Click a row to open it. **Source** says where the value comes from:

- **From file**: **Column** lists the columns that can fill the field, and **Type a path in the file…** takes a path.
  **Value in file** shows what the file holds there.
- **Fixed value**: one value, the same on every invoice. A code field offers its official list.
- **From Settings**, for a seller field your seller details fill: their value, said under it.
- **Not mapped**: the card writes nothing for it.

A field the profiler found a column for, and you have not confirmed, shows **Proposed:** with the column and its value.
**Confirm** takes it; **Choose another** opens **Column**. A suggestion is applied only when you choose it.

A field of a list, such as a line item's quantity, takes its column from the list's own columns. Until the list has
its place in your file, the first column you pick gives it that place, and a fixed value waits until it has one.

A date or an amount needs its **Format** when the file writes it in a way that could be read more than one way; until
then the field says **Format required**. A field the engine adds up from the line amounts says so.

**More options** shows **Other names**: the names the same column has in the customer's other files. **+ Add name**
adds one; its × takes it out. **Apply** closes the row. Every change is kept as you make it.

Under an open field, what your file says of its column, when that changes something: what SAP declares for its
segment, how many sample invoices leave a required value empty (each would be refused), or a code nearest to one the
dictionary knows.

A field every invoice needs, and one a rule refuses, shows your
[validation policy](/how-to/invoices/change-the-validation-policy) on its last line: one chip per rulebook, with a
tick, or a cross in red when the rulebook is required. The validator's own words are the chip's title. A field a
rulebook refuses shows its line on a closed row too. Before the sample is checked, no chip shows a tick.

### The columns of your file

A column nothing reads is open until a field reads it or you ignore it. In the file, its values are underlined with
dots; an ignored column's values are grey. A column nothing reads holds the save: clicking **Save** lists the open
columns, and **Show** opens **Columns** beside the form on **Unmapped**. **Columns** lists every column of the file,
filtered at the right by **All**, **Unmapped**, **Mapped** and **Ignored**, each with its count. A mapped column names
the fields it fills; an open or ignored one has one choice: a field nothing fills yet, or **Ignore**. A column
still on **Choose…** is open. In the file, pointing at a value of an open column shows **Ignore**; **Ignore all** in the
Save list asks first. A column an
earlier card of this company left out is left out again.

For an SAP IDoc, the file's **...** menu also lists the codes SAP allows for a qualifier that no sample uses. It asks nothing of
you.

## Give your codes a meaning

A code field, such as a tax code or a unit, read from a column, lists under **Codes** each code your samples hold, with
the official code it means. Each code is answered in the order the engine reads it:

- the official code you chose for it in this mapping, with its × to take it out again
- **from code book**: your company's code book answers it, even when the code is also on the official list (`STK`
  read as `H87`)
- an official code, kept as it is
- **recognised**: a word Certinvo already knows, such as `MwSt`

A code nobody answered yet has **Choose a code**: pick its **Official code** from the field's official list, or
**No value**, which puts nothing in the invoice. **Add a code** adds one of your codes by hand; several codes with one
meaning are separated by commas, such as `Rechn., Rechnung`. **Save new codes**, ticked at first, also
saves each new answer in your company's code book, for a code the book does not hold yet. **Open in Codes** opens the
whole list.

A code Peppol BIS refuses, such as `EM` (an email address) as an electronic address scheme, is said under the field.
The XRechnung file is still right; only the Peppol file would be refused.

## Give your payment keys their terms

Some systems write the payment terms as a key, such as SAP's `NT30`. The buyer must read the terms
themselves. When the payment terms field reads a column, its open row lists under **Your payment keys and the terms
each one stands for** each key your samples hold.

- For SAP's payment key, the list appears by itself. For another payment-terms column, choose **Read these
  values as payment keys**.
- A key that **needs its text** shows a small form. Type the payment terms as the buyer reads them.
- To grant a cash discount, choose **Add a cash discount step**, and enter the days and the percent. Add a
  step for each discount the key grants.
- Choose **Save**. The key then shows its terms, and **Change** opens the form again.

Each answer is saved to the kept draft.

## Fill the missing fields

**Missing** lists the fields the invoice needs and nothing fills. In the list **Save** opens, **Show** beside the
missing fields opens the next one. Give each one a **Source**: a column of your file, a **Fixed value**, or **From Settings** for a seller
field. A field a rulebook of your policy needs, such as the buyer reference XRechnung asks for, shows that rulebook's
cross on its policies line once the sample is checked.

### Seller details from Settings

What is the same on every invoice you make belongs in **Settings**, on the **Company** tab, under **Company
details**, the head office's form: your name, and for the head office its address, a contact with phone and email, and
its electronic address with its scheme, such as `9930` or `0204`. A French company also gives its SIREN with its scheme
`0002`, its usual business process type, such as the billing mode `S1`, and the notes `PMD`, `PMT` and `AAB`; these
rows show only for a company established in France. Tick **Use these on invoices when the file has
none** and every mapping fills each seller field its card does not write from there, the registration and the
business process type included, and the seller VAT ID from the head office's VAT ID. The notes go on
every invoice the French rules apply to, made in the form or from a file. A file's invoice gets each note whose
subject the file does not state, after the file's own notes, and the business process type when the file has none.
The French rules allow one note per subject, so a note the file states is kept and yours for that subject is not
added.

- What your file states always wins: a field the card writes is never filled from Settings.
- An invoice whose file names another seller gets none of your seller details: its seller VAT ID (or, with none,
  its seller name) is not yours. A sister company's file is not given your VAT ID, phone or address; the check
  then names what it lacks. A file that names no seller at all is your own export and is filled as before.
- In the editor, a field filled this way shows **From Settings** with its value, and it is no longer missing.
- Before you save them, your seller details are the company you gave at sign-up, and the box is ticked. Save
  them once to add the contact and the electronic address.
- Unticked, nothing is filled, and the field shows as missing again with the next preview.
- The name, the registration and the notes are the company's own; the address, the contact and the electronic
  address are its Head office's. The Sandbox shows and saves the same ones as Live. Each save is a new version that names the
  person.

## Check the preview

**Invoice**, over the file, shows the invoice the card makes from your first file, read as a conversion reads it, printed
on your invoice layout's template, or Certinvo's standard template until you save your own. The page fills the pane.
The bar over it holds the zoom and the **Standard / DIN 5008** switch, which shows the other template without saving
it. A pinch on a trackpad, or the wheel with Ctrl or ⌘ held, zooms the page too. Pointing at a field lights its value on the page, and pointing at a value on the page lights its field and
scrolls the form to it. The page offers no line to add: it shows what the file makes.

- A value the file does not give is never a guess. It prints nothing.
- When a date or an amount still needs its format, the preview says so instead.
- A payment key your samples hold, such as `NT30`, is not printed as payment terms. Until it has its text,
  the invoice shows **Payment key NT30: needs its text** where the terms print.

When a PDF was read with AI, a line says how many fields the AI filled that the mapping did not, and **Open in
editor** opens the whole invoice in the create form for you to check.

## Check the sample under your validation policy

Once the card makes a whole invoice from the sample you see, Certinvo validates it under your
[validation policy](/how-to/invoices/change-the-validation-policy), the way a real invoice of yours would be:
the strengths for the invoices you make, and the files your policy makes. It is
validated as the decision says, as a real invoice is: a French invoice as Factur-X under EN 16931 and the French
rules, never as XRechnung. It asks once you stop editing for a moment, and nothing is stored.

- The answer is the validator's own. Each finding names its rule, its rulebooks, and the fields it is about,
  such as the buyer reference for an XRechnung rule.
- While the card cannot make a whole invoice yet, nothing is validated. The missing fields come first.
- After a change, the invoice and the last answer stay on screen until the new ones come. Saving
  does not wait for this answer: the test checks the samples the same way, and its answer decides the save.
- When the validator cannot run, nothing is blocked, and the sample counts as not checked.

## Test on every sample

The test runs by itself once nothing else is left, and again after every change. It runs the card over every invoice
in every sample, the way a file sent later is read. Its result is at the top right: **Test passed** or **Test failed**,
with how many files. Click it to see each sample as passed, with the number of invoices mapped, or failed, with the
reason. The reason is the reader's own sentence when the file cannot be read that way, or the invoice and the fields
the card cannot fill. A sample with no invoice in it fails. Once every sample passes, the test also checks the first
invoice they make under your validation policy, and keeps that answer with the test.

**Test** runs it again on the samples as they are now. It needs a file, and every column and required field decided.

## Save the mapping

Choose **Save and convert**, or **Save**. The button is always the dark one, but it does not save while:

- any column is open
- any required field is missing
- a code in your samples still needs a meaning
- a payment key in your samples still needs its text
- a CSV or Excel draft has no `input` block
- a sample has not passed the test yet
- a rulebook your policy marks required rejects the sample over a field this mapping writes, or one a column of
  your file holds, or for a reason none of its findings names
- the sample is a scan or a photo, or a PDF whose line table was not found

The API refuses a save for the same reasons.

A finding the mapping cannot fill, such as payment instructions on an export with no bank columns, does not hold
the save. It is listed above the draft in the validator's words, under **Outside this mapping**, with a link to
Settings, where such facts are added. A finding that names no field at all, such as a rule about how dates are
written, is listed there too, since no field's card can carry it. Every invoice still has to pass the check. A finding that names a group,
such as payment instructions, is about every field in it: when your file has a bank column, it holds the save
until that column is mapped.

Clicking it then says what is left, with a way to each: the open columns, the fields to decide and the missing
fields, each with **Show**. **Show** beside the open columns opens **Columns** on **Unmapped** beside the form; **Ignore all** beside it asks first, then leaves them all out. When nothing is left, **Save mapping** asks for the mapping's name, such as `my-erp`, or, for a saved mapping's
next version, names the version it is saved as. For a PDF the save converts, **Keep my PDF as the page of the
e-invoice** keeps its page. Confirm with **Save and convert**, or **Save**.
Saving closes the draft and finishes the file it started from. The first sample, or the file that waited for
this mapping from Ausgang, is converted through the mapping just saved, every invoice in it. A card says the
mapping is saved, who confirmed it, the samples and the test result, and how many invoices of the file were
accepted. **Open in Outbound** shows them in the list. **View this mapping**, **Download** and **Map another export**
follow. It offers no second save. When the file is refused, the card says why.

If someone else saved a new version of the same mapping while your draft was open, the save is refused instead of
dropping their changes. The draft is made again from the newest version at once, your own decisions applied to it,
and a notice says so, naming both versions and any decision that no longer applies. Review it and save again.

The same file added twice to a draft counts once. The file's **...** menu names the copy and the file it repeats.

For a file **Open a file** on Home brought here, saving converts nothing. The card offers **Open in the editor**:
the invoice opens as a draft in the create form, read through the mapping just saved. A file of several invoices is
refused there naming how many; send that file through the mapping instead.

The console records you, from your sign-in, as the person who confirmed the card. A saved card never
changes. The API calls this freezing it, and for a kept draft, finalizing it.

The saved version is named after the file, such as `fr-burger-queen-0.0.0`. The profiler's draft name ends in
`-draft`; the save drops that ending. When a version of that name is already saved, the number steps up past it,
also past an older one saved with the ending. The next version of a saved mapping keeps that mapping's name.

When a mapping you already saved reads the samples, the save does not make a second mapping for the same
layout. It saves the draft as that mapping's next version, under its name, and the saved page says so. When two
saved mappings read them, the page asks which one this is a new version of. A draft you started with **This comes
from a different system** keeps a name of its own. When your draft decides exactly what that mapping's newest version
already decides, nothing new is saved: the page names the saved version, and the file is converted with it.

Next, send the customer's first real file, as
[Set up a customer file](/how-to/customer-files/set-up-a-customer-file#step-3-send-the-first-file)
describes.

## Download a saved mapping

The **Mappings** table on `/mappings` lists every mapping. Each saved mapping is named once, on the row of its
newest version, marked **live**; its earlier versions follow as quieter rows marked **previous**. Mappings are
listed there only. Every saved row shows who confirmed it and has **Open** and **Download**. Download saves
that version as `<version>.json`, the same card `GET /v1/mappings/{version}` returns. The card holds
your decisions only. The values read from your samples are removed when it is saved.

## See also

- [Set up a customer file](/how-to/customer-files/set-up-a-customer-file)
- [Fix a sample that will not map](/how-to/customer-files/fix-a-sample-that-will-not-map)

- [Mapping card format](/reference/mapping-card-format)

Source: https://docs.certinvo.com/how-to/customer-files/map-a-sample-export/index.mdx
