Distributor Using Foreign ERP for MyInvois Integration
How a Malaysian distributor achieved LHDN compliance without replacing their enterprise resource planning system.
Business Background
The client is a Malaysian distribution company operating across multiple states, serving both retail and wholesale customers. Their business model relies on efficient order processing, inventory management, and invoicing across a diverse product range.
For over a decade, they have used an enterprise resource planning (ERP) system developed by a European vendor. This system manages their entire operation—from procurement and warehousing to sales and financial reporting. The ERP generates structured invoice data in a standardized format, but it does not natively support Malaysia's LHDN MyInvois API.
Challenges Faced
- No Direct MyInvois Integration: The ERP vendor had no plans to develop a Malaysia-specific e-Invoice module.
- Manual Portal Submission Not Scalable: With hundreds of invoices issued daily, manual entry into the MyInvois portal was operationally impossible.
- Need for Reliable Status Feedback: The finance team required immediate confirmation of submission success or failure to manage exceptions.
- Audit Visibility Requirements: Internal and external auditors needed a clear trail of all e-Invoice submissions and their outcomes.
Why an API-Based Middleware Was Chosen
Replacing the ERP system was not a viable option. The existing system was deeply integrated into daily operations, and migration would have been prohibitively expensive and disruptive.
Fortunately, the ERP already produced well-structured invoice data. The challenge was not data quality, but connectivity to LHDN's MyInvois platform.
After evaluating options, the company chose an API-based middleware approach for the following reasons:
- Preservation of ERP Investment: No need to replace or heavily modify the core system.
- Near Real-Time Processing: API integration allows immediate submission and status retrieval, unlike batch file uploads.
- Structured Data Compatibility: The ERP outputs data in a consistent format, making API mapping straightforward.
- Operational Efficiency: Automated submission reduces manual workload and human error.
Integration Approach
The solution involved connecting the ERP system to our middleware platform via a RESTful API integration.
How it works:
- Invoice Generation: When the ERP finalizes an invoice, it triggers an API call to the middleware.
- Data Transmission: The invoice data is sent in JSON format to the middleware endpoint.
- Middleware Processing: The middleware validates the data, maps it to the LHDN e-Invoice schema, and submits it to MyInvois.
- Status Response: The middleware returns the submission status, document UUID, and any error messages back to the ERP.
- ERP Recording: The ERP logs the submission status and document reference for future tracking.
This approach was ideal for the distributor because their ERP already had the technical capability to make outbound API calls. The integration required minimal changes to the ERP's core logic—only the addition of an API endpoint configuration and a simple post-invoice trigger.
Implementation Scope
To ensure a focused and successful deployment, the project scope was clearly defined:
Included:
- API field mapping between ERP invoice structure and LHDN e-Invoice schema.
- Configuration of submission and status retrieval endpoints.
- Error handling logic for rejected invoices, including retry mechanisms and validation feedback.
- Integration with the middleware's audit trail system for compliance tracking.
Excluded:
- Modifications to the ERP's core invoicing or accounting modules.
- Customization of non-e-Invoice related ERP functionality.
Outcome and Results
The API-based integration delivered measurable improvements to the distributor's operations:
Reduced Manual Workload
Finance staff no longer need to manually submit invoices. The process is now fully automated from ERP to MyInvois.
Faster Status Visibility
Submission status is returned to the ERP within seconds, allowing immediate action on rejected invoices.
Better Tracking for Finance and Audit
All submissions are logged with timestamps, status codes, and document references, providing a complete audit trail.
Minimal Disruption to ERP Operations
The integration required no changes to core ERP workflows, preserving business continuity.
Key Takeaways
- Middleware enables MyInvois integration without ERP replacement: Businesses can preserve their existing ERP investment while achieving compliance.
- API integration suits structured ERP environments: For systems that already produce well-formatted invoice data, API-based submission is efficient and reliable.
- Clear status tracking improves operational control: Real-time feedback allows businesses to address submission errors immediately, reducing compliance risk.
This case study reflects a real implementation scenario in Malaysia. Client details have been anonymized.
Need Help Integrating Your ERP with MyInvois?
Our middleware specializes in connecting foreign ERP systems to LHDN MyInvois. Schedule a consultation to discuss your specific integration requirements.