1. Introduction

1.1. Country specific validation rules

The Peppol BIS Billing v3 allows for validation rules which are triggered based on the country code of the supplier, and which is not in conflict with any other rules for the profile or transaction.

By "country code of the supplier" is meant (in prioritised order)

  1. the country code prefixing the Seller VAT identifier (BT-31)

  2. The country code prefixing the Sellers Tax Representative VAT identifier (BT-63)

  3. The seller country code (BT-40)

Country-qualified rule sets can be added to the Peppol BIS on request from the Peppol Authority of the specific country. The Peppol Authority is responsible for the development, testing and maintenance of the rules. The country specific rules makes it possible to use the Peppol BIS without the need of creating a country specific CIUS. The same specification and validation rules can be used by all Peppol users and no need to specifically identify the customization neither in the XML message or in the SMP-registration.

The below diagram shows a simplified view of the validation steps. An invoice issued by a Swedish supplier goes through all validation steps but only invokes the country specific rule sets which is intended for Swedish suppliers.

Validation stages

2. Development procedure

  • The Peppol Authority who wish to include country specific rules notifies the PoAcc CMB, following the deadlines for the release schedule of PoAcc.

  • The Peppol Authority must ensure to only add rules that are valid for ALL invoices and credit notes in the specific county, both B2G, B2B and B2C.

  • The Peppol Authority must ensure that the suggested national rules does not affect other countries, and it must not be in conflict with the any other rules for the profile/transaction.

  • The Peppol Authority create sets of test files which triggers each rule with positive and negative outcome.

  • The Peppol Authority documents and tests the country specific rule set.

  • The Peppol Authority must have resources available to make adjustments to the rules if issues are found during the review and test process in Peppol.

3. Documentation of rules

The following artefacts are needed for the CMB to approve national rules:

  • A list or table with the following information about the rule(s)

    Rule-ID

    Unique number for each rule. Format should be Country code - R - Sequential number such as SE-R-001.

    Type

    The type defined in the EN (table in chapter 7.3.2 of EN16931)

    Applicable for supplier Country Code

    The country code of the supplier which is used as part of the context for when the rule is triggered

    Rule statement

    The assertion/rule in natural language.

    Severity

    level of severity to flag when the rule is violated. Fatal or Warning.

    Comment

    any additional explanatory text.

  • Schematron file(s) (See Schematron implementation considerations)

  • Test files (See Test files)

4. Schematron implementation considerations

The existence of country code of the supplier must be part of the context statement, for this purpose, parameter supplierCountry has been added to the schematron file and can be used for the national rules.

Schematron example
<rule context="cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID[$supplierCountry = 'SE']"> (1)
        <assert id="SE-TR-001" test="(string-length(.) = 10)" flag="warning">Swedish organisation numbers consist of 10 characters.</assert>
</rule>
1 The rule is only triggered if the country code is SE

5. Test files

Test files for each national rules must be present in the deliverable from the Peppol Authority in order to have the national rules approved.

The test files should include both positive and negative tests, meaning tests that both fire the rule, and tests where the rule is not fired.

All rules must have at least one test where it is demonstrated that the rule(s) do not fire for other countries.