Skip to main content

Invoice Coding Integration Guide

To integrate Kaunt into your ERP workflow you need to contionusly upload data to the Kaunt API. The data consists of:

  • Posted Invoices
  • Postings
  • Invoices

The way Kaunt works is, that based on your historical invoices combined with the relevant postings, the Kaunt AI-algorithm learns how future invoices that are similar to the historical should be handled. In order for Kaunt to work as optimal as possible a steady flow of PostedInvoices and Postings should be uploaded regularly.

In the following the upload of data is described in details from the Initial Data Load as well as the Ongoing Data Load, to the Invoice Coding Proposals Flow.

Entity Identification

np Any ids in the API prefixed with External is an id expected to reside from the client's system. An examples of such an id is ExternalInvoiceId which is expected to be unique. Internally, the Kaunt API checks the uniqueness of each invoice based on the ExternalInvoiceId you provide. If you send multiple invoices with the same ExternalInvoiceId, only the most recent one will be used. Therefore, it's crucial to generate a unique key for each invoice you send to the API, especially if you don't have a unique invoice id in your system.

Matching Postings And Posted Invoices

When matching Postings with PostedInvoices it is crucial to ensure that the ExternalInvoiceId field in the Posting matches the ExternalInvoiceId field in the PostedInvoice entity as the invoice cannot otherwise be linked to the Posting.

Initial Training Data Load

In order to start creating proposals on your invoices you must upload your historical data, preferably for the past 2 years. The historical data represent how you previously have posted your invoices.

After the initial training data load, Kaunt will train an algorithm based on artificial intelligence, trained to predict accounting information for new invoices. When the algorithm has been trained, Kaunt is ready to deliver accounting information on new invoices.

Historical data consists of, preferably, two years worth of data containing the following:

  • Posted Invoices (PostedInvoices)
  • Postings (Postings)

Ongoing Training Data Load

The Kaunt algorithm is only as good as the data it is fed with. In order to keep the AI algorithm up-to-date it is important that the training data is up-to-date and therefore, the PostedInvoices and the Postings should be uploaded regularly - preferably as soon as they appear in your ERP system. At least once a week.

It is also important to keep the Dimensions and DimensionValues up-to-date thus making a PATCH-request whenever a Dimension or DimensionValue is closed/deleted in the ERP system.

Invoice Coding Proposals Flow

When an invoice is submitted to Kaunt via the InvoiceCodingProposals endpoint, the Kaunt AI algorithm starts to process the invoice. The API is asynchronous, meaning that the result will not be included in the initial response. Instead, the client has to periodically send a GET request to fetch the invoice coding proposal and see if it has been updated. Alternatively, clients can subscribe to a webhook notification to be notified when the invoice coding proposal is ready to for retrieval. See the Webhooks section for more information.

Existing Accounting Rules?

If you already have existing rule-based solutions for invoice coding, to fully leverage the benefits of Kaunt, we recommend either disabling the existing rules or integrating them with the InvoiceCodingProposal from Kaunt. In this integration, prioritize the proposal from Kaunt over your existing rule-based accounting.