Get In Touch
Our customer support team is available for help.
NetSuite AI

Availability last checked: August 27, 2026.
Over the past few decades, NetSuite has positioned itself as a robust cloud-based ERP solution that powers countless businesses across the globe. With its suite of applications designed to streamline financial management, inventory control, and customer relations, NetSuite continues to evolve, staying ahead of the curve in today’s competitive market. One of the key pillars of this evolution has been the introduction and expansion of SuiteScript. This scripting environment empowers developers to customize and extend NetSuite’s functionality to meet unique business needs. Now, with the integration of generative AI capabilities through SuiteScript 2.1 and theN/llm module, NetSuite is stepping into a new era of intelligent automation and innovation. For where this fits among NetSuite’s other AI capabilities, see our NetSuite AI Features overview.
define(['N/record'], function(record) {
async function createCustomer() {
// Try block to handle customer creation
try {
let customer = await record.create({
type: record.Type.CUSTOMER,
isDynamic: true
});
customer.setValue({ fieldId: 'companyname', value: 'Tech Innovators Ltd' });
let customerId = await customer.save();
console.log('Customer created with ID:', customerId);
} catch (error) {
console.error('Error creating customer:', error);
}
}
createCustomer();
This example demonstrates the use of async/await to simplify the handling of asynchronous record creation in NetSuite.N/llm module, open up new possibilities for how businesses can harness artificial intelligence directly within their ERP system.N/llm module to send a prompt to the LLM, from a server script only, this module is not available to client scripts.define(['N/llm'], function(llm) { function generateAIResponse() { try { let response = llm.generateText({ prompt: 'Summarize the current financial trends in our industry.' // modelFamily omitted here uses the current default, Cohere Command A }); console.log('AI Response:', response.text); } catch (error) { console.error('Error generating response:', error); } } generateAIResponse(); });In this script, the
generateText method from the N/llm module sends a request to the current default model and logs the AI-generated output. generateText, generateTextStreamed, evaluatePrompt, and evaluatePromptStreamed are the four documented methods on this module, all server-script only.N/llm module, not an open choice of any LLM. As of this check, the documented llm.ModelFamily options are:cohere.command-a-03-2025): the current default model when modelFamily is omitted from generateText or generateTextStreamed.cohere.command-a-vision): a vision-capable variant for image-inclusive prompts.openai.gpt-oss-120b): an open-weight OpenAI model made available through the same module.llm.ModelFamily documentation before hardcoding a modelFamily value in production code.modelFamily is left unspecified, Oracle documents that Cohere Command A is used automatically. The model then generates a response based on the prompt and any supplied context, there is no separate “basic” versus “advanced” model tier, every call to the same method uses the same governance and consumption rules described below.N/llm with caution.N/llm methods are not available to client scripts.generateText, drawn from the script’s normal SuiteScript governance allotment, separate from AI Units.timeout option.N/llm workflow is 5-25 AI Units per call. See our NetSuite AI Units guide for entitlement, monitoring, and planning detail this article does not repeat.| Error code | Condition |
|---|---|
| SSS_MISSING_REQD_ARGUMENT | The required prompt parameter is missing |
| MAXIMUM_PARALLEL_REQUESTS_LIMIT_EXCEEDED | More than 5 parallel requests to the LLM |
| INAPPROPRIATE_CONTENT_DETECTED | The response was restricted by safety filtering |
| INVALID_MODEL_FAMILY_VALUE | The modelFamily value isn’t a currently valid option |
A production script should catch these explicitly, not just a generic try/catch, since “the LLM call failed” and “you exceeded the parallel-request limit” call for different responses.
N/llm is the right tool when you’re calling one of Oracle’s own documented models from inside a server script you control. If your use case is connecting an external AI model or agent, such as Claude, to NetSuite data more broadly, or letting an external AI client take actions across multiple records, that’s the AI Connector Service‘s job, not this module’s. The two are complementary, not competing options for the same problem.
N/llm to generate a draft summary of key performance indicators, financial reports, inventory status, or sales trends, with a human reviewing the summary against the source data before it’s distributed.N/llm module gives developers a documented, governed way to call generative AI models from server-side NetSuite code, bounded by real governance limits, a fixed concurrency cap, and AI Units consumption, not an open-ended “free versus paid” choice. Understanding those bounds up front, and validating generated output before it drives a business decision, is what makes this a reliable building block rather than a black box.Read More: SuiteScript 2.1 Generative AI APIs · NetSuite AI Features overviewNext Step
ERP Peers can review your intended automation, N/llm usage patterns, AI Units assumptions, execution-context and permission design, and human-validation plan before you build against this module.
Our customer support team is available for help.
Need help with NetSuite?
Chat with our team.