Lightbridge ERP A Lightbridge company
VC Written by Vince Celemin with Robert LabardeeNetSuite Developer and Founder and CEO

NetSuite N/llm SuiteScript Module

Lightbridge ERP defines N/llm as NetSuite's native SuiteScript 2.1 module for generative AI. It bridges a script to the Oracle Cloud Infrastructure Generative AI service, where a supported large language model returns text, embeddings, or chat responses. Per Oracle documentation, N/llm is available for accounts in certain regions only.

This guide is general information, not accounting, tax, or legal advice. It is a developer reference for the N/llm module. For the business-level view of AI across NetSuite, see the NetSuite AI hub.

N/llm gives SuiteScript a call into a large language model.

N/llm is the SuiteScript 2.1 module that lets server-side code send a prompt to a large language model and receive a generated response, without leaving NetSuite. NetSuite reaches the model through an integration with the Oracle Cloud Infrastructure Generative AI service. A script forms a prompt, calls the module, and gets back text, embeddings, or a chat response to use in the account. Oracle documentation states that the SuiteScript Generative AI APIs are available only for accounts located in certain regions, so availability is a precondition to confirm before design.

This is a distinct capability from moving data in and out of NetSuite. Connecting NetSuite to other systems is the job of SuiteTalk web services, RESTlets, and SuiteScript integration, covered in the NetSuite API and integration guide. N/llm is not an integration surface: it is an in-platform call to a language model. For the catalog of NetSuite business modules, see the NetSuite modules guide, and for the business-level view of AI in the platform, the NetSuite AI hub. The generic concept of AI inside any ERP is covered in the AI in ERP guide.

Because the module cannot fabricate what it never received, the central design fact is simple. The model sees only the text a script places in the prompt. It has no view of NetSuite records on its own. Every well-built N/llm solution begins by deciding which data the script will query and pass, and which data it will deliberately withhold.

The N/llm API surface is small and predictable.

The module exposes a compact set of methods, each documented in the Oracle NetSuite help center. The names below and their behaviors are grounded in that documentation, not in third-party commentary.

generateText

The core call. llm.generateText(options) sends a prompt and model parameters to the LLM and returns generated text. It also exposes llm.generateText.promise(options) for asynchronous use and llm.generateTextStreamed(options), which returns content as the model produces it rather than all at once.

evaluatePrompt

llm.evaluatePrompt(options) runs a saved prompt authored in Prompt Studio by its prompt ID, passing variable values from the script. This keeps prompt text out of code, so an administrator can edit tone or wording in the UI. A streamed variant, evaluatePromptStreamed, is documented alongside it.

embed

llm.embed(options) returns vector embeddings for input text, the basis for semantic search and retrieval patterns. Embedding calls draw from a separate monthly free usage pool from the generate methods, per Oracle documentation.

createChatMessage and roles

llm.createChatMessage(options) builds a role-tagged ChatMessage. Passing an ordered array of prior messages gives the model multi-turn context, so a follow-up request understands what came before without restating it.

getRemainingFreeUsage

llm.getRemainingFreeUsage() returns how many free generate requests remain in the current month, with getRemainingFreeEmbedUsage() for the separate embedding pool. Read these before a batch job so a script can degrade gracefully instead of erroring when the pool is exhausted.

modelFamily and the default model

The modelFamily parameter selects the model through the llm.ModelFamily enum. If a script does not set it, Oracle documentation states the Cohere Command A model (cohere.command-a-03-2025) is used. The available models are governed by the OCI Generative AI service, not by the script.

Availability of the module and every method under it is region-gated: per Oracle documentation the SuiteScript Generative AI APIs are offered only to accounts in certain regions. Confirm the account qualifies before building against it.

N/llm usage runs on a free monthly pool, then on-demand.

NetSuite provides a limited free monthly usage pool for N/llm requests that refreshes each month, with a separate pool for embedding calls. When the pool is exhausted, the module returns an error until the next reset. For higher volume, Oracle documentation describes an On Demand mode billed through a company's own Oracle Cloud account, and a Dedicated AI Cluster option for scale. These are Oracle's commercial terms. Lightbridge ERP is an independent, vendor-neutral advisor and a former NetSuite partner; it does not resell NetSuite and does not position on price.

Two governance facts shape design. N/llm calls consume SuiteScript API governance units, so they count against a script's execution limits like any other server operation. Oracle documentation also notes a concurrency limit of up to five simultaneous calls to generate methods and five to embed methods. The practical rule follows: treat each call as expensive, never loop the model, and read llm.getRemainingFreeUsage() before a batch so the script degrades gracefully instead of erroring mid-run.

N/llm best practices center on validation, context, and control.

Adopting generative AI inside an ERP account calls for discipline. The practices below combine Oracle guidance with the controls a finance-grade system needs.

Validate every output

Generative models are probabilistic and can produce wrong or fabricated answers. Oracle documentation states that you must validate AI-generated responses for accuracy and quality, and that Oracle NetSuite is not responsible for the use of AI-generated content. Treat output as a draft. Keep a human in the loop for anything customer-facing or financial until the pattern is proven.

Pass record context explicitly

The model cannot see NetSuite data. It knows only what the prompt contains. If a task needs an invoice, a case thread, or item details, the script must query that data and place the relevant fields into the prompt. Keep the prompt focused: include what the task needs and nothing more.

Protect sensitive data

Oracle documentation states that data does not leave Oracle and is not used by third parties for model training, but it is still processed by Oracle systems and may be processed globally under the Oracle Services Privacy Policy. Avoid sending personally identifiable information, account numbers, or credentials. Send extracted fields, not raw records, and confirm the flow meets your compliance obligations.

Restrict and log usage

Access to an AI-powered Suitelet or workflow action should be scoped to specific roles, not open to every user. Log the prompt and response, or an identifier for them, to a custom record so requests are auditable. In finance, an unexplained AI output is worse than none.

Treat calls as expensive

N/llm calls are subject to SuiteScript API governance limits, and Oracle documentation notes a limit of up to five concurrent calls to generate methods and five to embed methods. A call can also take a few seconds to return. Do not call the model in a tight loop or on every page load. Use the asynchronous or streamed methods for interactive screens.

Start simple, iterate, use Prompt Studio

Begin with an internal, low-risk use case to learn how the model responds to your domain language, then expand once the behavior is understood. Define reusable prompts in Prompt Studio and call them with evaluatePrompt, so prompt text is governed centrally and the SuiteScript stays clean.

Generative-AI strategy, responsible-AI controls, and AI governance are owned by Lightbridge Labs, the group AI practice. Lightbridge ERP owns the NetSuite build that puts those controls into a working script.

Realistic N/llm use cases automate the text-heavy work.

The strongest early N/llm use cases share a shape: the script gathers structured data from NetSuite, and the model turns it into readable language. Each of these runs on standard records through SuiteScript, with a person reviewing anything that leaves the building.

Report narrative generation

After a close, a script gathers the period figures with SuiteQL and asks the model to write a plain-language commentary on trends and variances for management review. The numbers come from NetSuite; the model only phrases them.

Dunning letter drafting

A scheduled script compiles overdue-invoice context per customer and prompts the model for a courteous collection notice, generated as a communication record for a person to review before it is sent.

Sales email and proposal drafts

From an opportunity record, a script feeds prospect and item details into a prompt and returns a first-draft follow-up email or proposal, grounded in the account data the script supplied.

Support case summaries

A button on a case compiles the thread and notes, then asks the model for a concise summary or a suggested reply, so an agent grasps a long case quickly.

Product content cleanup

On item records, a script uses the model to normalize or tidy descriptions, correcting formatting and typos while a person confirms the result.

Lightbridge ERP builds N/llm solutions in-house.

Lightbridge ERP is an independent, vendor-neutral ERP advisory firm and a former NetSuite partner, with NetSuite as its in-house delivery flagship. Its NetSuite-certified engineers scope the use case, write the SuiteScript, govern prompts in Prompt Studio, and wrap the calls in the validation, access control, and logging a finance system requires. The work stays anchored to a real outcome: a faster close narrative, quicker collections drafts, cleaner item content, not an AI feature for its own sake.

The division of labor is clean. NetSuite advisory, optimization, and the SuiteScript build sit with Lightbridge ERP. Broader generative-AI strategy, model selection beyond the platform, and AI governance sit with Lightbridge Labs. For the platform view of AI across NetSuite, see the NetSuite AI hub; for connecting NetSuite to other systems, the NetSuite API and integration guide. Because Lightbridge ERP accepts no vendor kickbacks and no reseller quotas, and operates to ISO 27001 and SOC 2 controls with certification in progress, the advice on where N/llm genuinely fits stays honest.

NetSuite N/llm SuiteScript module: frequently asked questions

What is the NetSuite N/llm module?
N/llm is NetSuite's native SuiteScript 2.1 module for generative AI. A script uses it to send a prompt to a large language model and receive a generated response. NetSuite reaches the model through an integration with the Oracle Cloud Infrastructure Generative AI service, so the developer does not build or host an AI stack. Per Oracle documentation, the SuiteScript Generative AI APIs are available only for accounts located in certain regions. Lightbridge ERP builds and optimizes N/llm solutions in-house as part of its NetSuite practice.
What methods does the N/llm module provide?
The core method is llm.generateText, which sends a prompt and returns text, with a promise variant for asynchronous use and a streamed variant that returns content as it is produced. llm.evaluatePrompt runs a saved Prompt Studio prompt by ID. llm.embed returns vector embeddings for semantic search. llm.createChatMessage builds role-tagged messages for multi-turn context. llm.getRemainingFreeUsage reports remaining free requests for the month. The model is selected with the modelFamily parameter. These names and behaviors are documented in the Oracle NetSuite help center.
Which language model does N/llm use?
N/llm calls models hosted by the Oracle Cloud Infrastructure Generative AI service, selected through the modelFamily parameter and the llm.ModelFamily enum. Oracle documentation states that if a script does not specify a model, the Cohere Command A model is used. Because the models are governed by the OCI service rather than by the script, the available options can change as Oracle updates that service. For the current model list, consult the Oracle NetSuite documentation directly rather than a fixed figure.
Is data sent to N/llm private?
Oracle documentation states that data used with N/llm does not leave Oracle and is not used by third parties for model training. The data is still processed by Oracle systems and, per the same documentation, may be processed globally under the Oracle Services Privacy Policy. The practical rule for developers is to send only what the task needs. Avoid personally identifiable information, account numbers, and credentials, extract the specific fields a prompt requires rather than passing raw records, and confirm the flow meets your own compliance requirements.
How is N/llm usage priced?
NetSuite provides a limited free monthly usage pool for N/llm requests that refreshes each month, with a separate pool for embedding calls. When the free pool is exhausted, the module returns an error until the next month. For higher volume, Oracle documentation describes an On Demand mode billed through your company's own Oracle Cloud account, and a Dedicated AI Cluster option. These are Oracle's commercial terms, not Lightbridge pricing. Lightbridge ERP is an independent, vendor-neutral advisor and a former NetSuite partner, so it does not resell NetSuite or position on price.
What are the main best practices for N/llm?
Validate every output, because Oracle states you are responsible for how AI-generated content is used. Pass record context explicitly, because the model sees only what the prompt contains. Protect sensitive data by sending extracted fields rather than raw records. Restrict access to specific roles and log prompts and responses for audit. Treat each call as expensive: N/llm calls consume SuiteScript governance units, so avoid tight loops and use asynchronous or streamed methods for interactive screens. Start with a simple use case and manage reusable prompts in Prompt Studio.
How does Lightbridge ERP work with N/llm?
Lightbridge ERP is an independent, vendor-neutral ERP advisory firm and a former NetSuite partner, with NetSuite as its in-house delivery flagship. Its NetSuite-certified engineers design, build, and optimize N/llm solutions inside a client account: scoping the use case, writing the SuiteScript, governing prompts in Prompt Studio, and putting validation and logging around the calls. Broader generative-AI strategy and AI governance sit with Lightbridge Labs, the group AI practice. Lightbridge ERP keeps the NetSuite build grounded in the finance and operations outcome it serves.

Build the N/llm solution, not the AI stack.

Lightbridge ERP scopes, builds, and governs N/llm solutions inside NetSuite in-house: the right use case, clean prompts, validated output, and controlled access.