Collective Suite - A NetSuite Blog - Collective Mind Technologies - Denver Colorado

NetSuite AI | Artificial Intelligence for ERP

Collective Suite - A NetSuite Blog - Collective Mind Technologies - Denver Colorado

NetSuite AI
Artificial Intelligence for ERP

NetSuite is moving extremely quickly into the AI integration within the platform. AI will streamline daily operations, suggest actions to improve processes, enhance data, and unleash ERP insights with informed platform unification.

Right now NetSuite is utilizing Oracle’s Cloud Infrastructure (OCI) for its AI integration, specifically adding Cohere’s LLM. Cohere is the leading AI platform for enterprises. Its world-class AI is uniquely suited to the needs of businesses, unlocking unprecedented ease of use, accessibility, and data privacy.

I believe NetSuite and Oracle are only getting started with artificial intelligence for ERP and will dive deep into unleashing AI into the Suite over the next few years.

I wanted to showcase a few examples of what I have seen so far from 2024.2.

Text Enhance

Text Enhance is one of the first built-in AI features NetSuite brought to all accounts. It’s currently integrated into 200 different text fields and I’m guessing plenty more are on the way. It’s the easiest way to test out and start utilizing artificial intelligence in your account. Whenever I try it, the more I click “Clean up” the longer my text becomes.  Depending on your needs for the text field you’re editing, this can be good or bad. I believe this is setting up for future implementation into any and all text fields inside of NetSuite. 

Take a look and see how you can use it in your account:

 

AI Text Enhance: https://www.netsuite.com/portal/products/artificial-intelligence-ai/text-enhance.shtml

 

Chat Bot

Recently NetSuite wisely created and provided a Chat Bot example script for anyone to use. The link to the example is below. This is NetSuite’s attempt at testing and bringing in their own “ChatGPT” chatbot. Right now it’s using the Cohere LLM which was announced at SuiteWorld 2023. 

I would highly recommend testing out the script below and seeing how it can work for you and your team. I have noticed it isn’t as “connected” to the data in your account yet. I believe it will be integrated more as time progresses. This is the approach other platforms are taking to have secure, consolidated, and secular data to send to AI. 

 

NetSuite AI Chat Bot script: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/article_1028082407.html

 

AI Summary | N/llm Module example

NetSuite released in their latest update, 2024.2, a new scripting module called N/llm. This provides access to the Large Language Model from Cohere. One of the simplest ways to use this feature would be to run a single text field (that doesn’t have Text Enhance) through the LLM to get an AI summary. This is precisely what I did to test this new feature.

Using AI to expedite the scripting experience, I provided an example chatbot script and the field ID for the Sales Order memo field to the AI. I then requested a script to summarize the memo field. Once I created a custom “AI Memo Summary” field, the script functioned seamlessly after saving the Sales Order. 

The script example is below if you would like to test it out in your NetSuite ERP account:

https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/article_9123730083.html

 

If you need any NetSuite AI help, please contact us today!

 

				
					/**
 * @NApiVersion 2.1
 * @NScriptType UserEventScript
 */
define(['N/record', 'N/llm', 'N/log'], (record, llm, log) => {
    /**
     * Function to execute before a record is saved.
     *
     * @param {Object} scriptContext
     * @param {Record} scriptContext.newRecord
     */
    function beforeSubmit(scriptContext) {
        try {
            const rec = scriptContext.newRecord;

            if (rec.type === 'salesorder') {
                const memo = rec.getValue('memo'); // Retrieve the memo field

                if (memo) {
                    // Generate AI summary using the custom LLM setup
                    const llmResponse = llm.generateText({
                        prompt: `Summarize the following sales order memo: "${memo}"`,
                        modelParameters: {
                            maxTokens: 500,          // Limit the token count for summary
                            temperature: 0.7         // Set creativity level
                        }
                    });

                    const summary = llmResponse.text;

                    log.debug('LLM Summary Response', summary);

                    // Save the AI-generated summary in the custom field
                    rec.setValue({
                        fieldId: 'custbody_ai_summary_field', // Replace with the internal ID of your custom field
                        value: summary,
                    });
                }
            }
        } catch (error) {
            log.error({
                title: 'Error in beforeSubmit',
                details: error.message,
            });
        }
    }

    return {
        beforeSubmit,
    };
});
				
			

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top