NetSuite actions
Reference for the NetSuite actions: the connection type, each action and what it does, its inputs and outputs, and the live catalog call.
The NetSuite block reads and writes records in Oracle NetSuite through its REST record API and SuiteQL. For the plain-language overview, see NetSuite.
When to use it
Use a NetSuite step to create invoices, vendor bills and journal entries, to look up customers and vendors, or to run a SuiteQL query for aging and reporting. Several system templates use netsuite.suiteql, netsuite.createJournalEntry, netsuite.createVendorBill and netsuite.getRecord.
Connection
| Item | Value |
|---|---|
| Block type | netsuite |
| Connection | Connected from Integrations (provider id netsuite), token-based authentication |
| Account pin | config.connection, the connection row id. Without it the step uses the company's default NetSuite connection |
Two sets of actions
The engine runs every action in the table below. Only the five generic record actions appear in the Studio Action list and in GET /api/v1/blocks/netsuite. The others run when a workflow definition names them, and system templates use them, but POST /api/v1/workflows/validate reports them as UNKNOWN_OPERATION because it checks the Studio list.
| Action | In Studio list | What it does | Required config |
|---|---|---|---|
createRecord | Yes | Create any record type from a raw body | recordType, data |
getRecord | Yes | Read one record | recordType, internalId |
updateRecord | Yes | Patch one record | recordType, internalId, data |
deleteRecord | Yes | Delete one record | recordType, internalId |
searchRecords | Yes | Build and run a SuiteQL select | recordType |
suiteql | No | Run a SuiteQL query as written | query |
createCustomer | No | Create a customer | None (see fields) |
getCustomer | No | Read a customer | customerId |
updateCustomer | No | Update a customer | customerId |
listCustomers | No | List customers with filters | None |
createInvoice | No | Create an invoice | customerId, lines |
getInvoice | No | Read an invoice | invoiceId |
updateInvoice | No | Update memo, due date, PO number or custom fields | invoiceId |
listInvoices | No | List invoices with filters | None |
createVendorBill | No | Create a vendor bill | vendorId, lines |
getVendorBill | No | Read a vendor bill | billId |
listVendorBills | No | List vendor bills with filters | None |
createJournalEntry | No | Post a journal entry | lines |
getJournalEntry | No | Read a journal entry | journalId |
createVendor | No | Create a vendor | None (see fields) |
getVendor | No | Read a vendor | vendorId |
listVendors | No | List vendors with filters | None |
The action id is netsuite.<action>.
The Studio form and the executor use different field names
The Studio form writes Record ID as recordId, Record Fields (JSON) as fields and Search Filters (JSON) as searchFilters. The executors read internalId, data and filters. Until the form is aligned, set the executor field names in the workflow definition. The Custom Record option writes recordType: "custom" and the executor does not read customRecordType, so put the custom record type id (for example customrecord_my_type) in recordType itself.
Fields
| Action | Fields |
|---|---|
| Generic record | recordType (NetSuite record type, such as invoice, customer, vendor, journalEntry), internalId, data (raw REST body), expandSubResources (boolean, get only) |
searchRecords | fields (array of column names, default ["id"]), filters (map of field to value, or to { operator, value }), orderBy, limit (default 100), offset |
suiteql | query, limit (default 1000), offset |
createInvoice | customerId, lines[] (itemId, quantity, rate, amount, description, taxCode, department, class, location), invoiceDate, dueDate, invoiceNumber, memo, poNumber, subsidiaryId, currencyId, exchangeRate, termsId, locationId, departmentId, classId, salesRepId, discountItemId, discountRate, externalId, customFields |
listInvoices, listVendorBills | customerId or vendorId, status, subsidiaryId, tranDateAfter, tranDateBefore, limit, offset |
createVendorBill | vendorId, lines[] (an item line with itemId, or an expense line with accountId; amount, quantity, rate, description, department, class, location, customerId, isBillable), billDate, dueDate, billNumber, memo, subsidiaryId, currencyId, exchangeRate, termsId, locationId, departmentId, classId, externalId, customFields |
createJournalEntry | lines[] (accountId, debit, credit, memo, entityId, department, class, location), tranDate (default today), tranId, memo, subsidiaryId, currencyId, exchangeRate, approved (default true), externalId, customFields |
| Customers and vendors | entityId, companyName, firstName, lastName, email, phone, subsidiaryId, currencyId, termsId, isInactive, customFields, and the record-specific fields in the executor |
Behaviour worth knowing
createJournalEntryrefuses an entry whose debits and credits differ by more than 0.01, before calling NetSuite.createJournalEntrysendsapproved: trueunless you setapprovedtofalse.searchRecordsbuilds itsWHEREclause fromfiltersby string concatenation. Pass trusted values only; for anything else, write the query insuiteqlyourself.- Create, update and delete actions return NetSuite's response body as given.
Output
The step output is the NetSuite response. A record read returns the record's fields; a SuiteQL action returns NetSuite's query envelope, so read rows from {{steps.<id>.items}}.
Example
A SuiteQL step that lists open invoices for an aging check:
{
"id": "open_invoices",
"type": "action",
"name": "List open invoices",
"action": "netsuite.suiteql",
"config": {
"operation": "suiteql",
"connection": "<netsuite-connection-id>",
"query": "SELECT id, tranid, entity, duedate, foreigntotal FROM transaction WHERE type = 'CustInvc' AND status = 'CustInvc:A'",
"limit": 500
}
}Live catalog
GET /api/v1/blocks/netsuite returns the Studio fields and the five record actions. See Block and action discovery.
Errors and limits
recordType is required,internalId is required,data is required: the step is missing an executor field, often because it was filled in with the Studio names described above.Journal entry must balance. Debits: …, Credits: …: fix the line amounts.at least one line item is required:createInvoice,createVendorBillandcreateJournalEntryneed a non-emptylinesarray.- NetSuite errors are returned with NetSuite's own message.
HubSpot actions
Reference for the HubSpot actions and trigger: the sign-in connection, each action id, the registered events, the fields each action reads and an example.
Odoo actions
Reference for the Odoo actions: the connection type, each action and what it does, its inputs and outputs, and the live catalog call.
Loopfour