Netvisor Sales invoice flow examples

Number of APIs: 12

Sales invoice flow

This collection contains two sales invoice flow examples. The first flow example demonstrates basic sales invoice integration where invoice sending and accounting receivables are handled in Netvisor. The second flow example covers how to handle e-commerce sales and prepayments in Netvisor.

In short the first flow check if the customer and/or product(s) already exist in Netvisor and if not, create it. After that the sales invoice is posted to Netvisor and integration check the status of the sales invoice is it paid or not. The second flow is otherwise the same, except that at the end of flow the salespayment will be posted to Netvisor.

Notice that this flow is only example how to use resources, it doesn't have any automations.

Needed resources:

FYI

  • STATUS salesinvoicestatus The status of the invoice depends where sales invoice will be sent to customer. When sales invoice is sent from Netvisor, the status is unsent. If sales invoice is sent to customer from other system before sending to Netvisor, the status is open.
  • NUMBER salesinvoicenumber Invoice number is not mandatory. If it's not set, Netvisor will add the next highest free number to the sales invoice automatically. If customer needs own sales invoice number serie for these invoices, it is possible to add new auxiliary trade name in Netvisor and use this in sales invoice XML request, element secondname
  • REFERENCE salesinvoicereferencenumber Reference number is not mandatory. If sales invoice is sent to the customer from other system, add the same reference number to the XML that customer payments are handled automatically to the sales invoice in Netvisor. Otherwise Netvisor will add the reference number automatically.
  • AMOUNT salesinvoiceamount The amount of the salesinvoice is mandatory, but it is possible to add it as an empty element. In this case Netvisor will calculate the amount of the sales invoice from product lines. Note that it is possible to add different sales invoice amount than the total amount of the product lines.

Errors

The most common error messages:

DUPLICATE_DATA :: Overlapping data. Customer code already being used: xxx

You are trying to add customer with same customer code which already exist in Netvisor. If your need is to edit existing customer, use method edit instead. /customer.nv?method=edit&id=X

DUPLICATE_DATA :: Overlapping data. Invoice/order already found with the entered number, number: X

There is already invoice/order in Netvisor with this number. Salesinvoice number must be unique.

INVALID_DATA :: Data form incorrect:. Customer not found: X

The customer is not found in Netvisor which is in salesinvoice request.

INVALID_DATA :: Data form incorrect:. Product not found: 14442

Same as the above, but for the product.

INVALID_DATA :: Data form incorrect:. Invoice date: Invoice cannot be saved in a locked period

Check that there is financial period for the invoice date and/or VAT locking in Netvisor.

  1. Add new sales invoice and check status - customerlist.nv Get customerlist GET {{host}}/customerlist.nv?keyword=abc123456675

  2. Add new sales invoice and check status - customer.nv Add new customer POST {{host}}/customer.nv?method=add

  3. Add new sales invoice and check status - productlist.nv Get productlist GET {{host}}/productlist.nv?keyword=TP1,TP2

  4. Add new sales invoice and check status - product.nv Add second new product POST {{host}}/product.nv?method=add

  5. Add new sales invoice and check status - salesinvoice.nv Add salesinvoice POST {{host}}/salesinvoice.nv?method=add

  6. Add new sales invoice and check status - salesinvoicelist.nv Check status once a day GET {{host}}/salesinvoicelist.nv?invoicestatus=open

  7. Add new sales invoice and payment - customerlist.nv Get customerlist GET {{host}}/customerlist.nv?keyword=abc123456675

  8. Add new sales invoice and payment - customer.nv Add new customer POST {{host}}/customer.nv?method=add

  9. Add new sales invoice and payment - productlist.nv Get productlist GET {{host}}/productlist.nv?keyword=TP1,TP2

  10. Add new sales invoice and payment - product.nv Add second new product POST {{host}}/product.nv?method=add