KosmoKrator

other

Netsuite CLI for AI Agents

Use the Netsuite CLI from KosmoKrator to call Netsuite tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write Manual OAuth token auth

Netsuite CLI Setup

Netsuite can be configured headlessly with `kosmokrator integrations:configure netsuite`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure netsuite --set access_token="$NETSUITE_ACCESS_TOKEN" --set url="$NETSUITE_URL" --enable --read allow --write ask --json
kosmokrator integrations:doctor netsuite --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token NETSUITE_ACCESS_TOKEN Secret secret yes Access Token
url NETSUITE_URL URL url yes REST API Base URL

Call Netsuite Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call netsuite.netsuite_list_customers '{
  "limit": 1,
  "offset": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:netsuite netsuite_list_customers '{
  "limit": 1,
  "offset": 1
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs netsuite --json
kosmo integrations:docs netsuite.netsuite_list_customers --json
kosmo integrations:schema netsuite.netsuite_list_customers --json
kosmo integrations:search "Netsuite" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Netsuite.

netsuite.netsuite_list_customers

Read read

List customers from NetSuite ERP. Returns customer records with names, IDs, and basic details. Use limit and offset for pagination.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call netsuite.netsuite_list_customers '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:netsuite netsuite_list_customers '{"limit":1,"offset":1}' --json

netsuite.netsuite_get_customer

Read read

Get detailed information for a single NetSuite customer by internal ID. Returns full customer record including contact details, addresses, and financial information.

Parameters
id

Generic CLI call

kosmo integrations:call netsuite.netsuite_get_customer '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:netsuite netsuite_get_customer '{"id":"example_id"}' --json

netsuite.netsuite_create_customer

Write write

Create a new customer in NetSuite ERP. Provide at minimum the company name or first/last name. Additional fields like email, phone, subsidiary, and address can be included.

Parameters
companyname, firstname, lastname, email, phone, subsidiary, entitystatus, currency, terms, addressbook

Generic CLI call

kosmo integrations:call netsuite.netsuite_create_customer '{"companyname":"example_companyname","firstname":"example_firstname","lastname":"example_lastname","email":"example_email","phone":"example_phone","subsidiary":"example_subsidiary","entitystatus":"example_entitystatus","currency":"example_currency"}' --json

Provider shortcut

kosmo integrations:netsuite netsuite_create_customer '{"companyname":"example_companyname","firstname":"example_firstname","lastname":"example_lastname","email":"example_email","phone":"example_phone","subsidiary":"example_subsidiary","entitystatus":"example_entitystatus","currency":"example_currency"}' --json

netsuite.netsuite_list_invoices

Read read

List invoices from NetSuite ERP. Returns invoice records with amounts, statuses, customer references, and dates. Use limit and offset for pagination.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call netsuite.netsuite_list_invoices '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:netsuite netsuite_list_invoices '{"limit":1,"offset":1}' --json

netsuite.netsuite_list_sales_orders

Read read

List sales orders from NetSuite ERP. Returns sales order records with order details, line items, customer references, and statuses. Use limit and offset for pagination.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call netsuite.netsuite_list_sales_orders '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:netsuite netsuite_list_sales_orders '{"limit":1,"offset":1}' --json

netsuite.netsuite_list_items

Read read

List items (products and services) from NetSuite ERP. Returns item records with names, IDs, types, and pricing. Use limit and offset for pagination.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call netsuite.netsuite_list_items '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:netsuite netsuite_list_items '{"limit":1,"offset":1}' --json

netsuite.netsuite_get_current_user

Read read

Get the profile of the currently authenticated NetSuite user. Returns user details like name, email, role, and subsidiary.

Parameters
none

Generic CLI call

kosmo integrations:call netsuite.netsuite_get_current_user '{}' --json

Provider shortcut

kosmo integrations:netsuite netsuite_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

netsuite.netsuite_list_customers

List customers from NetSuite ERP. Returns customer records with names, IDs, and basic details. Use limit and offset for pagination.

Operation
Read read
Schema command
kosmo integrations:schema netsuite.netsuite_list_customers --json
ParameterTypeRequiredDescription
limit integer no Maximum number of customers to return (default: 50, max: 1000).
offset integer no Zero-based offset for pagination.

netsuite.netsuite_get_customer

Get detailed information for a single NetSuite customer by internal ID. Returns full customer record including contact details, addresses, and financial information.

Operation
Read read
Schema command
kosmo integrations:schema netsuite.netsuite_get_customer --json
ParameterTypeRequiredDescription
id string yes The internal ID of the customer in NetSuite.

netsuite.netsuite_create_customer

Create a new customer in NetSuite ERP. Provide at minimum the company name or first/last name. Additional fields like email, phone, subsidiary, and address can be included.

Operation
Write write
Schema command
kosmo integrations:schema netsuite.netsuite_create_customer --json
ParameterTypeRequiredDescription
companyname string no Company name for the customer (required for company customers).
firstname string no First name (required for individual customers).
lastname string no Last name (required for individual customers).
email string no Primary email address.
phone string no Primary phone number.
subsidiary string no Subsidiary internal ID or ref (required for OneWorld accounts).
entitystatus string no Customer status (e.g., "CUSTOMER-Closed", "CUSTOMER-Lost").
currency string no Currency internal ID or ref (e.g., "1" for USD).
terms string no Payment terms internal ID or ref.
addressbook array no Array of address objects with addr1, city, state, zip, country fields.

netsuite.netsuite_list_invoices

List invoices from NetSuite ERP. Returns invoice records with amounts, statuses, customer references, and dates. Use limit and offset for pagination.

Operation
Read read
Schema command
kosmo integrations:schema netsuite.netsuite_list_invoices --json
ParameterTypeRequiredDescription
limit integer no Maximum number of invoices to return (default: 50, max: 1000).
offset integer no Zero-based offset for pagination.

netsuite.netsuite_list_sales_orders

List sales orders from NetSuite ERP. Returns sales order records with order details, line items, customer references, and statuses. Use limit and offset for pagination.

Operation
Read read
Schema command
kosmo integrations:schema netsuite.netsuite_list_sales_orders --json
ParameterTypeRequiredDescription
limit integer no Maximum number of sales orders to return (default: 50, max: 1000).
offset integer no Zero-based offset for pagination.

netsuite.netsuite_list_items

List items (products and services) from NetSuite ERP. Returns item records with names, IDs, types, and pricing. Use limit and offset for pagination.

Operation
Read read
Schema command
kosmo integrations:schema netsuite.netsuite_list_items --json
ParameterTypeRequiredDescription
limit integer no Maximum number of items to return (default: 50, max: 1000).
offset integer no Zero-based offset for pagination.

netsuite.netsuite_get_current_user

Get the profile of the currently authenticated NetSuite user. Returns user details like name, email, role, and subsidiary.

Operation
Read read
Schema command
kosmo integrations:schema netsuite.netsuite_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.