Get started with Electronic invoicing for Saudi Arabia - Phase two
This article provides information that will help you get started with phase two of Electronic invoicing for Saudi Arabia. This article guides you through the configuration steps that are country/region-dependent in Regulatory Configuration Service (RCS) and in Microsoft Dynamics 365 Finance or Dynamics 365 Supply Chain Management. These steps complement the steps that are described in Set up Electronic invoicing.
Prerequisites
Before you begin the procedures in this article, complete the following prerequisites:
Become familiar with Electronic invoicing as it's described in Electronic invoicing overview.
Sign up for RCS, and set up Electronic invoicing. For more information, see the following articles:
Activate the integration between your Finance app and the Electronic Invoicing service as described in Activate and setup integration with Electronic invoicing.
Learn how to create certificates and secrets in Azure Key Vault, and set up Key Vault as described in Customer certificates and secrets.
In Microsoft Dataverse, configure virtual entities for Finance and Supply Chain Management. For more information, see Configure Dataverse virtual entities.
Enable the CustomerPaymentMethodEntity virtual entity. For more information, see Enable Microsoft Dataverse virtual entities.
Add the Dataverse endpoint as a connected application in the RCS instance. For more information, see Create a connected application.
Import the Saudi Arabian Zatca submission (SA) and Saudi Arabian ZATCA compliance check (SA) electronic invoicing features into RCS from the Global repository. For more information, see Import features from the Global repository.
Make sure that the following Electronic reporting (ER) format configurations are imported. For more information, see Import Electronic reporting (ER) configurations.
- Sales e-invoice (SA)
- Project e-invoice (SA)
- Retail fiscal document format (for Retail-specific scenarios, if required)
Country/region-specific configuration for the Saudi Arabian Zatca submission (SA) Electronic invoicing feature
Note
The configuration steps in this section are described for Saudi Arabian Zatca submission (SA) electronic invoicing feature. This assumes that the onboarding process is completed and the Production Cryptographic Stamp Identifier (PCSID) is obtained. If you are in the middle of the onboarding process and only the Compliance Cryptographic Stamp Identifier (CCSID) is received, do the same configuration steps for the Saudi Arabian ZATCA compliance check (SA) electronic invoicing feature.
Some of the parameters from the Saudi Arabian Zatca submission (SA) electronic invoicing feature are published with default values. Before you deploy the electronic invoicing feature to the service environment, review the default values, and update them as required so that they better reflect your business operations.
In RCS, in the Globalization feature workspace, in the Features section, select the Electronic invoicing tile.
On the Electronic invoicing features page, verify that the Saudi Arabian Zatca submission (SA) Electronic invoicing feature is selected.
On the Versions tab, verify that the Draft version is selected.
On the Configurations tab, go to Application specific parameters for a selected configuration. In the Lookups section, make sure that PaymentMethodSubstitutionLookup lookup is selected.
In the Conditions section, select Add to add a condition.
In the Name column for the new condition, select the method of payment that is defined in the application. Then, in the Lookup result column, select a standardized method of payment code according to UN/EDIFACT Code list 4461.
Add specific conditions for each method of payment that is defined in the system, and save your changes.
Note
In the Name column, you can select the *Blank* or *Not blank* placeholder value instead of a specific method of payment.
On the Setups tab, select Edit for the selected configuration.
In the Processing pipeline section, turn on the Export result option for the Transform document action.
In Key Vault, create certificates and secrets for Cryptographic Stamp Identifiers (CSIDs). For more information, see Customer certificates and secrets.
Note
Depending on your place in the onboarding process, create a Compliance CSID (CCSID) or a Production CSID (PCSID).
In the Globalization feature workspace, select the Environment setup related link, and then, on the Service environments menu, select the environment to use for the feature deployment.
In Number sequences section, add a record for the number sequence that should be used to count submitted electronic invoices.
In the Globalization feature workspace, in the Features section, select the Electronic invoicing tile, and then select the draft version of the Saudi Arabian Zatca submission (SA) electronic invoicing feature.
On the Setups menu, select the Sales invoice feature setup, and then select Edit.
Note
Select the Tax invoice compliance check feature setup for the electronic invoicing feature, Saudi Arabian ZATCA compliance check (SA).
On the Processing pipeline tab, in the Processing pipeline section, select the Get next number sequence value action.
In the Parameters section, in the Value field, select the number sequence that you created in step 12.
In the Processing pipeline section, select Prepare document for submit for Saudi Arabia Zatca service, and then follow these steps:
- In the Parameters section, select the Invoice counter value name.
- In the Value field, select Get next number sequence value: Number sequence value.
- Select the Invoice counter name name.
- In the Value field, select Get next number sequence value: Number sequence name.
In the Processing pipeline section, select Integrate with Saudi Arabia Zatca service, and then follow these steps:
- In the Parameters section, select Web service URL.
- In the Value field, enter the URL of the development portal or the production environment that is provided by the Saudi Arabian tax authority (ZATCA).
- Select the API method name name.
- In the Value field, select Invoice clearance for tax invoices or Invoice reporting for simplified invoices.
- Select the Certificate name name.
- In the Value field, select CCSID or PCSID, depending on your place in the onboarding process.
- Select the Secret name name.
- In the Value field, select CCSIDSecret or PCSIDSecret, depending on your place in the onboarding process.
Repeat steps 13 through 17 for the Project invoice and Retail simplified invoice feature setups.
Note
Repeat steps 13 through 17 for the Simplified invoice compliance check and Retail fiscal document compliance check feature setups to set up the electronic invoicing feature, Saudi Arabian ZATCA compliance check (SA).
Complete, publish, and deploy the Saudi Arabian Zatca submission (SA) feature to the service environment. For more information, see Deploy the Electronic invoicing feature to Service environment.
Deploy the Saudi Arabian Zatca submission (SA) feature to the connected application. For more information, see Deploy the Electronic invoicing feature to Connected application.
Finance configuration
When tax invoices are cleared, ZATCA generates a QR code that contains the digital signature for that clearance. This QR code must be imported back into Finance, together with other clearance information that the tax authority returns as result of the submission of the tax invoices. To achieve this result, you must configure the response types in Finance.
Follow these steps to complete the configuration.
Make sure that the country/region-specific ER configurations that are required for Saudi Arabia are imported. For more information, see Set up Electronic invoicing parameters
Go to Organization administration > Setup > Electronic document parameters.
In the Electronic document section, add records for the Customer Invoice journal, Project invoice and Fiscal transaction document table names.
For each table name, set the Document context and Electronic document model mapping fields in accordance with step 1.
For the Customer Invoice journal table name, select Response types.
Create a response type that has the same name that was defined for the related variable in the corresponding feature setups in RCS.
In the Submission status field, select Pending.
In the Data entity name field, select Sales invoice QR code entity.
In the Model mapping field, select Zatca response data import.
For more information about business data configuration and processing in Finance, see Customer electronic invoices in Saudi Arabia.
Electronic invoicing onboarding in Saudi Arabia
Onboarding is mandatory for all taxpayers who are subject to electronic invoicing in Saudi Arabia. Taxpayers and their software for e-invoicing must be onboarded ZATCA. As a result of the onboarding process, taxpayers obtain CSIDs, which are required for integration with the electronic invoicing portal that is managed by ZATCA and for further submission of electronic invoices.
Onboarding is an essential part of the Electronic invoicing configuration. For more information about the onboarding process, see Electronic invoicing onboarding in Saudi Arabia.