Building a Custom ERP for B2B Tech Distribution on Zoho One
How I architected a fully automated Distribution Management System — from sales compliance gates to localized payroll — on Zoho One and Deluge.
Standard off-the-shelf software struggles with the complexity of B2B tech distribution. Multi-step sales approvals, vendor BOM costing, live currency conversion, and localized payroll compliance rarely fit neatly into a generic CRM template.
That was the starting point for a Distribution Management System I architected at Cloud Partners for Pinnacle Distribution Lanka — a fully automated ERP pipeline built on Zoho One (CRM, Inventory, Writer, Creator) with custom Deluge scripting end to end.
Why not just use standard CRM workflows
Generic CRM pipelines assume a simple deal lifecycle: opportunity, negotiation, close. Distribution doesn't work that way. A single deal can bundle multiple opportunities, each requiring separate vendor quotes, separate compliance checks, and separate approval paths before anything is "closed won."
Rather than fighting the platform, the approach was to extend it — using Deluge to encode the actual business rules directly into the CRM layer.
The compliance gate pattern
One of the more effective patterns turned out to be blocking stage transitions programmatically. A deal cannot move to "Closed Won" until a Partner PO is attached as a record. Once approved, financial fields lock automatically to preserve data integrity for audit purposes.
This is a small rule, but it removes an entire category of manual double-checking that previously ate into the sales team's time.
BOM parsing and zero-touch quoting
Vendor bill-of-materials data — Dell server configs, VMware licensing — arrives as raw CSV exports. The quoting engine parses these automatically, structuring parts into clusters (servers) and sub-headings (RAM, storage, licensing) so costing stays accurate down to the line item.
From there, the Zoho Writer API generates and attaches a branded PDF quote in seconds, with zero manual formatting.
Currency, inventory, and payroll — same principle throughout
The rest of the system follows the same philosophy: automate the parts that are error-prone when done by hand.
- Procurement enforces Proforma Invoice uploads before purchasing, and converts OEM USD totals to LKR using live exchange rates.
- Inventory matches BOM parts against live stock via smart SKU detection, auto-creating new OEM parts with correct business units and COGS ledger codes.
- Payroll automates Sri Lankan statutory deductions (EPF, PAYE) and calculates commission-based net salary payslips.
The result
None of this required custom infrastructure outside Zoho's ecosystem — the entire system runs on Zoho One with Deluge as the glue. What it required instead was mapping the real business process precisely enough that the automation could be trusted to run unattended.
That's usually the actual bottleneck in ERP projects: not the tooling, but getting the process specification right before you automate it.