Best Practices for Sales Invoice Integration

This guide describes best practices to consider when you plan a new sales invoice integration. Use this guide when you want to import sales invoices to the Netvisor sales ledger so that you can track them in accounts receivable.

If you do not need to track invoices in accounts receivable, and you do not need to send the invoices to customers, you can import only accounting vouchers to bookkeeping instead.

Update customer and product details first

Before you import sales invoices or sales orders through the API, the customers and products on them must already exist in Netvisor.

Customer and product details on an imported sales invoice or order do not create new customers or products in Netvisor. They do not update existing details either. To create and update customers and products, use the separate resources for them. Always do this before you import invoices or orders.

For details, see:

We recommend these practices:

  • Create a separate card for each customer and product in Netvisor.

  • Link customers and products to sales invoices with the Netvisor ID. This is the value of the NetvisorKey field that the API returns.

  • Before you import a sales invoice, check that the customers and products on it exist in Netvisor. If they do not, create them first.

Decide where to manage customers and products

Decide whether you manage the customer and product registers in Netvisor or in the integrated system.

  • Registers managed in Netvisor: The integration only needs to retrieve customer and product details from Netvisor. Use the resources customerlist.nv, productlist.nv, getcustomer.nv and getproduct.nv.

  • Registers managed in another system: The integration must create new customers and products and update changes to existing ones through the API. Use the resources customer.nv and product.nv.

Importing invoices

Invoice numbering

Decide which system creates the invoice numbers. If invoices are created in several systems, each system must use a different range of invoice numbers.

When you transfer sales invoices from another system to Netvisor, you can use either the invoice number from Netvisor or the invoice number from the other system. The right choice depends on your use case.

If the other system gives the invoice numbers and you also create sales invoices in Netvisor, note the following:

  • An invoice created in Netvisor always gets the largest free invoice number automatically.

  • If an invoice number is already in use in Netvisor, you cannot import the same number through the API. The import fails with an error.

To avoid the error, change the number of an invoice that you create in Netvisor to a much larger number. The next invoice created in Netvisor then gets the next number after it.

Example:

  1. The other system gives the invoice number 100, and the invoice is transferred to Netvisor.

  2. You create an invoice in Netvisor. While it is still unsent, you change its number to 1000000.

  3. The next invoice created in Netvisor automatically gets the number 1000001.

The invoice numbers from 100 to 999999 stay free for the other system.

Invoice status

You can import invoices through the API in Unsent or Open status.

  • Unsent: Choose this status if you plan to send the invoices from Netvisor. You can then send the invoices automatically and still edit them before sending. The Unsent status also lets you send invoices to factoring.

  • Open: Choose this status if the invoices have already been sent from another system.

Customer details on the invoice

If you import only the invoicingcustomeridentifier element, the invoice uses the address details from the customer card in Netvisor. If the sales invoice message contains other customer details, the invoice uses them instead of the customer card details.

Note that the e-invoice standard requires complete postal address details for the customer. Without them, the invoice cannot be sent as an e-invoice.

Invoice amount

If you import the invoice amount in the SalesInvoiceAmount element, Netvisor always uses the imported amount. The only exception is an amount of zero or an empty element. In that case, Netvisor calculates the amount from the invoice lines.

Pay special attention if you import SalesInvoiceAmount but not the line totals. Netvisor then calculates the line totals from the unit price and the quantity and rounds them to two decimals. This can cause a rounding difference between the imported invoice amount and the amount that Netvisor calculates from the lines. The customer always sees the imported SalesInvoiceAmount as the amount to pay.

We recommend this:

  • Unsent invoices: Import SalesInvoiceAmount as an empty element or with the value 0. Netvisor then calculates the amount from the invoice lines.

  • Open invoices: Import the final, calculated total in the SalesInvoiceAmount element.

Voucher for the invoice

We recommend that you let Netvisor create the voucher for the sales invoice. If the sales invoice message does not include voucher lines (the invoicevoucherlines aggregate), Netvisor creates the voucher automatically.

If you import the voucher with the sales invoice message, note that a voucher on an Unsent invoice prevents editing the invoice in Netvisor.

Credit notes

Decide where you create credit notes and match them to invoices. You can import a credit note through the API and match it to the original invoice with the matchcreditnote.nv resource. For details on importing credit notes, see Import sales invoice or order salesinvoice.nv.

To decide if invoices accept partial payments, see Partial payments below.

Handling payments

Decide how you handle payments.

Changing the status to paid is not enough

A sales invoice is marked as paid only when it has payments. If you only change the status of the invoice to paid, the invoice stays open in reconciliation and does not match the bookkeeping balance. Netvisor treats the invoice as paid only when the payments on it equal the invoice amount.

If you import payments through the API, see also Sales invoices, orders and payments in general.

Partial payments

When you import invoices through the API, decide in the sales invoice message if the invoice accepts partial payments. Use the expectpartialpayments element. The value 1 allows partial payments.

If partial payments are not allowed, a sales payment must match the invoice amount exactly, to the cent. Otherwise, the payment stays in unmatched reference payments, and someone must match it manually.

Partial payments are not allowed by default

By default, a sales invoice imported through the API does not accept partial payments. This applies even if partial payments are allowed in the company's Netvisor settings.

Consumer e-invoicing

If you plan to send invoices to private customers as consumer e-invoices, note these limitations:

  • You cannot import consumer e-invoice addresses to the customer card through the API.

  • You cannot edit or delete consumer e-invoice addresses through the API.

  • Consumer e-invoice addresses always arrive in Netvisor through the bank's web service (WS) channel.

  • An address is removed from the customer card when a removal notification arrives through the bank's WS channel. In practice, the customer cancels the e-invoice agreement in their own bank.

To send consumer e-invoices from Netvisor:

  1. Enable consumer e-invoicing in Netvisor as described in Consumer e-invoicing.

  2. Send the billing notifications.

  3. The invoice recipients make an e-invoice agreement in their online bank.

  4. The agreement creates a receipt notification. It arrives in Netvisor through the bank's WS channel and is linked to the customer's card.

  5. You can now send sales invoices to that customer as consumer e-invoices.

Factoring

If you use factoring for sales invoices, enable factoring in Netvisor as described in Factoring billing. The same guide lists the factoring companies that Netvisor supports.

If you use a factoring company that Netvisor supports:

  • Import the sales invoices in Unsent status. When the invoices are sent, Netvisor also sends the factoring notification to the bank.

  • You do not need to import factoring agreement numbers or similar details with the invoices. Netvisor adds the agreement numbers to the factoring notification automatically, based on its settings.

  • Factoring allows invoice numbers of at most 8 characters. Take this into account in your invoice numbering.