Article

How to Integrate ZATCA Phase 2 with Microsoft Dynamics 365 Finance and Operations

By TOQXCEL

For businesses operating in Saudi Arabia, ZATCA Phase 2 compliance is no longer a back office requirement it has become a critical part of everyday financial operations.

With the Integration Phase now in effect, businesses must ensure that their ERP systems connect directly with the FATOORA platform for invoice clearance and reporting. For companies using Microsoft Dynamics 365 Finance and Operations (D365 F&O), this means implementing a secure and fully compliant integration workflow. Microsoft’s official guidance for Saudi electronic invoicing outlines configuration, onboarding, and submission steps specific to D365 Finance.

At Toqxcel, we help organizations streamline this process with end-to-end ZATCA Phase 2 integration services built on Microsoft Dynamics 365 and Microsoft Azure.

Understanding ZATCA Phase 2 in Dynamics 365 F&O

Before starting the implementation, it’s important to understand what Phase 2 requires. Unlike Phase 1, which focuses on invoice generation and storage, Phase 2 requires real time integration with ZATCA’s FATOORA portal.

This includes:

  • UBL 2.1 XML invoice generation
  • QR code generation
  • UUID creation
  • invoice hash
  • digital signature
  • real-time clearance for B2B invoices
  • reporting for B2C invoices

Microsoft Learn specifically notes that these steps must be configured in D365 Finance or Supply Chain Management before submission.

Integrate ZATCA Phase 2 with Microsoft Dynamics 365
Integrate ZATCA Phase 2 with Microsoft Dynamics 365
Step 1: Assess Your Current D365 F&O Setup

The first step is to review your current Dynamics 365 environment. This includes checking:

  • finance modules in use
  • invoice workflows
  • legal entity setup
  • VAT registration details
  • customer and supplier master data
  • Saudi localization settings

A proper assessment helps identify gaps before the technical integration begins. At Toqxcel, this is where we typically start our ZATCA integration implementation process to ensure the ERP is ready for compliance.

Step 2: Configure Electronic Invoicing in D365 Finance

Once the environment is assessed, the next step is enabling electronic invoicing. In Microsoft Dynamics 365 Finance and Operations, this involves:

  • enabling Saudi e-invoicing localization
  • configuring Electronic Reporting (ER)
  • setting invoice data mapping
  • defining tax codes
  • configuring QR and XML templates

This is one of the most important steps because incorrect field mapping often leads to invoice rejections.

Step 3: Complete ZATCA Onboarding and CSID Setup

ZATCA onboarding is mandatory before invoices can be submitted. During this process, businesses must obtain:

  • Compliance CSID (CCSID) for testing
  • Production CSID (PCSID) for live invoice submission

Microsoft’s official onboarding documentation confirms that this step is required for all taxpayers subject to electronic invoicing in Saudi Arabia.

This stage includes:

  • registering the legal entity
  • validating VAT details
  • generating cryptographic credentials
  • mapping certificates داخل D365

At Toqxcel, we support secure onboarding and certificate configuration as part of our ZATCA compliance service .

Step 4: XML Generation and Invoice Validation

Once onboarding is complete, the system must generate invoices in the required XML format. ZATCA requires invoices in UBL 2.1 XML structure, including:

  • seller information
  • customer VAT details
  • invoice line items
  • tax amounts
  • totals
  • UUID
  • QR data

Incorrect XML mapping is one of the most common reasons for rejection. This is why we recommend automated pre-submission validation checks within D365 workflows.

Step 5: API Integration with FATOORA Portal

The next step is establishing API connectivity between D365 F&O and the ZATCA FATOORA portal. This integration handles:

  • real-time invoice clearance
  • B2C reporting
  • acknowledgment receipt
  • status tracking
  • retry logic

Industry implementation guides emphasize secure API communication as a critical part of successful integration.

At Toqxcel, we build secure API workflows using Microsoft Azure and D365 integration capabilities to ensure stable invoice submission.

Step 6: Sandbox Testing and Go-Live

Before production deployment, businesses must complete sandbox validation. This stage includes:

  • invoice submission tests
  • XML validation
  • QR code verification
  • API response testing
  • error log checks

Only after successful validation should the system move to production. Microsoft recommends completing all compliance checks before requesting the production of CSID.

How Toqxcel Supports the Integration Process

At Toqxcel our approach focuses on building reliable, compliance-ready ERP workflows. Our services include:

  • D365 F&O implementation support
  • ZATCA onboarding
  • XML validation workflows
  • secure API integration
  • Azure integration support
  • sandbox to production migration
  • post-go-live monitoring

Integrating ZATCA Phase 2 with Microsoft Dynamics 365 Finance and Operations requires a structured technical approach from ERP assessment and onboarding to XML validation and secure API workflows.

When implemented correctly, businesses can reduce invoice rejections, improve compliance, and ensure uninterrupted financial operations.

Conclusion

At Toqxcel, we help organizations achieve seamless ZATCA compliance through our dedicated ZATCA Phase 2 integration services , built to support Microsoft Dynamics 365 environments.

Help customers on live chat.

Trusted by 150 + customers globally.

Scroll