Connect Bol.com to AFAS: sales and costs into your ledger through your App connector
Bol.com and AFAS share no common language. Bol.com gives you a list of items per order, a payout that arrives later and returns in a separate overview. AFAS Profit wants an entry that arrives through an UpdateConnector, with a debtor, a ledger account and a VAT code per line. Schakel pulls your sales through the Bol.com Retailer API, converts them to the format of your connectors and writes them into AFAS with the token of your environment.
All Bol.com integrationsAll AFAS integrations
What travels across the link
Everything this connector moves between Bol.com and AFAS, and how often.
-
Sales as financial entries
Every completed Bol.com order becomes an entry in AFAS through the UpdateConnector for financial entries (FiEntries), with the order number as description. You choose which journal and ledger account apply to revenue.
-
Customers as sales relation
Buyers are created or recognised as a sales relation through an UpdateConnector for sales relations (KnSalesRelationOrg for organisations, KnSalesRelationPer for persons). Bol.com only gives you a relay address as email, so a relation stays thin: name, address and country.
-
Commission and logistics apart
From the Bol.com invoice specification, commission, shipping labels and advertising costs land on their own ledger account. Revenue stays gross and you see in AFAS what the channel really costs.
-
Returns as reversing entries
A return for which Bol.com refunds the buyer arrives as a reversing entry in AFAS. Bol.com has several handling results and only some refund the buyer; only those are credited.
-
How AFAS talks: the API in short
AFAS works with a REST service per environment (production, test and accept), a token in the Authorization header and only the connectors you activated in the App connector. There are no webhooks, so Schakel polls. Without skip and take AFAS returns the first 100 rows, and a business-rule error comes back as HTTP 500 with the text in the X-Profit-Error header.
-
Worked example (fictional)
Example: an order of 48.40 euro incl. 21% VAT becomes 40.00 revenue and 8.40 VAT. Bol.com withholds, say, 4.84 commission incl. VAT: 4.00 cost plus 0.84 input VAT, booked on the cost account. If the buyer returns it, a reversing entry of 48.40 follows. The amounts are invented to show the principle.
Where each Bol.com field ends up in AFAS
This is the layout we follow. You read the exact field names in AFAS from the metainfo of your own environment, which can differ per setup.
Order
orderId
Description of the financial entry
Order date
orderPlacedDateTime, in Amsterdam time
Entry date, so an order at 23:30 falls in the right quarter
Buyer
billingDetails with name, address, country and optionally VAT number
Sales relation (KnSalesRelationOrg or KnSalesRelationPer)
Item line
orderItems with EAN, quantity and price incl. VAT
Detail line on the revenue account, VAT code per line
Shipped or cancelled
quantityShipped and quantityCancelled
Only shipped units go into the entry
Commission
Invoice specification, line COMMISSION
Cost account for commission, apart from revenue
Shipping label and ads
Lines such as PLAZA_RETURN_SHIPPING_LABEL and SPONSORED_PRODUCTS_ADS
Own cost account per type
Return
Return with handling result, for example RETURN_RECEIVED
Reversing entry, only for a result where Bol.com refunds
In the Bol.com invoice specification costs are positive and turnover is negative. Schakel flips that, so a cost account in AFAS simply shows a cost.
What Bol.com to AFAS saves you
- No more turning a Bol.com export into an import file for AFAS.
- Only the connectors you activate are used, the rest of your environment stays closed.
- Commission and return costs sit apart from revenue, so your margin is right.
- Every error from AFAS can be read back in the log, with the text from AFAS itself.
Setting it up
- 01
Connect Bol.com
You create a Client ID and Client Secret for the Retailer API in your Bol.com seller account and paste them into Schakel. The connection is tested right away.
- 02
Create an App connector in AFAS
In AFAS you create an App connector, activate the UpdateConnectors for financial entries and sales relations and generate a token. The token cannot be viewed afterwards, so you hand it to Schakel straight away.
- 03
Assign journal, accounts and VAT
You choose the journal, the ledger accounts for revenue and costs and the VAT codes as you use them in AFAS. The field names of each connector are in the metainfo of your environment, and we follow those.
- 04
Check the first entries
You first see a few entries for review. After that new sales keep flowing, and errors show up in the log with the AFAS message attached.
What you need
- A Bol.com seller account with a Client ID and Client Secret for the Retailer API
- An AFAS Profit environment with an App connector and a token
- The UpdateConnectors for financial entries and sales relations activated in that App connector
Not sure how to get those keys? Step by step:
Where it runs
On app.schakel.app, with your own Schakel account. No webshop required.
Then from €10 a month billed yearly, or stay on free. See the tiers
Start freeNeed this exact integration, or something it does not do yet? Tell us what you need and we reply within 24 hours.
Related connections
Connect a different pair
Bol.com and AFAS is one of many. Pick two systems and see what travels between them.
Common questions
Is the Bol.com to AFAS connector available?
Request this connector and get access. You let us know you want to link Bol.com to AFAS, and we make sure you can get started. You hear from us within 24 hours.
How do I create the token in AFAS?
You create an App connector, pick the UpdateConnectors in it and create a token on the user-tokens tab. AFAS shows the token only once. If you lose it, you create a new token and replace the old one.
Why do I get a 401 or 400 error from AFAS?
Usually the environment number, the environment type or the token is wrong, or the connector is not switched on in the App connector. AFAS gives the same kind of error code in all those cases, so check those three points first.
Can I try in a test environment first?
Yes. AFAS has separate addresses for production, test and accept. You can run the connector on test first and then enter the address and token of production.
Why do entries not arrive instantly?
AFAS has no webhooks, so Schakel asks periodically what is new. Schakel also books an order only once every unit is shipped or cancelled, so a cancelled unit never needs a credit entry. An entry therefore follows shipment.
What does the connector do with Bol.com Belgium?
Sales to Belgian buyers arrive with the buyer country on the relation and with the VAT code you assigned for that in AFAS. Which code that is depends on whether you use OSS, so you set that when you configure it.
Can you connect Bol.com to AFAS?
Yes. Schakel connects through the official APIs of Bol.com and AFAS, so you install nothing on your own server and nothing travels outside those two parties.
Which VAT rate do my sales get in AFAS?
The rate is set per line: 21%, 9% or 0%. Sales to Belgium and other EU countries get the rate of the destination country, ready for your OSS return.
Missing something you need?
Tell us what Bol.com and AFAS should do for you. If it is not in here yet, that is usually because nobody has asked. We reply within 24 hours.