NetSuite
Oracle NetSuite is a cloud-based ERP (Enterprise Resource Planning) platform that combines accounting, financials, CRM, inventory and order management, procurement, and HR/payroll into a single suite. NetSuite is used by tens of thousands of businesses worldwide to run core operations — invoicing, customer and vendor management, sales orders, purchase orders, journal entries, inventory tracking, and consolidated financial reporting (including OneWorld multi-subsidiary).
The Webrix NetSuite connector talks to NetSuite's REST Web Services and SuiteQL endpoints over OAuth 2.0, giving you secure, per-user access to records (customers, vendors, items, transactions) and SQL-like analytics across your account.
Authentication Types
NetSuite supports 1 authentication method through this connector:
- OAuth 2.0 (Authorization Code Grant) — Create your own integration record in NetSuite and connect each user with their NetSuite account.
- Pros: Secure, per-user authentication, automatic token refresh, supports all REST Web Services scopes, recommended by Oracle for new integrations.
- Cons: Requires administrator access in NetSuite to create the integration record and enable REST Web Services + OAuth 2.0 features.
- Best for: Production deployments where each user authenticates with their own NetSuite credentials and permissions.
NetSuite also supports Token-Based Authentication (TBA) via OAuth 1.0a and Client Credentials (M2M) flows. The Webrix connector uses OAuth 2.0 Authorization Code because it provides per-user attribution and the cleanest UX for end users.
General Settings
Before connecting, you must provide:
- NetSuite Account ID — Your NetSuite account identifier in URL form (lowercase, with hyphens instead of underscores).
- Production example:
1234567 - Sandbox example:
1234567-sb1 - Release Preview example:
1234567-rp1
- Production example:
Where to find your Account ID
- Log in to NetSuite as an administrator
- Go to Setup → Company → Company Information
- Look for the Account ID field
NetSuite displays the account ID in two forms:
- Internal form (with underscores, e.g.
1234567_SB1) — used in some UI screens - URL form (lowercase with hyphens, e.g.
1234567-sb1) — used in API endpoints
The Webrix connector requires the URL form. You can also see it in the URL when you're logged in to NetSuite — the subdomain of the URL is your account ID in URL form.
Setting up OAuth
To use NetSuite with Webrix, you need to enable REST Web Services + OAuth 2.0 in your NetSuite account, then create an integration record to obtain a Client ID and Client Secret.
1. Enable REST Web Services and OAuth 2.0
-
Log in to NetSuite as an administrator
-
Go to Setup → Company → Enable Features
-
Click the SuiteCloud tab
-
Under the SuiteTalk (Web Services) section, enable:
- REST Web Services
-
Under the Manage Authentication section, enable:
- OAuth 2.0
-
Click Save
tipIf you don't see these options, ensure your role has the Setup permission. The Administrator role has it by default.
2. Create an Integration Record
-
Go to Setup → Integration → Manage Integrations → New
-
Fill in the Name (e.g., "Webrix MCP Integration")
-
Set the State to Enabled
-
Under Authentication:
- Uncheck Token-Based Authentication
- Check Authorization Code Grant (under OAuth 2.0)
-
Under Scopes, select the scopes you need:
- REST Web Services — required for record API and SuiteQL (most common)
- RESTlets — only needed if you'll call custom RESTlet scripts
- SuiteAnalytics Connect — only needed for SuiteAnalytics Connect access
-
Copy the Redirect URI from Webrix and paste it into the Redirect URI field
tipYou can find the Redirect URI in Webrix when configuring the NetSuite connector in the Setup tab → Authentication section.
-
Click Save
-
NetSuite displays the Client Credentials at the bottom of the screen — copy:
- Client ID (Consumer Key)
- Client Secret (Consumer Secret)
warningThe Client Secret is shown only once. Copy it immediately and store it securely. If you lose it, you must reset the credentials and update Webrix.
3. Configure in Webrix
-
In Webrix, go to Integrations → New → Built-in
-
Select NetSuite and click Use
-
Under Authentication Type, select OAuth
-
Paste your Client ID and Client Secret into the corresponding fields
-
Under Scopes, click Add and select:
rest_webservices— required for all record and SuiteQL operationsrestlets— optional, only if you call RESTletssuite_analytics— optional, for SuiteAnalytics Connect
Minimum required:
rest_webservices -
Under Configuration, set the NetSuite Account ID in URL form (e.g.
1234567or1234567-sb1) -
Click Save Changes
4. Test the Connection
-
After saving, click Connect to test the OAuth flow
-
You'll be redirected to NetSuite's authorization page
-
Sign in to your NetSuite account (if not already signed in)
-
Select the Role to use for the integration (use a role with the permissions your tools need)
-
Review the requested permissions and click Allow
-
You'll be redirected back to Webrix with a successful connection
Understanding the Record API and SuiteQL
The connector uses two NetSuite endpoints:
Record API (/services/rest/record/v1/)
Used for typed CRUD operations on individual record types:
GET /record/v1/customer— list customersGET /record/v1/customer/{id}— get a customerPOST /record/v1/customer— create a customerPATCH /record/v1/customer/{id}— update a customer (sparse update)DELETE /record/v1/customer/{id}— delete a customer
Tools like List Customers, Get Sales Order, and Create Purchase Order use this API. For record types not exposed by a dedicated tool, use List Records, Get Record, and Delete Record with the camelCase recordType (e.g., opportunity, vendorBill, creditMemo, cashSale).
SuiteQL (/services/rest/query/v1/suiteql)
Used for SQL-like analytics queries that span multiple records, perform aggregations, or filter on fields not supported by the Record API:
SELECT
c.id,
c.companyname,
SUM(t.foreigntotal) AS lifetime_value
FROM customer c
LEFT JOIN transaction t ON t.entity = c.id
WHERE c.isinactive = 'F'
GROUP BY c.id, c.companyname
ORDER BY lifetime_value DESC
FETCH NEXT 50 ROWS ONLY
Use Run SuiteQL Query for these workflows.
Common Use Cases
Customer onboarding workflow
- Use List Subsidiaries to find the subsidiary internal ID (OneWorld accounts)
- Use Create Customer with
companyName,email, andsubsidiary_id - Optionally use Update Customer with
custom_fieldsto set additional fields like sales rep or category
Sales order to invoice workflow
- Use List Customers (or query) to find the customer's internal ID
- Use List Items to find item internal IDs
- Use Create Sales Order with
entity_id,item_lines, andsubsidiary_id - Once fulfilled in NetSuite, use List Invoices with
q="createdfrom.id IS '<sales_order_id>'"to find the resulting invoice
Procurement workflow
- Use List Vendors to find vendors
- Use List Items to find items to purchase
- Use Create Purchase Order with
entity_id(vendor),item_lines, andsubsidiary_id - Use List Records with
recordType="vendorBill"to track resulting bills
Financial reporting via SuiteQL
- Use Run SuiteQL Query to pull cross-record reports — e.g., revenue by customer, AR aging, expense by department
- Combine with List Accounts to discover account internal IDs for filters
Bulk discovery
- Use List Records with the desired
recordType(e.g.cashSale,creditMemo,transferOrder) andqfilter - Use Get Record to fetch full details for individual records
- Use Run SuiteQL Query for aggregations across many records
Rate Limits
NetSuite enforces concurrency limits per account based on your service tier:
- Standard accounts: typically 5 concurrent requests per account
- Premium accounts: typically 10–40 concurrent requests per account
- SuiteCloud Plus license: increases concurrency further
NetSuite does not enforce a strict per-minute request quota, but exceeding the concurrency limit returns HTTP 429 Too Many Requests.
Best Practices:
- Implement exponential backoff for 429 responses
- Use SuiteQL with aggregations instead of looping over many record API calls
- Cache reference data (subsidiaries, accounts, items) that change infrequently
- Use
limitandoffsetfor pagination instead of fetching everything at once
Troubleshooting
"Invalid login attempt" or 401 Unauthorized after connecting
Cause: OAuth 2.0 is not enabled on the integration record, or the Authorization Code Grant flow is unchecked.
Solution:
- In NetSuite, go to Setup → Integration → Manage Integrations and open your integration record
- Verify OAuth 2.0 → Authorization Code Grant is checked
- Verify the State is Enabled
- Verify your role has the REST Web Services permission (Setup → Users/Roles → Manage Roles)
- Disconnect and reconnect in Webrix to obtain new tokens
"Invalid redirect_uri" during OAuth
Cause: The redirect URI in the NetSuite integration record doesn't match the one Webrix is sending.
Solution:
- Copy the exact Redirect URI from Webrix (including
https://and any path) - In NetSuite, edit the integration record and paste the URI exactly into the Redirect URI field (trailing slashes matter)
- Save and try connecting again
"Invalid Account ID" or DNS resolution errors
Cause: The Account ID is in the wrong format. NetSuite requires the URL form (lowercase, hyphens) for API hostnames.
Solution:
- In Webrix, go to the NetSuite integration → Configuration
- Verify the NetSuite Account ID is in URL form:
- ✅
1234567(production) - ✅
1234567-sb1(sandbox) - ❌
1234567_SB1(this is the internal form — won't work in URLs)
- ✅
- The format must be lowercase with hyphens
403 Forbidden when calling a tool
Cause: The user's NetSuite role lacks permission for the record type, or the integration record doesn't have the required scope.
Solution:
- Verify the integration record has the REST Web Services scope checked
- Verify the user's role has permission for the record type (e.g., Lists → Customers for customer endpoints)
- For SuiteQL, verify the role has SuiteAnalytics Workbook or SuiteQL permission
- Disconnect and reconnect to refresh the token after permission changes
"Invalid record type" error
Cause: The recordType parameter passed to Get Record / List Records / Delete Record isn't a valid NetSuite REST record type name.
Solution:
- NetSuite REST record type names are camelCase, not the UI label (e.g.,
salesOrder, notSales Order) - Common record types:
customer,contact,vendor,employee,salesOrder,invoice,purchaseOrder,vendorBill,cashSale,creditMemo,estimate,opportunity,journalEntry,inventoryItem,serviceItem,nonInventoryItem,account,subsidiary,location,classification,department,currency,task,phoneCall,message,note - Refer to the NetSuite REST API Browser for the full list
SuiteQL: "User Error" or syntax errors
Cause: SuiteQL uses Oracle SQL syntax with NetSuite-specific table and column names.
Solution:
- Use lowercase column and table names:
SELECT id FROM customer, notSELECT ID FROM Customer - Use Oracle pagination:
FETCH NEXT 100 ROWS ONLY(orOFFSET 100 ROWS FETCH NEXT 100 ROWS ONLY) - Boolean fields use
'T'and'F'strings:WHERE isinactive = 'F' - Date functions:
TO_DATE('2024-01-01', 'YYYY-MM-DD') - Test queries first in NetSuite's Analytics → SuiteQL workbench
Subsidiary required error when creating records
Cause: OneWorld accounts require subsidiary on most records (customers, vendors, transactions).
Solution:
- Use List Subsidiaries to find the subsidiary internal ID
- Pass it as
subsidiary_idwhen calling Create Customer / Create Sales Order / Create Purchase Order / Create Journal Entry - The subsidiary must be one your role has access to
Token Refresh Failures
Cause: Refresh tokens expire after 7 days of inactivity or 180 days total (whichever comes first), per NetSuite OAuth 2.0 policy.
Solution:
- Disconnect and reconnect the integration in Webrix to obtain new tokens
- Verify the integration record in NetSuite is still Enabled
- Verify the Client ID/Client Secret have not been reset
"Stale" or concurrent update errors
Cause: Another user or process modified the record between your read and write.
Solution:
- Re-fetch the record with Get Customer / Get Sales Order / etc.
- Re-apply your update with the latest data
- NetSuite uses optimistic locking on most record types
Additional Resources
- NetSuite REST Web Services Documentation
- NetSuite REST API Browser — interactive list of all record types and fields
- SuiteQL Documentation
- OAuth 2.0 Authorization Code Grant Flow
- NetSuite Help Center
Need Help?
If you encounter issues not covered in this guide, please contact Webrix support with:
- The exact error message
- The tool you were using (e.g., Create Sales Order)
- Your NetSuite account type (production / sandbox / OneWorld)
- The HTTP status code returned (if visible)