LLMs Inside ERP — How AI Language Models Are Used in NetSuite Workflows in 2026
- LLMs in NetSuite workflows in 2026 are called via https.post() in SuiteScript — there is no native LLM inside NetSuite, only external API calls.
- The three highest-value use cases: purchase order approval drafting, customer communication generation, and GL account suggestion for uncategorised transactions.
- Governance is the constraint — each https.post() call costs governance budget that must fit within the script’s total allocation.
- SuiteScript calling an LLM API must handle: rate limits from the AI provider, API key storage (use Script Parameters, never hardcode), and timeout failures gracefully.
The promise of AI inside ERP is real but often oversold. NetSuite does not have a built-in LLM as of 2026. AI capabilities come from SuiteScript code calling external APIs — Claude, OpenAI, or any REST-accessible model. This means every AI use case in NetSuite is a custom integration, with all the governance, security, and failure-mode considerations that implies.
Use Case 1: Purchase Order Approval Drafting
When a PO arrives for approval, a Workflow Action calls a SuiteScript that fetches the PO lines, vendor history, and budget data, then asks an LLM to draft a recommendation memo. The approver receives a structured summary — PO total, vendor payment history, budget availability, and a recommended action — rather than raw PO data.
PO enters "Pending Approval" status
│
▼ (Workflow Action Script fires)
1. Load PO record + vendor record + GL budget
2. Build prompt:
"Summarise this purchase order for approval.
PO Total: {total}. Vendor: {name}.
Vendor last 3 invoices: {paid_on_time_rate}%.
Budget remaining for {category}: {budget}.
Return: recommendation (APPROVE/HOLD/ESCALATE)
and a 2-sentence rationale."
3. POST to Claude API → get JSON response
4. Write recommendation to custbody_ai_recommendation
5. Email approver with the memo attached
Use Case 2: GL Account Suggestion
Uncategorised vendor bills and expense reports often sit in a holding account waiting for manual classification. An LLM can read the line description, vendor name, and amount, then suggest the most likely GL account with a confidence score. High-confidence suggestions auto-assign; low-confidence suggestions route to the accountant with the suggestion pre-populated.
Use Case 3: Customer Communication Generation
When a customer invoice is overdue, a Scheduled Script generates a personalised reminder email: the LLM takes the invoice details, payment history, and account standing and drafts a tone-appropriate email (firm for persistently late payers, gentle for first-time late payers with good history). The draft is reviewed and sent via NetSuite’s email framework, not automatically.
Store API keys as Script Parameters (Deployment Parameters), not as string literals in the script. Hardcoded keys end up in NetSuite’s Script record, visible to any SuiteCloud admin. Script Parameters can be encrypted and are not visible in source code. Reference them with runtime.getCurrentScript().getParameter('custscript_llm_key').
Governance Budget for LLM Calls
| Script type | Governance budget | LLM calls per run (budget estimate) |
|---|---|---|
| User Event (afterSubmit) | 1,000 units | 1–2 calls max (each call ~200 units) |
| Scheduled Script | 10,000 units | 20–40 calls per run |
| Map/Reduce (per key) | 10,000 units | 20–40 calls per map stage |
| Workflow Action | 1,000 units | 1–2 calls max |
References
- SuiteScript https ModuleOracle NetSuite Help — https.post() reference for making external API calls from SuiteScript.
- Anthropic Messages APIAnthropic — the API endpoint called by SuiteScript for LLM-powered ERP automation.
- SuiteScript Governance ReferenceOracle NetSuite Help — governance units per API module call, including https module costs.
Leave a Reply