Sales Performance Intelligence Platform
Real-time commission reporting that replaced 40 hours of manual Excel work per month
The Challenge
A window products distribution company with $47M in annual revenue was managing commission tracking entirely through manual Excel workflows. Sales leadership had no real-time visibility into territory performance.
Manual Commission Calculations
Finance spent 40+ hours per month manually calculating commissions across territories. Complex Excel formulas were prone to errors, leading to disputes and delayed payments.
No Year-Over-Year Visibility
Leadership could not identify which territories were growing vs. declining. Strategic decisions were based on intuition rather than data. Growth patterns across 1,320+ customer accounts were invisible.
Goal Achievement Tracking Was Impossible
Goals set at the beginning of the year disappeared into spreadsheets. Territory managers could not track progress mid-month. Course corrections happened too late -- after month-end when the data finally arrived.
The Solution
I built an enterprise-grade commission intelligence platform directly inside NetSuite, giving every stakeholder instant access to the data they needed.
Interactive Pivot Table Reports
Built a multi-view Suitelet with interactive pivot tables: 5 territories x 12 months x 6 metrics per cell. Users see prior year revenue, growth percentage, current year revenue, goal amounts, percent-to-goal, and projected end-of-month figures -- all at a glance with color-coded achievement indicators.
Automated Nightly Data Pipeline
Developed a Map/Reduce batch job that processes 43,000+ transactions every night, extracting data from native NetSuite invoices and credit memos and transforming it into an optimized reporting format. No manual data entry required.
Configuration-Driven Architecture
Designed a reusable config-driven column system where column definitions live in separate configuration files. Adding, removing, or reordering columns requires zero code changes to the form builder. This pattern is now reusable across all future Suitelet projects.
Account-Level Drill-Down
Created cascading filters that let territory managers drill from territory-level summaries down to individual customer accounts. Over 1,320 territory-account combinations are tracked automatically.
Technical Architecture
Performance Engineering
| Challenge | Solution | Result |
|---|---|---|
| 9-second page load with 43K records | Three-layer optimization: selection prompt, server-side filtering, cascading filters | 0.7-second load (92% improvement) |
| NetSuite polymorphic getValue() types | Helper functions to normalize object/array/string variations | Robust, maintainable code |
| Negative prior year sales breaking formulas | Inverted formula logic with edge case handling | Accurate calculations in all scenarios |
| Governance consumption on batch processing | Incremental sync (process only changed records) | 85% governance reduction |
Value Delivered
Immediate Impact (Month 1)
- Finance team reclaimed 35 hours/month (87% reduction in manual work)
- Territory managers got instant access to performance data (previously a 3-5 day wait)
- Leadership made strategic decisions in minutes instead of days
Long-Term Transformation
- Commission disputes dropped 90% through transparency
- Goal achievement improved 12% as visibility drove accountability
- 100% adoption across all territory managers with zero training required
- Foundation enabled future commission tier system expansion
The Reusable Pattern: Config-Driven Suitelets
One of the most valuable outcomes of this project was the development of a reusable architectural pattern. The config-driven form builder separates what to display from how to display it.
Before: Hardcoded Columns
- 150+ lines of repetitive code for 11 columns
- UI definition mixed with data mapping
- Every new column required modifying core code
- New projects required forking entire methods
After: Configuration Objects
- Column definitions in separate config file (~40 lines per view)
- Generic form builder (~150 lines, reusable across projects)
- Adding columns = adding a config object
- Same rendering logic works for any column configuration
// Column configuration example
const COMMISSION_COLUMNS = [
{
id: 'custpage_territory',
label: 'Territory',
type: serverWidget.FieldType.TEXT,
valueAccessor: 'territory'
},
{
id: 'custpage_variance',
label: 'Variance',
type: serverWidget.FieldType.CURRENCY,
valueAccessor: (result) => {
const actual = parseFloat(result.actualRevenue) || 0;
const goal = parseFloat(result.goalAmount) || 0;
return (actual - goal).toFixed(2);
}
}
];
Technologies Used
Explore the Source Code
The Config-driven column system and form builder pattern from this project is available as an anonymized, reusable reference implementation with tests.
View on GitHubMore Client Success Stories
Financial Services
Intelligent Billing Automation
Automated billing surcharge system delivering 1,940% ROI with zero errors
Wholesale / Apparel
Batch Transaction Search Tool
Zero-code reusable transaction search delivering 60x faster lookups
Financial Services
Professional Document Generation System
Dynamic PDF generation system delivering 781% ROI with branded invoices
Delivered by Ben Saralegui
NetSuite SuiteCloud Developer II • FlowSync Consulting
Facing a Similar Challenge?
Let's discuss how I can deliver measurable results for your business.
Let's Talk