Overview
Addons in GOBL have a similar objective to namespaces in XML documents, but with super-powers; they provide additional normalization methods, validation rules, and extension definitions, alongside scenarios and tags, that augment the basic functionality of the GOBL document.
When an addon is applied to a GOBL document that supports them, the calculation and validation steps will automatically use all the addon’s specifications to ensure that all the data complies with whatever is required by the standard or format represented.
A great example of this is the mx-cfdi-v4
addon. When applied to an invoice, it will automatically ensure that any extensions and validation rules are performed, so that document can subsequently be processed by a conversion tool into the local XML CFDI format, in the case, gobl.cfdi.
The key advantage with addons is that the original content of the GOBL invoice is still intact, maintaining the global compatibility, but ensuring that any local or format restrictions are accounted for.
Support for addons was included in the v0.200.0
release of GOBL.