Back to Selected Work
Health/Insurance ServicesRescue & extensionUSD 20M+/yr through ERPSince 2022, ongoing

SuiteScript Performance Rescue + Event Layer

Delivered by Forward Within Consultancy (FWC)

Outcome Heaviest SuiteScript report: 15 seconds to 0.25 seconds (best case on one script, not an average).

The heaviest SuiteScript reports were hitting governance limits, and finance and HR still worked from batch data that was hours old

1

The Problem

Governance Limits and Batch Data, on a System Already Live

This health and insurance services provider ran project and claims work through NetSuite, with over USD 20 million a year flowing through it. The heaviest SuiteScript reports ran into NetSuite's governance limits, and finance and HR still worked from scheduled batch pulls.

Original Workflow

  • 1. Heavy SuiteScript reports hit governance limits and take 15 seconds or more per run
  • 2. Finance and HR pull a bulk batch on a fixed schedule and see hours-old numbers
  • 3. A script that times out fails with no clear alert
  • 4. Each new downstream system means another point-to-point script in NetSuite
2

Our Approach

Fix the Scripts First, Then Make the Data Move in Real Time

First, each script had to stay inside governance limits: the right script type for the job (a batch process belongs in Map/Reduce, not a Suitelet), with redundant record loads, uncached data and repeated searches removed. Then our NetSuite toolkit gave the account webhooks, so finance and HR stopped waiting for the batch.

Caveats

  • A faster script does not raise NetSuite's governance limit; it uses less of it per run
  • Up to 60x faster (15 seconds to 0.25 seconds) on the heaviest script; across our projects the average speed gain is 15%
  • The 20-minute bulk pull stayed as a fallback instead of being switched off on day one
3

The Solution

SuiteScript Rewrites, Then the Same Event Layer

We profiled the heaviest reports and rewrote them to call N/record, N/search and N/query only where each is needed, instead of looping through records and unoptimised saved searches. The toolkit then added event capture, emission and subscription management for real-time delivery.

Heaviest SuiteScript 2.x scripts profiled and rewritten for governance usage
Event capture layer (User Event, Scheduled, Map/Reduce) for record changes without a native webhook
Event subscription endpoint for real-time data integrations
Webhook delivery with retry backoff
4

Results

Faster Scripts, Then Real-Time Data

Heaviest SuiteScript execution time
15 seconds0.25 seconds (best case, one script)
Data freshness to downstream systems
Hours (batch sync)Seconds (real-time webhook)
New integration setup time
Days to weeksHours (subscribe via API)
Downstream systems connected
1-25+, and growing
Daily ERP operations via API
Manual or batch-driven4,500 a day, automated
Bulk polling pull
Every 20 minutes, ~10MB/pullKept only as a fallback

Related Reading

Where this applies

Have a Similar Challenge?

An ERP Health Check is a two-day review of an ERP that is already live, ending in a written report that ranks its defects by risk and gives a quote for each quick win.

Book The ERP Health Check, RM 4,000