Working notes on NetSuite, integrations, and the things that tend to break in production.
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 →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 →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 →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 →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 →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 →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 →How to separate projects from customers, align segments across systems, and automate entity matching during a QuickBooks-to-NetSuite migration.
Read article →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 →Real benchmarks showing how Promise.all and .promise() cut client-side SuiteScript execution time by 4x. Production code and console output included.
Read article →