Invoice Coding Integration Guide
To integrate Kaunt into your ERP workflow you need to continuously 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
Any ids in the API prefixed with External is an id expected to reside from the client's system. An example of such an id is ExternalInvoiceId which is expected to be unique within a company.
The ExternalInvoiceId is the primary key Kaunt uses to identify invoices within a company. If you upload a new invoice with the same ExternalInvoiceId as an existing one, the existing invoice will be silently replaced — the old data is overwritten and cannot be recovered. This applies to both posted invoices and invoice coding proposals.
Make sure your integration generates a truly unique ExternalInvoiceId for every invoice. This is especially important if your ERP system does not have a natural unique invoice identifier — you must construct one (e.g. by combining document number, vendor ID, and fiscal year).
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 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.