Setting up Peppol in 3PL Dynamics
v26.21+ is needed
Peppol is an international network for secure data exchange of electronic business documents. The format of the files is UBL XML. Peppol is a closed network meaning only certified parties are allowed to send and receive messages on this network. To be able to send through Peppol a Peppol provider is needed. This document will explain how to setup the export of invoices in UBL XML format and how to be able to send it to a Peppol provider.
Setting up Peppol
Master data should be setup. When a Peppol file is generated BC will provide some error messages which will provide information.
The following page also provides some information about master data setup: https://learn.microsoft.com/en-us/dynamics365/business-central/across-how-to-set-up-electronic-document-sending-and-receiving
Company Info, VAT, Unit of Measure and Customers should be checked.
For the VAT and unit of measure codepages there are lists on the peppol site.
Unit of measure: https://docs.peppol.eu/poacc/billing/3.0/codelist/UNECERec20/
VAT Posting Setup (Tax Category): https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/
VAT scheme: https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/
There are two ways to create a UBL file. The first is directly in the posting of the invoice. The other one is also triggered with the posting, but uses the Business Central E-Document flows and services. E-Documents is preferable, but it depends on the way the Peppol provider implemented their solution in Business Central.
Send using Document Sending Profile
To setup the creation of the xml during posting the page "Electronic Document Formats" should have the correct codeunit for the generation of the xml.
The folowing link shows microsoft's documentation on the setup:
https://learn.microsoft.com/en-us/dynamics365/business-central/across-how-to-set-up-electronic-document-sending-and-receiving
To be able to generate correct files 3PL Dynamics has it's own replacements for the codeunits 1610 and 1611 for resectively sales invoice and credit memo. The replacements are 71540462 for the sales invoice and 72269634 for the credit memo.
There needs to be a profile for Peppol in the "Document Sending Profiles". Create a new profile.
In the field "Electronic Document" select "Through Document Exchange Service". In the field "Format" the Electronic Document Format for 3PL Dynamics which was created previously should be selected. In the API field the provider can be selected if the App/extension provided by the provider works in this way.
Send using E-Document Services and Workflows
E-Documents is a document management app provided by Microsoft:
https://learn.microsoft.com/en-us/dynamics365/business-central/finance-edocuments-overview
To be using the E-Document Flows the setup is done backwards from how the process executes.
Open the page "E-Document Services".
Here you have an option in the related menu called "Install E-Document integrations from AppSource". This will open page "Microsoft AppSource apps" with the correct filters for E-Document Service apps. Open the appsource page by clicking "View on AppSource" to check if the app is for a Peppol provider. The app can be installed on the appsource page or by clicking on the app on the page "Microsoft AppSource apps".
The page "App overview"-page which opens has a "Install App"-button.
On the E-Document Services page create a new service.
In the field "Document Format" select "3PL Peppol".
In the field "Service Integration" the just installed Peppol provider app should appear. Select this one.
Now check if the "Workflow Templates" page has the E-document templates. The category should contain two flows: "Send to multiple services" and "Send to one service". If they do not exist please click the "Reset Microsoft Templates" button in the Actions menu.
Now create a workflow in the page "Worksflows" by using the button "New Workflow from Template".
Select "Send to one service".
Click on "Send E-Document using setup:" in the "Then Repsonse" column in the lower part of the Workflow page.
Select the E-Document Service created earlier.
The invoice posting process uses sending profiles to determine what output is needed and what to do with it.
Open page "Document Sending Profiles".
Create a new profile.
In the field "Electronic Document" select "Extended E-Document Service Flow"-option.
In the field "Electronic Document Service Flow Code" select the flow created earlier.
Selecting Sending profiles and posting
On the Customer page there is a field "Document Sending Profile" field. This field may need to be added through personalization. The previously created profile can be selected here. If every customer should get a peppol file there is also the switch option Default on the Document Sending Profile. Obviously only one profile can be set as default.
To be able to create a peppol file go to a "Sales Invoices". Open an invoice. In the Actions menu navigate to Posting and choose "Post and Send..." The Sending Profile options will be suggested which can also be changed.
Notes
Testing can be done by creating a sending profile and selecting "Electronic Document" in the field Disk. Then select the format which can be created as explained above in the "Electronic Document Formats". This profile will send the output to the internet browser meaning it will end in the local download folder.