Introduction
If you run King ERP by Björn Lundén, you send your invoices from Catermonkey straight to King. You choose how: if King does your invoicing, every invoice arrives as a sales order that King invoices under its own number. If you already send your invoices from Catermonkey, the connection books them under their Catermonkey number in your sales day book. Either way, Catermonkey adds the customer to King as a debtor, and VAT and revenue land on the codes and accounts you choose.
What you need. The King connection is a separate module at €19.50 a month, switched on under Settings > Integrations. It works with King ERP (King 5) that has King Webservices installed; your King administrator or King partner does that on your own King server. Catermonkey must be able to reach that address over the internet, preferably over https.
Step 1: have your King administrator enable the webservices
In King, your administrator goes to Diversen > Vaste gegevens webservices and sets one access code on each of these webservices: Webservice_Test, Debiteur_ToevoegenWijzigen, Order_Toevoegen, Order_OrderRegel_Toevoegen, Order_LockVrijgeven, Order_Wijzigen, Order_Verwijderen, Boekingsgang_Toevoegen, Boekingsgang_Journaalpost_Toevoegen, Boekingsgang_Journaalpost_Journaalregel_Toevoegen, Boekingsgang_Journaalpost_Verwijderen and Boekingsgang_Afsluiten. A webservice without an access code is switched off in King.
Your administrator gives you three things: the King Webservices address (with protocol and port, for example https://king.yourcompany.com:8082), the administration code and the access code.
Step 2: enter the connection and test it
Go to Settings > Integrations, open King and fill in King Webservices address, Administration and Access code. Click Save and test connection. Catermonkey saves your details and asks King for a test reply; when that works you see "Connected: King Webservices accepted the access code."
If the address starts with http:// rather than https://, Catermonkey warns you: the access code then travels unencrypted. Use https when your King server supports it.
Step 3: choose who invoices
The checkbox Invoice from Catermonkey, and only send the sales bookings to King decides what King receives:
Unchecked (default): King invoices. Every invoice becomes a sales order in King, with one order line per product and the product name as the text on the invoice. King invoices the order under its own invoice number, so do not send the invoice from Catermonkey as well.
Checked: you invoice from Catermonkey. The invoice becomes a booking in your sales day book under its Catermonkey invoice number, with a debtor line and, per revenue group and VAT rate, a revenue line with its VAT. The booking is provisional, so your bookkeeper reviews it in King before it becomes definitive.
With Use the customer code as debtor number, the Catermonkey customer code is sent as the debtor number. A debtor that already exists in King under that number is updated rather than created twice. Without it, King picks a debtor number itself; Catermonkey remembers that number with the customer for the next export.
Step 4: map your VAT rates
Under VAT codes, enter the King VAT code for every VAT rate you invoice with, as it appears in King. An invoice with a rate that has no code is not exported: Catermonkey tells you which rate on which line still needs a code.
Step 5: fill in the details for your way of working
If King invoices (checkbox unchecked):
Warehouse: the number of the King warehouse the orders are created in.
Order lines as: Tariffs (TAR) or Articles (ART). Tariffs need no stock; choose articles when your articles in King keep stock.
Article or tariff number: the King article or tariff an order line goes on. Optionally use a different article or tariff per revenue group.
Release orders for invoicing: approves the order in King and releases it for invoicing straight away.
If you invoice from Catermonkey (checkbox checked):
Day book: the code of the King sales day book.
Fiscal year: the code of the fiscal year; leave empty to use the year of the invoice date.
Revenue account: the general ledger account for revenue, and optionally an account of its own per revenue group.
Book as definitive: leave unchecked to book provisionally.
Click Save changes.
Step 6: export an invoice
Open an invoice. In the King card, click Export to King. Catermonkey saves the invoice, adds the customer to King as a debtor and creates the sales order or the booking. You see straight away what King now holds: the order number, or the number of the booking run. After that the button is disabled: an invoice goes to King once.
When you book from Catermonkey, the invoice needs an invoice number first: a draft invoice cannot be booked.
Frequently asked questions
King refuses the invoice. What now? Catermonkey shows the reason King gives, for example a missing article or a closed period. An order or booking that was half created is removed again by Catermonkey; the message tells you whether that worked. Adjust the settings or the invoice and export again.
Can I export an invoice twice? No. After a successful export the button is disabled, so an invoice does not end up in King twice as an order or a booking. To send it again, remove it in King first and ask us to release the export.
What happens to a credit invoice? A credit invoice goes across the same way. As a sales order its lines carry a negative quantity; as a booking, debit and credit swap sides, so the revenue and the VAT are reversed.
Which invoice number does the customer get? If King invoices, King assigns its own invoice number and you send the invoice from King. If you book from Catermonkey, the Catermonkey number stays the one that counts: the booking in King carries that number.
My King server is not open to the internet. Then Catermonkey cannot reach it. Ask your King partner to make King Webservices reachable over https, or to set up a tunnel to our servers. An address on your own network (such as 192.168.x.x) is not accepted.
What if a revenue group has no article or account of its own? Then Catermonkey uses the default article or the default revenue account you entered in the settings. If that is missing too, the invoice is not exported and Catermonkey tells you which revenue group still needs one.

