(AUT) Set up parameters to generate electronic invoices in PEPPOL format

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Applies To: Microsoft Dynamics AX 2012 R3

This topic explains how to set up the following parameters that are required to generate and send electronic invoices (eInvoices) in the Pan-European Public e-Procurement On-Line (PEPPOL) format:

  • Folder structure for eInvoicing

  • Outbound ports in Microsoft Dynamics AX Application Integration Framework (AIF)

  • Batch processing to generate eInvoices periodically

Prerequisites

The following table shows the prerequisites that must be in place before you start.

Category

Prerequisite

Related setup tasks

  • Set up the inventory units according to the United Nations Center for Trade Facilitation and Electronic Business Information Content Management Group (UN/CEFACT ICG) standards in the Units form. For more information, see Units (form) and External codes (form).

  • Set up a batch group that is used in batch processing to convert the invoice XML files to PEPPOL files. For more information, see Batch groups (form).

  • Set up recurrence for batch jobs using the Recurrence form. For more information, see Recurrence (form).

1. Set up a folder structure for eInvoicing

Set up folders to save error messages and invoices in the XML format and the PEPPOL format. The folders must be set up in a shared location that can be accessed from the Application Object Server (AOS) computer and from any client computers that are used as batch servers in your system.

Set up the following folder structure for sales invoices.

Folder name

Purpose

Path

Error

To save error messages that are generated when the XML file is converted to PEPPOL format.

\\Server\PEPPOL\Sales\Error

Processed files

To save documents after they are processed. The documents are moved from the source folder to this folder.

\\Server\PEPPOL\Sales\Processed files

Source

To save the invoices that are generated by Microsoft Dynamics AX in the XML format.

\\Server\PEPPOL\Sales\Source

Target

To save the invoice in PEPPOL format after the invoice in the XML format has been processed.

\\Server\PEPPOL\Sales\Target

XSLT

To store the eProjectInvoice.xsl and eSalesInvoice.xsl files, which are used to convert the eInvoices in the XML format to the PEPPOL format.

\\Server\PEPPOL\Sales\XSLT

Note

You can make similar folders for project invoices. For example, \\Server\PEPPOL\Project\Error.

2. Create outbound ports in AIF for eInvoicing

You can create an outbound port, configure the services and adapters for the outbound port, and specify the Microsoft Dynamics AX Application Integration Framework (AIF) settings that are required to generate the PEPPOL eInvoices.

You must scan for new adapters and services before you configure outbound ports for the first time. The port configuration is affected when there is a change in the Application Object Tree (AOT). You must also perform these scans each time a change that affects the port configuration is made to the AOT. For information about how to configure the enhanced integration port, go to Managing integration ports.

To create an outbound port in Microsoft Dynamics AX Application Integration Framework (AIF) for eInvoicing, follow these steps:

  1. Click System administration > Setup > Services and Application Integration Framework > Outbound ports.

  2. Create an outbound port and enter the Port name and Description for the outbound port.

  3. In the Adapter field, select File system adapter. This adapter is used to create and save the PEPPOL eInvoices.

  4. In the URI field, specify the location of the source folder where you want to save the sales invoices.

  5. On the Service contract customizations FastTab, click Service operations.

  6. In the Select service operations form, select and move the SalesSalesEInvoiceService.read, SalesSalesEInvoiceService.getKeys, and SalesSalesEInvoiceService.getChangedKeys service operations to the Selected service operations list to make the sales invoices available for use by the port. Close the form.

  7. Select the Customize documents check box, and then click Data policies.

  8. In the Document data policies form, click Enable all to select all XML schema elements, and then close the form.

  9. Click the Processing options FastTab, and then in the Default encoding format field, select UTF-8.

  10. Select the Apply value mapping check box, and then click Value mapping to open the Value mapping form. You can define the values, such as item number, customer account number, vendor account number, terms of delivery, and unit for the outbound port. Close the form. For more information, see Value mapping (form).

  11. Click the Troubleshooting FastTab, and then in the Logging mode field, select All document versions.

  12. Optional: On the Security FastTab, in the Restrict to company field, select the legal entity for which the outbound port is exclusively available.

  13. Click Activate to use the port to send eInvoices by using Microsoft Dynamics AX Application Integration Framework (AIF).

Repeat steps 2 through 13 to create an outbound port for project invoices. In the URI field, specify the source folder for the project invoices, and select ProdProjEinvoiceService.Read, ProdProjEInvoiceService.getkeys, and ProdprojEInvoiceService.getChangedKeys in the Select service operations form.

3. Set up batch processing for eInvoicing

Use the Batch job form to set up batch processing for PEPPOL eInvoicing. You can process eInvoices by using batch jobs. For more information, see Batch processing overview.

You must set up a batch job for sales eInvoices, and another batch job for project eInvoices.

  1. Click System administration > Inquiries > Batch jobs > Batch jobs.

  2. Create and save a batch job, and then click View tasks.

  3. In the Batch tasks form, create three batch tasks that use the following class names:

    • AifOutboundProcessingService

    • AifGatewaySendService

    • EInvoiceFileTransform_OIOUBL

  4. Select the legal entity and the batch task that uses the EInvoiceFileTransform_OIOUBL class name, and then in the Batch group field, select a batch group.

  5. Click Refresh to refresh the data in the form, and then click Parameters.

  6. In the E-invoice OIOUBL XSL File Transformation form, specify the locations of the source, target, processed, and error file storage folders. For the XSLT file path, select the path for the eSalesInvoice.xsl file for sales eInvoices, or the path for the eProjectInvoice.xsl file for project eInvoices, and then close the form.

  7. On the Overview tab, select the batch task that uses the AifGatewaySendService class name to set up the order in which the batch tasks are run.

  8. In the lower pane, press CTRL+N to create a condition for the selected batch task to run after the batch task that uses the AifOutboundProcessingService class name has ended.

  9. In the Task ID field, select the batch task that uses the AifOutboundProcessingService class name.

  10. In the Expected status field, select Ended.

    Note

    You can also select the batch task that uses the EInvoiceFileTransform_OIOUBL class name, and then set the condition to run the batch task when the batch task that uses the AifGatewaySendService class name has ended.

Next step

(AUT) Generate electronic invoices in PEPPOL format

Technical information for system administrators

If you don't have access to the pages that are used to complete this task, contact your system administrator and provide the information that is shown in the following table.

Category

Prerequisite

Configuration keys

No configuration key is required for this task.

Security role and duty

To perform this task, you must have the following role:

  • Accounts receivable payments clerk

To set up parameters to generate electronic invoices in PEPPOL format, you must be a member of a security role that includes the following duty:

  • Maintain customer payments (PaymCustomerPaymentsMaintain)