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 the N/llm
module, NetSuite is stepping into a new era of intelligent automation and innovation.
SuiteScript has been a foundational tool for developers aiming to tailor NetSuite’s ERP capabilities to specific business workflows. Over time, SuiteScript has undergone significant updates to keep up with modern development practices. SuiteScript 2.1 is the latest iteration, building on its predecessors with a range of new and improved features.
SuiteScript 2.1 introduces a variety of enhancements that make development more streamlined and efficient:
Below is a simple example showcasing SuiteScript 2.1’s async/await feature:
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.
NetSuite’s commitment to innovation has led to the introduction of Generative AI capabilities within its SuiteScript framework. The SuiteScript Generative AI APIs, part of the N/llm
module, open up new possibilities for how businesses can harness artificial intelligence directly within their ERP system.
The integration between NetSuite and Oracle Cloud Infrastructure’s (OCI) Generative AI service allows developers to send requests to large language models (LLMs) and receive AI-generated responses. This feature is a step toward enhancing how data is processed and insights are generated within NetSuite.
Key Benefits:
The flow of data through the SuiteScript Generative AI APIs can be summarized in these steps:
N/llm
module to send a prompt to the LLM.
define(['N/llm'], function(llm) { function generateAIResponse() { try { let response = llm.generateText({ prompt: 'Summarize the current financial trends in our industry.', modelFamily: 'cohere.command-r-16k' }); 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 is used to send a request to the Cohere Command R model and log the AI-generated output.
NetSuite’s SuiteScript platform integrates with a range of powerful large language models (LLMs) to enhance its capabilities, enabling automation, smarter decision-making, and more efficient workflows. These LLMs can process vast amounts of data, generate insights, and automate processes across various business functions. Some of the most notable models supported by NetSuite’s SuiteScript integration include:
When using SuiteScript with generative AI APIs, the default behavior of the models is to generate results based on the specific inputs provided through the API. Typically, the models respond with generated text or data-driven insights that align with the context of the business processes. The integration of LLMs such as Cohere Command R and Meta Llama 3.1 ensures that these responses are relevant, context-sensitive, and aligned with the user’s specific data set. Whether it’s creating personalized customer communications, summarizing reports, or generating new content, the default model behavior ensures a consistent and effective output.
By leveraging these models, businesses can harness the full power of generative AI, enhancing the functionality of their NetSuite ERP and driving further efficiencies across their operations.
NetSuite’s integration with generative AI APIs provides flexibility in how businesses use AI-driven capabilities within their ERP system. The usage modes offered allow companies to scale AI capabilities according to their needs, whether for small-scale tasks or larger, enterprise-level applications. These modes provide different levels of access and control, allowing businesses to optimize their workflows.
Free Mode offers a limited yet powerful way to leverage generative AI capabilities within NetSuite, designed for smaller or experimental use cases. This mode is ideal for businesses that want to test the waters of AI integration without committing significant resources upfront.
On-Demand Mode is tailored for larger, more complex operations that require higher throughput and more advanced AI capabilities. This mode unlocks the full potential of generative AI, allowing businesses to handle larger data sets and more intricate tasks while providing greater control over model parameters and outputs.
With On-Demand Mode, businesses can fully integrate generative AI into their daily operations, unlocking greater efficiencies and capabilities across their NetSuite platform. Whether for strategic initiatives, customer engagement, or operational optimization, this mode empowers businesses to scale AI adoption in line with their evolving needs.
The integration of SuiteScript 2.1 and generative AI within NetSuite opens up numerous possibilities for automating tasks, enhancing decision-making, and improving business efficiency. Here are some practical use cases where these capabilities can deliver significant value to businesses:
One of the key strengths of generative AI within NetSuite is its ability to automate report summarization. Businesses often deal with large, complex reports that can be time-consuming to analyze manually. With AI integration, NetSuite can automatically generate concise summaries of key performance indicators (KPIs), financial reports, inventory status, or sales trends, allowing decision-makers to quickly grasp the most important insights.
Generative AI can help businesses unlock valuable insights from their data, enabling smarter, more informed decision-making. By analyzing historical data, transactional records, or real-time business metrics, AI models can generate actionable recommendations, predict future trends, and identify potential areas for improvement.
Additionally, AI can assist in forecasting demand by analyzing historical sales data, seasonal trends, and market conditions. This allows businesses to proactively adjust inventory levels, production schedules, and marketing strategies.
Generative AI offers powerful content creation capabilities, which can be a game-changer for businesses that need to generate large volumes of text. Whether it’s for marketing campaigns, customer communications, or product descriptions, AI can automate content generation to maintain consistent messaging and save time.
These practical applications of SuiteScript 2.1 and generative AI can significantly enhance business processes, streamline operations, and unlock new opportunities for growth and innovation. As AI technology continues to evolve, the potential for even more advanced and customized use cases will expand, further transforming how businesses manage their data and operations.