Integration

Connect WooCommerce to AFAS: orders and customers in your Profit environment, without duplicate relations

A WooCommerce shop and AFAS Profit come from two worlds. The shop runs on your own WordPress and calculates amounts per line; AFAS is an ERP that only lets in what comes through an activated UpdateConnector. The hardest step is not the entry but the customer: AFAS cannot add and change in one REST call, so it first has to be established whether the relation already exists. Schakel reads your orders with read rights from WooCommerce and does that check before anything lands in AFAS.

InvoicesContactsVAT

All WooCommerce integrationsAll AFAS integrations

Start free Free to start · 30 days unlimited
The link

What travels across the link

Everything this connector moves between WooCommerce and AFAS, and how often.

  1. First look up, then add or change

    In REST a POST adds and a PUT changes; doing both in one call is not possible. Schakel therefore looks the customer up first and then picks the right method, so a returning customer does not get a second sales relation.

  2. Orders as financial entries

    An order becomes a financial entry (FiEntries) with a line per product, on the journal and revenue account you choose. Shipping and coupon codes get a line of their own.

  3. Tax-exclusive amounts as the basis

    WooCommerce shows prices incl. or excl. VAT depending on how your shop is set up, but the amounts per line in the API are always excl. tax. Schakel calculates from those and adds the tax per rate, so it does not matter how your shop displays the price.

  4. Accents and special characters

    AFAS wants special characters as UTF-8; otherwise a question mark appears instead of an é or ü. Names like Zoë or Müller therefore stay intact in your sales relations.

  5. How AFAS talks: limits worth knowing

    A call times out after about fifteen minutes, a filter in the URL may be at most 2048 characters and a fair-use policy applies: whoever pulls the same 15 MB of data every minute is asked to get in touch. Business-rule errors come back as HTTP 500, with the text Base64-encoded in the X-Profit-Error header.

  6. Worked example (fictional)

    Example: two products of 20.00 excl., 6.00 excl. shipping and a coupon of 4.00 excl., 21% on all of it, gives 42.00 excl. and 8.82 VAT, so 50.82 incl. In AFAS there are three lines and the relation already existed, so a PUT follows instead of a POST. The amounts are invented.

Field mapping

Where each WooCommerce field ends up in AFAS

You read the field names in AFAS from the metainfo of your own environment; this is the layout.

Order number

WooCommerce

number of the order

AFAS

Description of the financial entry

Customer

WooCommerce

billing with name, company, address and country

AFAS

Sales relation, looked up first, then POST or PUT

Email

WooCommerce

billing.email

AFAS

Email address of the relation and key to recognise it

Product line

WooCommerce

line_items with subtotal excl. tax

AFAS

Line on the revenue account

Shipping

WooCommerce

shipping_lines

AFAS

Own line on the shipping account

Coupon

WooCommerce

coupon_lines

AFAS

Negative line on the discount account

Tax

WooCommerce

tax_lines per rate

AFAS

VAT code per line

Refund

WooCommerce

refunds with amount

AFAS

Reversing entry in the same connector

What you get out of it

What WooCommerce to AFAS saves you

  • A returning customer does not get a second relation in AFAS.
  • It does not matter whether your shop shows prices incl. or excl. VAT.
  • Names with accents arrive correctly.
  • Schakel cannot change anything in your WooCommerce shop.
In four steps

Setting it up

  1. 01

    Connect WooCommerce with read rights

    You enter your shop address and click Approve in your own WordPress. Schakel gets read access to orders, customers and products. Do not leave permalinks on Standaard, or we will not find the REST API.

  2. 02

    Create the App connector in AFAS

    You create an App connector, activate the UpdateConnectors for financial entries and sales relations and create a token. You give that token, the environment number and the environment type (production, test or accept) to Schakel.

  3. 03

    Choose journal, accounts and VAT

    You choose the journal, the revenue accounts and the VAT codes. The field names of each connector are in the metainfo of your environment.

  4. 04

    Check and let it run

    You see the first entries in the overview before they go through. After that new orders follow and the AFAS message is in the log.

What you need

  • A WooCommerce shop on https, reachable from the internet, with permalinks not on Standaard
  • An AFAS Profit environment with an App connector, a token and the needed UpdateConnectors activated

Not sure how to get those keys? Step by step:

Where it runs

Inside your Shopify admin, as an app. You sign in through Shopify, no separate account.

Free to start

Then from €10 a month billed yearly, or stay on free. See the tiers

Start free

Need this exact integration, or something it does not do yet? Tell us what you need and we reply within 24 hours.

Another pair

Connect a different pair

WooCommerce and AFAS is one of many. Pick two systems and see what travels between them.

Systems · 183
From
To

Common questions

Is the WooCommerce to AFAS connector available?

Request this connector and get access. You let us know you want to link WooCommerce to AFAS, and we make sure you can get started. You hear from us within 24 hours.

Why can I not connect to my shop?

Usually the permalinks are still on Standaard. Set them in WordPress under Instellingen and Permalinks to, for example, Berichtnaam. Also check that the shop runs on https and is reachable from the internet.

Why does AFAS return a 500 error?

That is a message from a business rule in AFAS, for example a missing account. The text is Base64-encoded in the X-Profit-Error header; Schakel decodes it and puts the message in the log.

Can I practise on a test environment first?

Yes, AFAS has a test environment and an accept environment with their own addresses. Set up the connector there, check the first entries and then replace the address and token with those of production.

What does Schakel do if a customer is deleted in WooCommerce?

The entry uses the data on the order itself, so a deleted customer account breaks nothing. A guest without an account works the same: name and address come from the order.

Are stock or product details updated as well?

No. Schakel writes nothing to WooCommerce and sends only orders, customers and refunds to AFAS. You manage stock and products in your shop or in AFAS itself.

Can you connect WooCommerce to AFAS?

Yes. Schakel connects through the official APIs of WooCommerce 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 WooCommerce 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.