NetSuite
ERP integration for customers, invoices, bills, and GL entries
NetSuite
Connect to NetSuite for comprehensive ERP automation including customers, invoices, vendor bills, journal entries, and SuiteQL queries.
Overview
NetSuite is Oracle's cloud ERP platform. The integration supports:
- Customers - Customer master records
- Invoices - Customer invoices (AR)
- Vendor Bills - Vendor bills (AP)
- Journal Entries - GL journal entries
- Vendors - Vendor master records
- Generic Records - Any NetSuite record type
- SuiteQL - SQL-like queries
Prerequisites
- NetSuite account with SuiteCloud enabled
- Token-Based Authentication (TBA) configured
- REST Web Services enabled
- Appropriate role permissions
Authentication
NetSuite uses OAuth 1.0a Token-Based Authentication via Nango.
Required Permissions
| Permission | Description |
|---|---|
REST Web Services | Access REST API |
| Record-level permissions | Based on records accessed |
SuiteAnalytics Workbook | For SuiteQL queries |
Available Actions
Customer Actions
createCustomer
Create a new customer.
Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
entityId | string | No | Customer ID/number |
companyName | string | Yes* | Company name (*or firstName/lastName) |
subsidiaryId | string | Yes | Subsidiary internal ID |
email | string | No | Email address |
phone | string | No | Phone number |
isPerson | boolean | No | Individual vs company |
firstName | string | No | First name (if isPerson) |
lastName | string | No | Last name (if isPerson) |
termsId | string | No | Payment terms internal ID |
creditLimit | number | No | Credit limit |
currencyId | string | No | Currency internal ID |
taxable | boolean | No | Is taxable |
billingAddress | object | No | Billing address |
externalId | string | No | External system ID |
customFields | object | No | Custom field values |
getCustomer
Get a customer by internal ID.
updateCustomer
Update an existing customer.
listCustomers
Search customers using SuiteQL.
Invoice Actions
createInvoice
Create a customer invoice.
Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | Customer internal ID |
subsidiaryId | string | No | Subsidiary internal ID |
invoiceDate | string | No | Transaction date (YYYY-MM-DD) |
dueDate | string | No | Due date |
invoiceNumber | string | No | Document number |
termsId | string | No | Payment terms ID |
memo | string | No | Internal memo |
currencyId | string | No | Currency ID |
lines | array | Yes | Line items |
lines[].itemId | string | Yes | Item internal ID |
lines[].quantity | number | No | Quantity (default: 1) |
lines[].rate | number | No | Unit rate |
lines[].amount | number | No | Line amount |
lines[].description | string | No | Line description |
lines[].taxCode | string | No | Tax code ID |
lines[].department | string | No | Department ID |
lines[].class | string | No | Class ID |
lines[].location | string | No | Location ID |
departmentId | string | No | Header department |
classId | string | No | Header class |
locationId | string | No | Header location |
poNumber | string | No | Customer PO number |
salesRepId | string | No | Sales rep ID |
externalId | string | No | External ID |
customFields | object | No | Custom field values |
getInvoice
Get an invoice by internal ID.
updateInvoice
Update an invoice.
listInvoices
Search invoices using SuiteQL.
Vendor Bill Actions
createVendorBill
Create a vendor bill (accounts payable).
Line Types:
- Expense lines: Use
accountIdfor expense account - Item lines: Use
itemIdfor inventory/service items - Billable expenses: Set
customerIdandisBillable: true
getVendorBill
Get a vendor bill by internal ID.
listVendorBills
Search vendor bills using SuiteQL.
Journal Entry Actions
createJournalEntry
Create a GL journal entry.
Journal entries must balance. Total debits must equal total credits.
Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
subsidiaryId | string | Yes | Subsidiary ID |
tranDate | string | No | Transaction date |
tranId | string | No | Document number |
memo | string | No | Header memo |
currencyId | string | No | Currency ID |
approved | boolean | No | Auto-approve (default: true) |
lines | array | Yes | Journal lines (min 2) |
lines[].accountId | string | Yes | GL account ID |
lines[].debit | number | Conditional | Debit amount |
lines[].credit | number | Conditional | Credit amount |
lines[].memo | string | No | Line memo |
lines[].entityId | string | No | Customer/vendor ID |
lines[].department | string | No | Department ID |
lines[].class | string | No | Class ID |
lines[].location | string | No | Location ID |
getJournalEntry
Get a journal entry by internal ID.
Vendor Actions
createVendor
Create a new vendor.
getVendor
Get a vendor by internal ID.
listVendors
Search vendors using SuiteQL.
Generic Record Actions
Work with any NetSuite record type.
getRecord
Get any record by type and ID.
Common Record Types:
| Type | Description |
|---|---|
customer | Customer |
vendor | Vendor |
invoice | Customer invoice |
vendorBill | Vendor bill |
salesOrder | Sales order |
purchaseOrder | Purchase order |
journalEntry | Journal entry |
payment | Customer payment |
item | Inventory item |
account | GL account |
createRecord
Create any record type.
updateRecord
Update any record type.
deleteRecord
Delete any record.
SuiteQL Actions
searchRecords
Search records with filters.
suiteql
Execute a raw SuiteQL query.
SuiteQL Notes:
- SQL-like syntax with NetSuite-specific functions
- Use
TO_DATE()for date comparisons - Boolean fields use
'T'and'F' - Join tables using internal field names
- Max 1000 results per query
Webhook Triggers
NetSuite can trigger workflows via RESTlets or scheduled scripts.
Example Workflow
Stripe to NetSuite invoice sync:
Rate Limits
| Limit | Value |
|---|---|
| REST API | 10 concurrent requests |
| SuiteQL | 1000 results per query |
| Batch operations | Varies by record type |
Troubleshooting
Common Errors
| Error | Cause | Solution |
|---|---|---|
INVALID_LOGIN_ATTEMPT | Auth failed | Check TBA credentials |
RCRD_DSNT_EXIST | Record not found | Verify internal ID |
INVALID_FLD_VALUE | Invalid field value | Check field constraints |
INSUFFICIENT_PERMISSION | Missing role permission | Update role access |
UNEXPECTED_ERROR | Server error | Retry with backoff |
Field Names
NetSuite uses camelCase field names in REST API. Custom fields use custentity_, custbody_, custcol_ prefixes.
Multi-Subsidiary
For multi-subsidiary accounts, always specify subsidiaryId on transactions.