Configure Electronic invoicing parameters

Import ER configurations from the repository

The process of submitting electronic documents to the Electronic Invoicing service requires the generation of a message in Microsoft Dynamics 365 Finance or Dynamics 365 Supply Chain Management. This message must be in a unified structure that corresponds to the structure of the Electronic reporting (ER) invoice model and metadata (context). Because the message is generated by ER, its structure is customizable and flexible.

Before you can submit documents to Electronic invoicing and process responses, you must import ER configurations from the repository and define them in parameters.

To set up, adjust, or review electronic documents directly in your Finance or Supply Chain Management environment, complete the following procedures.

  1. In the Globalization Studio workspace, select the Electronic reporting tile.

  2. In the Configuration providers section, select the Microsoft configuration provider, and then select Repositories.

  3. Select the repository of the Dataverse type, and then, on the Action Pane, select Open.

  4. Import the following ER models:

    • Customer invoice context model
    • Invoice model
    • Fiscal documents (for Brazilian scenarios, if required)
    • Retail channel data (for Saudi Arabian retail-specific scenarios, if required)
    • Response message model
  5. Verify that the following mapping configurations were automatically imported. If they weren't, import them, and then close the page.

    • Invoice model mapping
    • Fiscal documents mapping (for Brazilian scenarios, if required)
    • Advance invoice model mapping (for Polish scenarios, if required)
    • Retail fiscal document mapping (for Saudi Arabian retail-specific scenarios, if required)
    • Pending vendor invoice model mapping (for Danish responses scenarios, if required)

Set up Electronic document parameters

  1. Go to Organization administration > Setup > Electronic document parameters.

  2. On the Electronic document tab, above the Electronic reporting grid, select Add.

  3. Depending on the scenarios that you want to support, enter the following information in the grid, and then save your changes.

    Table name Document context Electronic document model mapping Features that it's required for
    CustInvoiceJour

    Mapping name: Customer invoice context

    Configuration: Customer invoice context model

    Mapping name: Customer Invoice

    Configuration: Invoice model mapping

    • Austrian electronic invoices (AT)
    • Belgian electronic invoice (BE)
    • Danish electronic invoice (DK)
    • Egyptian electronic invoice (EG)
    • Estonian electronic invoice (EE)
    • Finish electronic invoice (FI)
    • French electronic invoice (FR)
    • German electronic invoice (DE)
    • FatturaPA (IT)
    • Dutch electronic invoice (NL)
    • Norwegian electronic invoice (NO)
    • Polish electronic invoice (PL)
    • Spanish electronic invoice (ES)
    • PEPPOL electronic invoice
    • Saudi Arabian electronic invoice (SA)
    • Australian electronic invoice (AU)
    • New Zealand electronic invoice (NZ)
    • (Preview) Malaysian electronic invoicing (MY)
    ProjInvoiceJour

    Mapping name: Project invoice context

    Configuration: Customer invoice context model

    Mapping name: Project Invoice

    Configuration: Invoice model mapping

    • Austrian electronic invoices (AT)
    • Belgian electronic invoice (BE)
    • Danish electronic invoice (DK)
    • Egyptian electronic invoice (EG)
    • Estonian electronic invoice (EE)
    • Finish electronic invoice (FI)
    • French electronic invoice (FR)
    • German electronic invoice (DE)
    • FatturaPA (IT)
    • Dutch electronic invoice (NL)
    • Norwegian electronic invoice (NO)
    • Polish electronic invoice (PL)
    • Spanish electronic invoice (ES)
    • PEPPOL electronic invoice
    • Saudi Arabian electronic invoice (SA)
    • Australian electronic invoice (AU)
    • New Zealand electronic invoice (NZ)
    • (Preview) Malaysian electronic invoicing (MY)
    CzCustAdvanceInvoiceTable

    Mapping name: Advance invoice context

    Configuration: Customer invoice context model

    Mapping name: Advance invoice model mapping

    Configuration: Advance invoice model mapping

    Polish electronic invoice (PL)
    RetailTransactionFiscalTransDocumentView

    Mapping name: Retail fiscal document context

    Configuration: Customer invoice context model

    Mapping name: Retail fiscal document

    Configuration: Retail fiscal document mapping

    Saudi Arabian electronic invoice (SA)
    FiscalDocument_BR

    Mapping name: Fiscal document context

    Configuration: Customer invoice context model

    Mapping name: Fiscal documents mapping

    Configuration: Fiscal documents mapping

    Brazilian NF-e (BR)
    Correction letter

    Mapping name: FD correction letter context

    Configuration: Customer invoice context model

    Mapping name: Correction letter mapping

    Configuration: Fiscal documents mapping

    Brazilian NF-e (BR)
    Service Fiscal document

    Mapping name: Fiscal document context

    Configuration: Customer invoice context model

    Mapping name: Fiscal documents mapping

    Configuration: Fiscal documents mapping

    Brazilian NFS-e ABRASF Curitiba (BR)
    VendInvoiceInfoTable

    Mapping name: Pending vendor invoice context

    Configuration: Customer invoice context model

    Mapping name: Pending vendor invoice model mapping

    Configuration: Pending vendor invoice model mapping

    Danish electronic invoice (DK)
    LedgerJournalTrans

    Mapping name: Prepayment invoice context

    Configuration: Customer invoice context model

    Mapping name: Customer prepayments

    Configuration: Invoice model mapping

    Saudi Arabian Zatca submission (SA)
    VendInvoiceJour

    Mapping name: Self invoice context

    Configuration: Customer invoice context model

    Mapping name: Self invoice

    Configuration: Self invoice model mapping

    (Preview) Malaysian electronic invoicing (MY)

If you derive a configuration from the configuration that's mentioned in the preceding table, define the new configuration.

To set up the rules to process responses from the Electronic Invoicing service, and to update Finance and Supply Chain Management data based on invoices that are processed by the service, set up response types. In most scenarios, this setup is country/region-specific. Therefore, we recommend that you follow the country/region-specific instructions. For more information, see Availability of Electronic invoicing features by country or region.

Create a Key Vault reference

  1. On the Electronic document parameters page, on the Electronic Invoicing tab, on the Key Vault settings FastTab, select Key Vault parameters.

  2. On the Key Vault parameters page, select New to create a Key Vault reference.

  3. In the Name field, enter the name of the Key Vault reference.

  4. In the Description field, enter a description.

  5. In the Key Vault URI field, paste the Key Vault URI from the key vault (https://<your key vault>.vault.azure.net/). For more information, see Create an Azure key vault in the Azure portal.

  6. In the Certificates section, select Add.

  7. In the Name field, enter the name of the storage account secret or certificate. This name should match the name of the Key Vault secret that holds the shared access signature (SAS) token of the storage account. For more information, see Create an Azure storage account in the Azure portal.

  8. In the Description field, enter a description.

  9. In the Type field, select either Secret or Certificate, depending on what you're configuring.

    Note

    In some scenarios, you must use public certificates that have the .cer file name extension. However, Key Vault doesn't support importing and storing certificates of this type as Key Vault certificates. In these scenarios, you should save the .cer file as a Base-64-encoded X.509 (.CER) string. Then, in a Key Vault secret, store the string that appears between the BEGIN CERTIFICATE line and the END CERTIFICATE line in the file. In the service environment, you should still create a reference to the Key Vault record and set the Type field to Certificate.

    Alternatively, use the following PowerShell script to generate a Base-64 string of the .cer certificate file.

    $FilePath = ''
    $Cer = New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Certificate2($FilePath)
    $BinCert = $Cer.GetRawCertData()
    $Base64Cert = [System.Convert]::ToBase64String($BinCert)
    echo $Base64Cert
    
  10. If your specific scenarios require a chain of certificates to apply digital signatures or establish a secure (Secure Sockets Layer [SSL]) connection to external web services, create a chain of certificates where the certificates are in the following order: Root certificates > Intermediate certificates > End-user certificates. Root certificate authorities (CAs) are a trusted source of certificates. Intermediate CA certificates are bridges that link the end-user certificates to the root CA certificates. To create and set up a chain of certificates, follow these steps:

    1. On the Action Pane, select Chain of certificates.
    2. Select New to create a chain of certificates.
    3. In the Name field, enter the name of the chain of certificates.
    4. In the Description field, enter a description.
    5. In the Certificates section, select Add to add a certificate to the chain.
    6. Use the Up or Down button to change the position of the certificate in the chain. Keep the CA root certificate at the top of the list and the end-user certificate at the bottom.
    7. Save the data, and close the Chain of certificates page.
  11. Save the data, and close the Key Vault parameters page.

  12. In the Key Vault field, select the key vault that you created in previous steps.

  13. In the Storage SAS token secret field, select the name of the storage account secret that must be used to authenticate access to the storage account.

Configure number sequences

If your scenarios require number sequences (for example, in file names), you can use number sequences that are used either across Globalization features or for a specific Globalization feature. After a number sequence is defined, you can use it in variables and processing pipelines. To track the use of a number sequence, look for a value in the Current Value field and a selected In use checkbox on the Number sequences FastTab on the Electronic Invoicing tab of the Electronic document parameters page.

To create a number sequence, select New on the Number sequences FastTab. Then enter a name and description.

To delete a number sequence if it's no longer used, select Delete.

Inactivate legacy Electronic invoicing functionality

To inactivate old (legacy) ER functionality for some features, and to activate additional functionality in Finance and Supply Chain Management for some country/region-specific scenarios, enable the corresponding feature on the Features tab of the Electronic document parameters page.

When you enable a feature in the list, the legacy functionality is inactivated for the corresponding country or region and feature name.