AI
Case Studies6 min read

How Al-Marai Streamlined 10,000 Monthly Invoices with urtwin

Al-Marai Distribution (a fictional case study) is one of the largest FMCG distributors in the Eastern Province of Saudi Arabia, supplying over 3,000 retail locations across Dammam, Khobar, and Dhahran. With 10,000+ invoices generated monthly across multiple product categories and pricing tiers, their finance team of eight was struggling to keep up — especially after ZATCA Phase 2 made real-time invoice clearance mandatory.

The Challenge

Before urtwin, Al-Marai's invoicing process was a patchwork of spreadsheets, an aging ERP system, and manual data entry. Each invoice required a finance team member to pull delivery confirmation from the logistics system, cross-reference pricing against the customer's contracted rates, calculate VAT, generate the invoice in the ERP, export it as XML, submit it to ZATCA for clearance, and then dispatch the cleared invoice to the customer. The average time per invoice was 18 minutes, and the team processed roughly 500 per day at peak capacity.

ZATCA Phase 2 added a new layer of complexity. Real-time clearance meant that any error — a wrong tax category code, a mismatched VAT registration number, a rounding discrepancy — resulted in an immediate rejection. The rejection rate in the first month was 12%, requiring manual correction and resubmission that consumed even more time.

The Solution

Al-Marai deployed urtwin's Invoice Agent with connections to their ERP (SAP Business One), logistics management system, and WhatsApp Business API. The implementation took three weeks, including data migration, rule configuration, and a parallel-run period where both the manual and automated processes ran simultaneously to validate accuracy.

  • Automatic invoice generation triggered by delivery confirmation in the logistics system
  • Customer-specific pricing rules pulled from SAP including volume discounts and promotional rates
  • VAT calculation with correct tax category codes for standard-rated, zero-rated, and exempt items
  • Real-time ZATCA Phase 2 clearance via Fatoora API with automatic retry on transient failures
  • Invoice dispatch via WhatsApp to buyer contacts with PDF and QR code attached
  • Automated dunning sequences for invoices overdue by 7, 14, and 30 days

The Results

Within the first month of full deployment, Al-Marai's invoice processing time dropped from 18 minutes to under 2 minutes per invoice. The ZATCA rejection rate fell from 12% to 0.3% — and the remaining rejections were all due to buyer-side data issues (incorrect VAT registration numbers), not agent errors. The finance team was reduced from eight dedicated invoicing staff to two people in a supervisory role, with the other six redeployed to financial analysis and strategic planning.

Payment collection improved dramatically. The automated WhatsApp dunning sequences, combined with faster invoice delivery, reduced days sales outstanding (DSO) from 47 days to 31 days. For a company with Al-Marai's invoice volume, that 16-day improvement represents millions of SAR in improved cash flow. The finance director noted that the agent's consistency — sending reminders at exactly the right intervals, never forgetting a follow-up — was something no human team could match at scale.

"We used to dread the end of the month," says the CFO. "Now our invoicing runs itself. The agent processes more invoices in an hour than our team did in a day, with better accuracy and full compliance. The ROI was obvious within the first two weeks."

Share this article