---
title: "Action: Invoices and invoice lines"
description: "Invoices (header). Imports invoices into Sapera, creating or updating the invoice header with customer and address details for each row."
url: https://support.sapera.io/en/articles/612-action-invoices-and-invoice-lines
collection: "SyncTool"
updated: 2026-09-25
language: en
alternates: [da]
---

# Action: Invoices and invoice lines

Invoices (header). Imports invoices into Sapera, creating or updating the invoice header with customer and address details for each row.

**Invoices (header).** Imports invoices into Sapera, creating or updating the invoice header with customer and address details for each row.

**Invoice lines.** Imports invoice lines into Sapera, attaching each line to its invoice with product, quantity, price and VAT details.

## How to use the action

1\. Select the action in the **Action** field. 2. Point to your data source – a **file** (CSV or Excel) or a **SQL query**. 3. Map the source columns to Sapera's fields in the column mapping (see _Source fields_ below). 4. Run **Compare** to see what will be created, changed or stay unchanged – without writing to Sapera. 5. Run **Update Sapera** to perform the import.

Use the **Allow create** and **Allow update** parameters to control whether new rows are created and whether existing ones are updated.

## How matching and updating works

Import the **invoice header** first (the _Invoices_ action) and then the **invoice lines** (the _Invoice lines_ action) – the lines require the invoice to already exist.

-   The invoice header is matched on the invoice's **identifier** (Identifier); matching invoices are updated and new ones created with customer and address details.
    
-   Each invoice line is matched on **invoice identifier + line number** and linked to its invoice with product, quantity, price and VAT. If the invoice does not exist, the line fails.
    
-   Direction: from file/SQL into Sapera.
    

## Key parameters

### Invoices (header)

<table data-id="de8a198e-3dd3-4c69-b355-3d4d53143ff4" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="94b4e6e6-2e06-4a2b-9811-2b7f515ebc03" style="text-align: left;"><strong>Parameter</strong></p></td><td colspan="1" rowspan="1"><p data-id="59269ab1-e4e0-45ae-8f10-6d7616f27e49" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="9720c5be-a13a-4d22-9ca5-83a68b2e96ec" style="text-align: left;">ForceIdentifierInHigherRangeThan</p></td><td colspan="1" rowspan="1"><p data-id="504dca45-a1dc-4c68-a2ec-fda5f7eb9e7b" style="text-align: left;">Forces newly created invoice numbers to start above the given value to avoid clashing with existing numbers.</p></td></tr></tbody></table>

### Invoice lines

<table data-id="a87b4287-6ff1-4183-a45c-9035b94309e5" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="07a34c16-7d35-41dc-be25-53ab3a617435" style="text-align: left;"><strong>Parameter</strong></p></td><td colspan="1" rowspan="1"><p data-id="99955624-3fb2-41c3-b790-65cc6eee5f50" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="4379f844-b343-4ad0-b885-ef2c67dc495c" style="text-align: left;">ForceSalesOrderIdentifierInHigherRangeThan</p></td><td colspan="1" rowspan="1"><p data-id="55827ba1-7c9b-407c-9e5c-a118b488be3c" style="text-align: left;">Forces newly created identifiers to start above the given value to avoid clashing with existing numbers.</p></td></tr></tbody></table>

## Source fields

### Invoices (header)

<table data-id="edbe64d0-9684-4535-95bb-3579b22c269f" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="d09d93f2-eb84-4839-bdd2-d1bdffdfe08e" style="text-align: left;"><strong>Field</strong></p></td><td colspan="1" rowspan="1"><p data-id="7b6a39f5-2d6c-41a1-9fc6-6338a61d28d7" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="f6141b7a-a5c0-40bf-9777-12033b71957e" style="text-align: left;">AddressLine1</p></td><td colspan="1" rowspan="1"><p data-id="0ad0206a-e1b4-4546-8aa0-3005c153b661" style="text-align: left;">First line of the invoice address.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="b459bdbc-4689-4022-a2aa-32185a6f403a" style="text-align: left;">AddressLine2</p></td><td colspan="1" rowspan="1"><p data-id="7b837256-41bd-45ac-a887-fe52bb2eaade" style="text-align: left;">Second line of the invoice address.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="e97992a0-0417-43fc-978b-b87ff0325ce1" style="text-align: left;">Country</p></td><td colspan="1" rowspan="1"><p data-id="cbbd5431-6598-41b5-96fb-0effcf8046cc" style="text-align: left;">Country of the invoice address.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="dce4ebcf-1208-4b6a-9432-94c22b2213b6" style="text-align: left;">CurrencyCode</p></td><td colspan="1" rowspan="1"><p data-id="f2a54edc-8f10-46b8-9cb2-d105e4d7282f" style="text-align: left;">Currency code of the invoice, for example DKK or EUR.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="c26c3847-3b15-4ab4-9901-983d5e5435d1" style="text-align: left;">CurrencyRate</p></td><td colspan="1" rowspan="1"><p data-id="fd6b539a-14dd-4b38-828f-c4e7fcfb8c44" style="text-align: left;">Exchange rate applied to the invoice currency.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="ff788cf1-b9c7-4ee6-869c-f48ba1a912e0" style="text-align: left;">CustomerEmail</p></td><td colspan="1" rowspan="1"><p data-id="47f50f1c-bebe-4a8d-b07b-3a9aa376b14e" style="text-align: left;">Email address of the customer.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="3252689b-9fd4-488f-9b19-6ad2917825a7" style="text-align: left;">CustomerFullName</p></td><td colspan="1" rowspan="1"><p data-id="427ddc20-c2c1-46c7-b299-572acb265302" style="text-align: left;">Full name of the customer on the invoice.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="8c1c0703-ea63-407b-9bfc-0c19871eed34" style="text-align: left;">CustomerIdentifier</p></td><td colspan="1" rowspan="1"><p data-id="7aee7cb2-7f6e-4c21-9e42-639a75a93627" style="text-align: left;">Identifier of the customer the invoice belongs to.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="d48937f9-1198-4326-952f-5be16d4e4466" style="text-align: left;">CustomerOrganizationIdentifier</p></td><td colspan="1" rowspan="1"><p data-id="0a80f4ec-8182-42de-8e10-5de2aa8f4697" style="text-align: left;">Organization or CVR number of the customer.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="7feae7a3-e265-44e0-8f0d-1d0914aabf0e" style="text-align: left;">CustomerPhone</p></td><td colspan="1" rowspan="1"><p data-id="7a1cc855-33c9-4fc7-8cff-e96cff1e9c55" style="text-align: left;">Phone number of the customer.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="6295d5d1-f2e9-45d8-9804-7aa8b0ca3be9" style="text-align: left;">CustomerReferenceNumber</p></td><td colspan="1" rowspan="1"><p data-id="a2c48a2a-1147-44bf-9d7b-08ba3ac16282" style="text-align: left;">Customer reference shown on the invoice.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="15e1dc76-7b35-4d95-b8ad-0fe5d261e89e" style="text-align: left;">Identifier</p></td><td colspan="1" rowspan="1"><p data-id="02c1fbe1-6a0a-4674-bbc3-58c738dffe0c" style="text-align: left;">Unique identifier (invoice number) of the invoice.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="522e2406-3521-487c-ad85-e3a9901eae5f" style="text-align: left;">InternalNote</p></td><td colspan="1" rowspan="1"><p data-id="f84c29d9-a55a-4390-9c9b-f3fbd7a0861f" style="text-align: left;">Internal note not shown to the customer.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="72d6595a-576f-4da9-bc58-ef8c27120327" style="text-align: left;">InvoiceDate</p></td><td colspan="1" rowspan="1"><p data-id="df63621d-7e0e-4a5e-b6a2-481d80d54f27" style="text-align: left;">Date of the invoice.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="44eaec31-2eac-4d20-adee-677b72ec09ba" style="text-align: left;">IsExemptVat</p></td><td colspan="1" rowspan="1"><p data-id="4718929d-1fcb-4891-8ee9-14297fa40aae" style="text-align: left;">Whether the invoice is exempt from VAT.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="6a64570f-de98-48fb-a535-767b3cbce996" style="text-align: left;">OtherPayerIdentifier</p></td><td colspan="1" rowspan="1"><p data-id="c1e2008b-ac7c-4352-b889-eff52bf4144d" style="text-align: left;">Identifier of an alternative payer when someone other than the customer pays.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="64f15c09-add8-4f64-a188-f415c05f67cc" style="text-align: left;">PaymentTerm</p></td><td colspan="1" rowspan="1"><p data-id="3d1b0259-ccc0-466b-a465-3d5e39d626e5" style="text-align: left;">Payment term applied to the invoice.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="975eef35-0564-44cd-86a6-6f9e613c1be3" style="text-align: left;">PostalCode</p></td><td colspan="1" rowspan="1"><p data-id="af4c3c11-946a-490e-a551-b5b5d32cce90" style="text-align: left;">Postal code of the invoice address.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="9dcc9e89-2cb4-43fb-9dc1-cff09cfa1da0" style="text-align: left;">PostalDistrict</p></td><td colspan="1" rowspan="1"><p data-id="e5a39504-a144-4183-8db4-535fece36e03" style="text-align: left;">Postal district or city of the invoice address.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="00566c95-d241-4b0f-a7d6-8d627df8b710" style="text-align: left;">PublicNote</p></td><td colspan="1" rowspan="1"><p data-id="8814a80b-1c02-43b1-bad8-6eeb4e36008c" style="text-align: left;">Public note shown on the invoice.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="2e26b0f2-dc9d-4b96-8d65-3770214fe69b" style="text-align: left;">RelatedProductInstanceIdentifier</p></td><td colspan="1" rowspan="1"><p data-id="f73c5dd6-1bc9-4b59-b76d-123a80429c98" style="text-align: left;">Identifier of a related serial-number item linked to the invoice.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="a2df0e28-7e63-4506-ba88-eb308d0195fc" style="text-align: left;">RequisitionNumber</p></td><td colspan="1" rowspan="1"><p data-id="7a69c20b-4f99-4a7a-b7ef-f749319f3545" style="text-align: left;">Requisition number associated with the invoice.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="4733170c-7650-4664-b74e-8117ec36ebe0" style="text-align: left;">Subject</p></td><td colspan="1" rowspan="1"><p data-id="405e10d2-067e-4b71-806e-ab8f92cafe1a" style="text-align: left;">Subject or heading of the invoice.</p></td></tr></tbody></table>

### Invoice lines

<table data-id="dc339778-9504-4a5d-9d82-688690c59308" style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="73b723a3-368a-49f8-ab72-a8ab5f51f7eb" style="text-align: left;"><strong>Field</strong></p></td><td colspan="1" rowspan="1"><p data-id="ed360426-2dd9-49de-af0a-64cffbe0405c" style="text-align: left;"><strong>Explanation</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="461354f9-6f49-4d99-8a03-38aee290d69f" style="text-align: left;">ContraAccountAccountNumber</p></td><td colspan="1" rowspan="1"><p data-id="7668dac7-2a1b-4946-a298-28328051b5ef" style="text-align: left;">Contra account number used when posting the line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="e84a7bd0-447d-4174-aebf-7fb0ef1d821c" style="text-align: left;">CostPrice</p></td><td colspan="1" rowspan="1"><p data-id="b72ed998-c098-45de-8f30-82a8dfa2a0f1" style="text-align: left;">Unit cost price of the line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="a46ae58d-f1e4-4906-837c-6868c6cbf36b" style="text-align: left;">DiscountAccountNumber</p></td><td colspan="1" rowspan="1"><p data-id="4c72af5d-0159-4261-a0d3-d458130f8a9e" style="text-align: left;">Financial account number used for the line discount.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="e8e1dd30-a7d2-4fac-a6ce-236fc1e45bcd" style="text-align: left;">DisplayName</p></td><td colspan="1" rowspan="1"><p data-id="59b98ab4-15a9-4fe1-bec7-a30cbeb4a5e6" style="text-align: left;">Text shown for the line on the invoice.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="d5ed1ce4-ac1b-41ab-834b-5e99f32e144b" style="text-align: left;">InstanceIdentifier</p></td><td colspan="1" rowspan="1"><p data-id="724f3d59-9f67-4534-9cf7-c844152dfdf0" style="text-align: left;">Identifier of the specific serial-number item on the line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="d609955c-4a62-4845-9228-40ee269cbfc5" style="text-align: left;">InvoiceIdentifier</p></td><td colspan="1" rowspan="1"><p data-id="8eac9403-735d-4151-ab08-73397f064632" style="text-align: left;">Identifier of the invoice this line belongs to.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="23b6b885-4acb-4cbd-b613-d2a0912eeabf" style="text-align: left;">IsExemptVat</p></td><td colspan="1" rowspan="1"><p data-id="7c6bf96d-4bb7-4c38-8a39-590a81a42aa1" style="text-align: left;">Whether the line is exempt from VAT.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="68ec28b2-43ee-45ac-816f-8c2329968b0b" style="text-align: left;">ItemOrder</p></td><td colspan="1" rowspan="1"><p data-id="38ef6ddd-ed2c-4033-a947-f44544d2edca" style="text-align: left;">Sequence number that orders the line within its invoice.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="78d85472-4996-4ff6-8671-5e1d81a1f31d" style="text-align: left;">LocationDisplayName</p></td><td colspan="1" rowspan="1"><p data-id="c68bfc5b-7d1d-4b47-84b5-3cc6057dac9b" style="text-align: left;">Display name of the location associated with the line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="756542a9-a4a8-4f49-a3bd-df7f59e33ff6" style="text-align: left;">ManualDiscountAmount</p></td><td colspan="1" rowspan="1"><p data-id="f929f323-8db6-4f31-9e12-50e38ed1d846" style="text-align: left;">Manual discount amount applied to the line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="fca5f19f-05c8-45d6-9383-1c2976e241f0" style="text-align: left;">Price</p></td><td colspan="1" rowspan="1"><p data-id="ac51f484-44d6-4a10-91f0-6a5208658dda" style="text-align: left;">Unit sales price of the line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="270c6b9b-face-476e-964e-3da4db308e26" style="text-align: left;">ProductDisplayName</p></td><td colspan="1" rowspan="1"><p data-id="5c8fff12-b7ed-43b0-be8b-45e603f24d76" style="text-align: left;">Display name of the product on the line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="711b1e46-eb95-400e-8d0d-0b89e3d9b004" style="text-align: left;">ProductIdentifier</p></td><td colspan="1" rowspan="1"><p data-id="f9e3967a-5ef6-4c7b-8772-9df2a1b64554" style="text-align: left;">Identifier of the product on the line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="f28c362e-ccc2-4a53-86a0-4471684a23a9" style="text-align: left;">ProductKind</p></td><td colspan="1" rowspan="1"><p data-id="4c772623-3b13-4cab-aeb8-3484a16bd158" style="text-align: left;">Kind of product on the line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="51503850-1c57-47d6-bb97-d36c139c0c53" style="text-align: left;">Quantity</p></td><td colspan="1" rowspan="1"><p data-id="09b6c5e8-6705-4388-9b53-929ab23a3f6f" style="text-align: left;">Quantity invoiced on the line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="6439de68-cb8f-4039-a0c5-7dacc741ec66" style="text-align: left;">SaleFinancialAccountNumber</p></td><td colspan="1" rowspan="1"><p data-id="7f607820-8114-458d-9c81-11dc237f60dd" style="text-align: left;">Sales financial account number the line revenue is posted to.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="e0dd06ae-6975-4a2e-9703-f62a623339c9" style="text-align: left;">UsedVatFinancialAccountNumber</p></td><td colspan="1" rowspan="1"><p data-id="fcf2549a-88e9-412e-a293-27b33987395d" style="text-align: left;">Financial account number actually used for the line VAT when posting.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="b6887004-3f99-4a13-89e2-8f1e2309993a" style="text-align: left;">UsedVatRate</p></td><td colspan="1" rowspan="1"><p data-id="6751effb-bb05-4058-8d37-b2af5a724038" style="text-align: left;">Actual VAT rate used when posting the line.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="581f883e-2bd4-4048-8a5e-902482ce8dae" style="text-align: left;">VatAccountNumber</p></td><td colspan="1" rowspan="1"><p data-id="0ebdc513-6898-4fb1-a56d-47fa8ef4045f" style="text-align: left;">Financial account number used for the line VAT.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="fb162372-8ba3-4e38-a982-f034eab2917b" style="text-align: left;">VatRate</p></td><td colspan="1" rowspan="1"><p data-id="7d3f2488-51c9-4f8e-b03e-b069a63db1f3" style="text-align: left;">VAT rate applied to the line.</p></td></tr></tbody></table>

* * *

See also the overview [SyncTool – actions](https://support.sapera.io/en/articles/547-synctool-handlinger.md).

* * *

**Want to know more?**

Read more in these related articles:

[

Standard parameters for all actions

The general parameters available on most SyncTool actions: step control, error handling, timeout, etc.

](https://support.sapera.io/en/articles/648.md)
