Navigating compliance excellence: A deep dive into ZATCA integration with Dynamics 365 F&O

January 25, 2024

Microsoft Dynamics 365 stands as a dominant ERP choice for medium and large enterprises globally. Businesses across various verticals, especially in retail, have extensively benefited from its diverse ERP portfolio, offering a myriad of packages, customizations, deployment models, and flexible pricing. 

For those managing retail and business operations through Microsoft Dynamics 365 Finance and Operations and operating in Saudi Arabia, it’s high time to gear up for seamless integration with FATOORA (ZATCA’s e-invoicing portal).  

Wondering where to begin? This blog is the first part of a comprehensive two-part series, providing a detailed guide on integrating Dynamics 365 Finance and Operations with ZATCA. Follow our step-by-step guide for onboarding with ZATCA and generate e-invoices for your B2B and e-commerce customers. Stay tuned for the second part, where we’ll walk you through the steps to integrate ZATCA with your MPOS and effortlessly generate e-invoices for B2C customers.

Understanding ZATCA invoicing in Saudi Arabia  

The Zakat, Tax, and Customs Authority (ZATCA) implemented an e-invoicing law starting December 4, 2021. Whether you’re a registered supplier, distributor, or retailer, you must prepare and comply with the e-invoicing process. Sending customer invoices to the tax authority before issuing them to the customer is a regulatory requirement. There are two phases involved in the process as defined by ZATCA Saudi Arabia: 

  • Phase 1 | Generation: Electronically generate and issue invoices in the specified ZATCA format. 
  • Phase 2 | Integration: Report the generated invoices to ZATCA 

Integrating Dynamics 365 with ZATCA: How does it work? 

ZATCA provides a developer sandbox for businesses to test and transition their operations to production themselves, ensuring ZATCA e-invoicing compliance. However, this process comes with its own set of challenges: 

  • Real-time validation of invoices is not possible without sending them to ZATCA for clearance and reporting. 
  • ZATCA only accepts XML in API requests and responses. 
  • Non-compliance may result in invoice rejection. 
  • Balancing core business operations and ensuring e-invoicing compliance at the same time can be time-consuming. 

To integrate Dynamics 365 Finance and Operations, Modern POS, and other applications with ZATCA without losing focus on your core business operations, it is recommended to partner with a ZATCA-approved solution provider like Confiz. 

Our team not only performs the integration but also guides and trains your in-house team, assists in onboarding devices and the FATOORA portal, ensures ownership and responsibility for invoice auditing, and provides ongoing support. 

Now let’s get into the steps for Dynamics 365 ERP integration with ZATCA:  

Step 1: Systems analysis  

The first step in the integration process involves analyzing your existing ERP system, which would be Microsoft Dynamics 365 Finance and Operations environment in this case. Confiz, your ZATCA e-invoicing solution provider, will delve into your ERP architecture, understand business requirements, and map operational workflows. We will then build a tailored integration process for your business based on the findings. 

Step 2: Choosing the right B2B integration method 

ZATCA offers direct API integration, supporting two efficient e-invoice generation modes: 

  • Real-time e-invoice generation with invoice posting. 
  • Bulk e-invoice generation for posted invoices. 

With Confiz’s ZATCA add-on, you can configure one or both of these e-invoice generation modes based on the nature and requirements of your business. Our certified D365 consultants are ready to assist you in selecting the right integration model, guiding you through the essential processes and configurations for a smooth and seamless integration experience. 

Step 3: E-invoice generation  

After completing the integration setup, in this crucial step, customer invoice data is exchanged and authorized with ZATCA in real time to generate e-invoices. The Confiz’s ZATCA add-on automatically establishes a connection between Dynamics 365 Finance and Operations and ZATCA, using your chosen e-invoicing generation system, such as Orchida.  

Step 4: Validation and transmission  

Next, Confiz’s ZATCA add-on verifies invoices generated by Dynamics 365 Finance and Operations, making sure they include mandatory invoice fields and structuring them in XML format. After this, it submits them to the e-invoice generation system, which communicates with ZATCA’s e-invoicing system for approval and clearance.  

Upon the successful verification of the submitted invoices, the e-invoice is generated in real time. ZATCA then issues a unique UUID (Universal Unique Identifier) and a QR-Code, which are to be printed on the customer invoice. You can view an example of this in the screenshot provided above. 

Step 5: QR code generation 

Upon ZATCA clearance of your tax invoice, Dynamics 365 Finance and Operations shares the e-invoice along with a ZATCA QR code and a cryptographic stamp with your designated e-invoicing solution. It takes just a few seconds for ZATCA to approve the invoices. 

Step 6: PDF invoice generation  

Your e-invoice solution will securely store ZATCA’s response and generate its own e-invoice in either PDF or A3 format with an embedded XML. At the same time, Dynamics 365 Finance and Operations will receive this e-invoice, accompanied by a QR code and cryptographic stamp. 

The authorized e-invoices are then issued to the customer, and these invoices can be verified by ZATCA in real-time through QR code scanning. 

Step 7: Buyer invoice generation  

You can now issue invoices to your buyer in PDF/A3 format with embedded XML. Additionally, you can archive these e-invoices directly from Dynamics 365 Finance and Operations when needed. 

Step 8: ZATCA e-invoice inquiry 

At Confiz, we offer a ZATCA e-invoice response inquiry, which provides visibility into the ZATCA e-invoice ID, status, and a comprehensive message trace. This feature allows you to address and rectify any integration issues for seamless compliance. 

Need a partner for ZATCA compliance and integration? Choose Confiz! 

Non-compliance with ZATCA can lead to penalties and other complications. To ensure your business complies with the regulations and to integrate your Dynamics 365 Finance and Operations with ZATCA, leverage Confiz’s expertise. As a trusted Microsoft Solutions partner and ZATCA e-invoicing solution provider, our experts handle the technicalities of integration, adapting your documents to the standards set by ZATCA and ensuring constant compliance. With our end-to-end technical support for ZATCA integration, we help you save time and elevate your financial and retail operations. 

To stay ahead of the compliance mandate, contact us at marketing@confiz.com.