Notes

Working notes on NetSuite, integrations, and the things that tend to break in production.

13 min read

Permission-Aware RAG: The Problem Nobody Mentions in the Tutorials

Every RAG tutorial assumes one user, one corpus. Production at a real company means scoping retrieval to what the asking user can see. The pattern that works, with Postgres RLS and a refusal probe.

Read article →
13 min read

Scheduled SuiteScripts That Hit External APIs: A Production Survival Guide

Three-tier error handling classified by HTTP code, circuit breakers for upstream outages, governance and wall-clock guards, and the field-stamp queue pattern. The shape of a scheduled script that survives a bad weekend at the upstream.

Read article →
9 min read

The Init Check Pattern: Catching SuiteScript Configuration Drift Before Production

A self-validation pattern that runs once on first execution, verifies every custom field and API credential the script depends on, and alerts the admin with a fix-it link when something is missing.

Read article →
12 min read

Chunking for RAG: When the Recursive Splitter Isn’t Enough

Most chunking tutorials produce garbage chunks for real documents. Section-aware splits, overlap that actually carries information, and the cleanup pass nobody mentions.

Read article →
10 min read

Stop Loading Records One at a Time: Bulk Fetch with SuiteQL and Group-By

The N+1 record.load pattern is still the most common governance leak I see. The fix is one SuiteQL query plus a JavaScript group-by. Bigger payoff than any other refactor.

Read article →
11 min read

Designing MCP Tool Responses That Don’t Make Claude Lie

A response envelope pattern that gives Claude what it needs to ground answers in real data, cite sources verbatim, and refuse honestly when the data doesn’t support an answer.

Read article →
15 min read

Building a Custom MCP Server for NetSuite (That Actually Works)

OAuth 2.0 + PKCE auth, weekly schema sync via the REST metadata-catalog, a SuiteQL guard that hard-blocks hallucinated identifiers, and a write protocol that survives audit. The pattern that actually holds up in production.

Read article →
12 min read

QuickBooks to NetSuite Migration: The Hard Parts Nobody Talks About

How to separate projects from customers, align segments across systems, and automate entity matching during a QuickBooks-to-NetSuite migration.

Read article →
18 min read

What .promise() Actually Does on the Server in SuiteScript

I thought server-side async was 4x faster. Forensic benchmarks on a production NetSuite account tell a different story. Full methodology and scripts included.

Read article →
10 min read

Your NetSuite Client Scripts Are 4x Slower Than They Need to Be

Real benchmarks showing how Promise.all and .promise() cut client-side SuiteScript execution time by 4x. Production code and console output included.

Read article →