All projects

Professional · Built at hytGenX

Multi-Supplier Commission Automation Engine

Rule-driven commission platform for a multi-supplier sales organization, built from scratch.

Role: Sole engineer
Role
Sole engineer
Delivery
~4 weeks to production
Coverage
~60 reps · 13 suppliers
Output
$400K+ validated per biweekly run

Overview

A commission engine that takes raw supplier transaction data, matches it against accounts, reps, and products, applies layered commission rules, and produces audited Excel reports. Each run processes several thousand transactions.

Commission run workflow

  1. Supplier source dataSeveral thousand transactions per run
  2. Normalization
  3. Supplier match
    Account match
    Rep match
  4. Rule priority + specificity engine
  5. Multi-party splits
    Overrides
    Retroactive logic
  6. Commission calculation
  7. Audit trail
    Excel reportsAutomated output
Simplified view.

What I owned

  • Data model for suppliers, accounts, reps, products, rules, and runs.
  • Rule engine with priority and specificity matching, multi-party splits, and overrides.
  • Retroactive recalculation with audit trails.
  • Automated Excel reporting and the deployment pipeline (GitHub Actions, Linux, PM2).

Engineering challenges

Choosing the right rule

Several rules can match the same transaction. Rules are resolved by priority and specificity, so the most specific applicable rule wins over broader defaults.

Changing the past safely

Rule changes can affect periods that were already calculated. Retroactive recalculation reruns the affected transactions, and the audit trail records what changed.

Outcome

  • Validated biweekly commission runs exceeding $400K in commission output (not sales revenue).
  • Supports ~60 sales reps, 13 active suppliers, ~1,800 accounts, and 500+ products.

Stack

Node.jsHonoTypeScriptPostgreSQLSupabaseNext.jsReactXLSXGitHub ActionsLinuxPM2