NetSuite case study
Replacing Manual Commission Tracking with Fully Auditable Cost Lineage
How Elysian used SuiteQL and NetSuite’s Suitelet scripting framework to trace revenue and landed costs from sale to receipt—giving a wholesale distributor an accurate, transparent method for calculating commissions based on actual gross margin.

The business challenge
A trusted calculation that demanded too much manual effort.
A wholesale distributor calculated sales commissions using actual gross margin rather than revenue alone.
Determining that margin required considerably more than subtracting an item’s purchase price from its selling price. The calculation incorporated:
- Purchase-order pricing
- Six landed-cost categories
- An off-transaction financing charge
- Multiple units of measure
- Lot-specific inventory costs
- The sales representative’s applicable commission rate
Historically, the finance team maintained the calculation in a detailed spreadsheet. Each item fulfillment had to be researched, traced to its originating item receipt, and entered manually.
The process required substantial effort, but it also provided something the client was unwilling to sacrifice: a clear understanding of every cost included in the commission calculation.
The objective was not simply to automate the spreadsheet. It was to preserve its transparency while creating a more efficient, controlled, and scalable process inside NetSuite.
The Elysian approach
Reconstruct the complete lineage behind every sale.
Elysian used SuiteQL to reconstruct the complete lineage behind each sale and NetSuite’s Suitelet scripting framework to present the results through an interactive application.
The first step was to normalize the different units of measure used across purchasing, inventory, fulfillment, and sales. This established a common denominator for comparing quantities and calculating consistent per-unit values.
The application then used the lot number recorded on the item fulfillment to trace the inventory back to its originating item receipt.
From that receipt, the solution retrieved:
- Original material cost
- Each landed-cost category
- Quantity received
- Applicable financing cost
Each cost component was allocated across the units received to establish a complete per-unit cost. Those values were then connected to the sales transaction, creating an auditable path from customer revenue back through fulfillment and inventory to the original receipt.
Complete margin visibility
Show the components, not only the answer.
The resulting Suitelet allows users to see the components of gross margin rather than receiving only a final calculated amount.
For each transaction, the application presents:
- Revenue per unit
- Material cost per unit
- Individual landed-cost components
- Financing cost
- Total cost per unit
- Actual gross profit
- Actual gross-margin percentage
- Commission rate
- Calculated commission
Users can filter the analysis by accounting period, sales representative, vendor, customer, and item. This makes the application useful not only for commission processing, but also for broader margin and cost analysis.
Purpose-built controls
Visibility shaped around responsibility.
Access was refined according to the user’s role.
Sales representatives can view only the customers assigned to them on the customer record, while leadership retains visibility across the complete organization.
The application also includes email functionality that allows leadership to send each representative an individual commission statement for the selected accounting period without exposing another representative’s results.
Validation and results
Proven against the established process.
The client operated the Suitelet and its established spreadsheet process in parallel for one complete accounting period.
The results matched the manual calculations precisely.
With the calculation validated, the client gained:
- A repeatable commission process within NetSuite
- Detailed visibility into every margin component
- Lot-level traceability from sale to item receipt
- Reduced reliance on manual research and spreadsheet entry
- Controlled access for individual sales representatives
- A flexible analysis tool for investigating customer, vendor, item, and representative profitability
The business outcome
Automation without sacrificing understanding.
The solution did more than automate a commission calculation. It preserved the client’s trusted business logic, exposed the complete transaction lineage, and eliminated hours of manual tracking.
The best automation does not conceal a complex calculation. It makes the calculation easier to understand, easier to verify, and easier to operate.
Start a conversation
Does Your NetSuite Process Still Depend on a Complex Spreadsheet?
Elysian combines finance, operations, and NetSuite expertise to solve reporting and process challenges that standard functionality cannot fully address.
Discuss Your Challenge