The challenge
The retailer sells goods on instalment plans across a large branch network. Prices, discounts and instalment terms depend on the customer's category, the product, the branch, the date and a long list of conditions that change roughly every month. Hard-coding those rules meant a code change and a redeploy for every policy update, and a queue of branches waiting for it.
There was also a legacy system holding years of customer and transaction data that had to be carried over without a gap in daily operations.
Approach
Rather than encode policy in application code, the team designed a rule engine that lets authorised staff define rules on any column of the relevant records: an operator set, value ranges and date-based criteria, evaluated at checkout. Policy changes became configuration, not code.
The legacy migration was written in pure SQL and Node.js batch jobs so it could be run, verified and re-run against real data before cut-over. Delivery moved onto an automated Jenkins pipeline so every change went through the same tested path to production.
Architecture
- Node.js and NestJS services over PostgreSQL, with Oracle connectivity for the systems already in place at the retailer.
- A rule engine that evaluates dynamic conditions against customer, product and branch data at transaction time.
- Batch migration jobs in SQL and Node.js with verification steps between stages.
- Jenkins CI/CD with automated deployments replacing what had been hours of manual release work.
Results
The platform was rolled out across more than 50 branches and is in daily use by branch operators serving over 100,000 customers, with new customers added continuously. Pricing and discount policy is now changed by the business without engineering involvement.
This work was delivered by Sikandar Waheed as team lead at his previous employer. It is included here because the same approach to rule engines, migrations and delivery pipelines is what ILMOTECH brings to new projects.
- 50+Retail branches using the platform daily
- 100k+Customers served, growing continuously
- 12Engineers led through the build