AbaDoc Documentation
What is AbaDoc?
AbaDoc is an XML based open format to exchange and store all kinds of documents used in ERP systems. The main document types are:
  • Bill
  • Purchase Order
  • Order confirmation
  • Delivery note
  • Offer request
  • Offer
A single AbaDoc XML file can hold any number of documents with any of the above types. For AbaDoc’s that are transmitted online it is strongly recommended to use a single AbaDoc for each document.
Main structure
Every AbaDoc has two major parts: "Package" and content. The package contains what is written on the outside of an old fashioned letter: Sender and receiver. The content is what’s inside the letter. The "Package" is recommended for everything that is transmitted online. It is mandatory for everything that is sent to AbaNet.
If the AbaDoc is used for storage etc. it is recommended to omit the "Package".
General rules
As of this version, the same part of the schema is used for all document types mentioned above. Partly because of this, most elements in the AbaDoc are optional. There is for each document type a set of elements which are required. Example: Every bill must have a "TotalAmount" element, even though in the schema it is marked as optional, because a purchase order doesn’t require a "TotalAmount". Unfortunately, there’s no schema yet to validate this against.
Some other general rules:
  • Use *only* AbaDoc’s that are well formed and valid. All others should always be rejected with an appropriate error message.
  • Encoding: UTF-8 is strongly recommended.
  • If the content of an attribute or element is zero or empty, omit it.
  • Decimal data type: For currency values, write always two decimal places (example: "1.50"), for all other decimal values: No trailing zeros. Use "0.5" instead of ".5". Generally, all "Amount" values can contain up to 4 decimal places, prices and factors up to 8.
  • Boolean data type: If you can choose between "1" or "true" and "0" or "false", make sure to use "true" and "false".
Schema data and how to work
The schema used is an xsd-schema, with all the standard W3C data types used where appropriate. There is a lot of documentation on the element level: Click on a version below and check out the "Important links" section.
It is strongly recommended that a professional tool is used to explore the schema and existing AbaDoc xml files and to make sure that the generated AbaDoc’s are well formed and valid. We recommend XMLSPY from Altova
Please store the schema location inside every AbaDoc file as in the examples provided. Also, if possible, use the same namespace information etc. as in the examples.
Versioning
The AbaDoc version consists of two elements: The major number and the minor number. The general rule is that the minor number is incremented if the change to the schema is backwards compatible. Example: A new optional element for which it’s not expected to matter much if the recipient ignores it. Therefore, If you want to make your solution more flexible, allow elements to exist even if you don’t know anything about it, if, and only if you’re sure only the minor version number has changed *and* you’re sure the sender or a middle man has already successfully checked that a particular AbaDoc XML is in fact valid.
For all other cases, the major version number is incremented.
Please include the version number inside the AbaDoc file as in the examples provided.
Examples
For each version (see links below) there are a number of examples.
Available versions and version specific documentation
Previous versions:
2.0041
2.0040
2.0034
2.0033
2.0032