Skip to content

Sales Performance Intelligence Platform

Real-time commission reporting that replaced 40 hours of manual Excel work per month

8.5x
First-Year ROI
92%
Page Load Improvement
43,000+
Transactions Processed Nightly
100%
User Adoption
Suitelet Distribution / Manufacturing

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.

40+
Hours/Month Manual Work
3-5
Day Delay for Reports
$120K
Annual Cost of Waste

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

35 hrs
Monthly Time Saved
$105K
Annual Hard Savings
90%
Fewer Commission Disputes
12%
Goal Achievement Improvement

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

SuiteScript 2.1 Custom Suitelet Map/Reduce Client Script Custom Records N/search N/ui/serverWidget N/file (Excel Export) Config-Driven Pattern Builder Pattern Jest Testing (25+ tests)

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 GitHub
Ben Saralegui

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