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.
Note
Most of the ER configurations that are mentioned in the following procedure are automatically imported as a result of the import of related Globalization features. For more information, see Import features from the repository. If you must reimport configurations, use the following procedure.
To set up, adjust, or review electronic documents directly in your Finance or Supply Chain Management environment, follow these steps.
In the Globalization Studio workspace, select the Electronic reporting tile.
In the Configuration providers section, select the Microsoft configuration provider, and then select Repositories.
Select the repository of the Dataverse type, and then, on the Action Pane, select Open.
Import the following ER configurations:
- Customer invoice context model
- Invoice model
- Fiscal documents (for Brazilian scenarios, if required)
- Retail channel data (for Saudi Arabian retail-specific scenarios, if required)
- Invoices Communication Model (for Malaysian and Indonesian batch submission scenarios, if required)
- Response message model
- 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)
- Invoices communication model mapping (ID) (for Indonesian batch submission scenarios, if required)
- Consolidated Invoice Model Mapping (MY) (for Malaysian batch submission scenarios, if required)
Set up Electronic document parameters
Go to Organization administration > Setup > Electronic document parameters.
On the Electronic document tab, above the Electronic reporting grid, select Add.
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)
- 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)
- 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
Malaysian electronic invoicing (MY) CustInvoiceJour
ProjInvoiceJour
(In case of batch submission)
Mapping name: Batch submission
Configuration: Customer invoice context model
Mapping name: Invoices communication model mapping (ID)
Configuration: Invoices communication model mapping (ID)
Indonesian electronic invoice (ID) CustInvoiceJour
(In case of batch submission)
Mapping name: Batch submission
Configuration: Customer invoice context model
Mapping name: Consolidated Invoice Model Mapping (MY)
Configuration: Consolidated Invoice Model Mapping (MY)
Malaysian electronic invoicing (MY)
If you derive a configuration from the configuration that's mentioned in the preceding table, define the new configuration.
Note
By default, configured Electronic document parameters are applicable to all legal entities. To activate a configuration for specific legal entities, enable the Electronic documents configuration per legal entities feature in Feature management. For more information, see Feature management overview.
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 Service features by country or region.
Create a Key Vault reference
On the Electronic document parameters page, on the Electronic Invoicing tab, on the Key Vault settings FastTab, select Key Vault parameters.
On the Key Vault parameters page, select New to create a Key Vault reference.
In the Name field, enter the name of the Key Vault reference.
In the Description field, enter a description.
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.In the Certificates section, select Add.
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.
In the Description field, enter a description.
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
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:
- On the Action Pane, select Chain of certificates.
- Select New to create a chain of certificates.
- In the Name field, enter the name of the chain of certificates.
- In the Description field, enter a description.
- In the Certificates section, select Add to add a certificate to the chain.
- 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.
- Save the data, and close the Chain of certificates page.
Save the data, and close the Key Vault parameters page.
In the Key Vault field, select the key vault that you created in previous steps.
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.