Skip to main content
Once your NetSuite authorization is set up, you can run SuiteQL queries against NetSuite from Prowork to pull cash sales, credit memos, transaction lines, custom fields, and any record Saved Search can’t return. SuiteQL uses a separate, OAuth-based authorization step from Pulling Data via Saved Search and Sending Data; see the Authorization page for setup.
You don’t need to be fluent in SQL to use this step. Describe what you want in the Prowork chat on the left of your canvas, and it can draft the SuiteQL query for you.
Looking for Saved Searches?If you want to pull results from a NetSuite Saved Search instead, use Pulling Data via Saved Search. This page is specifically for running SuiteQL queries.

SuiteQL vs. Saved Searches

Saved Searches are the most common way to pull NetSuite data, and for most reporting needs, a Saved Search is the right tool. SuiteQL is the better fit when Saved Searches fall short:
  • Certain transaction types aren’t available via Saved Search, including cash sales, cash refunds, credit memos, and card charges and refunds. SuiteQL is the only way to pull these through the API.
  • Standard NetSuite reports aren’t Saved Searches. AR aging, income statements, and P&L-style reports can’t be pulled as Saved Searches, but you can reproduce them with SuiteQL.
  • Custom joins, readable field values, and large datasets. If you need joins Saved Search doesn’t expose, custom field values resolved to readable names instead of internal IDs, or more rows than a Saved Search can return in one response, SuiteQL handles it.
If a Saved Search already returns what you need, use Pulling Data via Saved Search. Otherwise, reach for SuiteQL. The role behind your SuiteQL integration determines what data is accessible; make sure it has at least View permission for the NetSuite record types you plan to query.

Writing your query

Once connected, enter your SuiteQL query to pull the data you need. If you’re new to SuiteQL, describe what you want in the Prowork chat on the left of your canvas and let it draft the query for you. The Pull from SuiteQL step requires the entire query on a single line. Flatten multi-line queries before pasting.

Available data

SuiteQL gives you SQL-based access to virtually any NetSuite record your role has permission to view. Common record types you can query:
  • Transactions: sales orders, purchase orders, invoices, vendor bills, credit memos, cash sales, cash refunds, item fulfillments, item receipts, journal entries, and return authorizations. Filter by date, status, type, subsidiary, or any other field.
  • Transaction lines: line-level details for any transaction including items, quantities, amounts, GL accounts, and custom segments.
  • Customers and leads: account details, billing addresses, payment terms, sales rep assignments, transaction history, and overdue balances.
  • Vendors: supplier records including contact details, payment terms, currency, and associated purchase history.
  • Items and inventory: product catalog with SKUs, pricing, inventory levels by location and bin, reorder points, preferred vendors, matrix items, item groups, and assembly components.
  • Employees: employee records with roles, permissions, department, subsidiary, and login history.
  • Accounts (Chart of Accounts): GL account definitions, types, subsidiary mappings, and balances.
  • Subsidiaries, locations, and bins: multi-entity and multi-location structure for filtering and grouping cross-subsidiary reports.
  • Support cases: open and closed case details including assignee, status, and customer.
  • Custom records, fields, and segments: any custom objects configured in your NetSuite instance.
NetSuite transaction type codesWhen querying the transaction table, you’ll filter by type codes like CashSale, CustCred, CardChrg, and CardRfnd. Tim Dietrich’s NetSuite transaction table reference is a helpful guide for these codes and common join patterns, and his SuiteQL Query Library has ready-to-use queries. For the official Oracle reference on SuiteQL syntax and supported tables, see NetSuite’s SuiteQL documentation.

Common use cases

  • Pull transaction types Saved Search can’t return: Query cash sales, cash refunds, credit memos, and card charges and refunds to power finance reconciliations against payment processor or card transaction data.
  • Replicate standard NetSuite reports: Build AR aging, AP aging, income statement, and P&L-style reports as SuiteQL queries, then drop the output into a spreadsheet, drive folder, or chat summary.
  • Pull high-volume transaction-line data: When a month of sales order lines or GL transactions exceeds Saved Search row limits, SuiteQL returns the full set by line, so finance can post revenue and costs without missing rows.
  • Resolve internal IDs to readable names on custom fields: Pulling Data via Saved Search already resolves IDs for standard fields via joined fields. For custom list and custom record fields where Saved Search returns the internal ID, SuiteQL can join to the underlying table and return the display name directly.
  • Inventory reporting by lot, bin, or location: Pull inventory balances joined with item descriptions, UPCs, pack sizes, and lot/expiration dates to reconcile against 3PL counts.
  • Purchase order and fulfillment analysis: Query open POs with line-level detail, expected ship dates, receiving status, and custom fields to track supplier performance and inbound inventory.
  • Assembly items and BOM queries: Pull parent items with their component children, costs, and quantities for manufacturing and kit management workflows.
  • Push to your warehouse: Send the raw query output into a data warehouse so analytics teams can join NetSuite with the rest of the business.

Tips for using Prowork with SuiteQL

  • Filter and aggregate in SuiteQL first. Do filtering, aggregation, and joins in the SQL query before it reaches Prowork. This reduces data volume, speeds up your flow, and avoids hitting API limits.
  • Use the Prowork chat to write queries. If you’re new to SuiteQL, describe what you want in the Prowork chat on the left of your canvas and let it draft the query for you.
  • Format your query as a single line. The Pull from SuiteQL step requires the entire query on one line. Flatten multi-line queries before pasting.
  • Use BUILTIN.RELATIVE_RANGES for rolling windows. Instead of calculating dates in Prowork, use NetSuite’s built-in function (e.g., BUILTIN.RELATIVE_RANGES('DAGO90','START') for “90 days ago”) inside the query.
  • Pull incrementally. Use WHERE lastmodifieddate >= SYSDATE - 1 or similar to pull only recently updated records instead of reprocessing all history on every run.
  • Match cadence to use case. Nightly for financial reconciliation after transactions close, daily for ops dashboards, hourly for time-sensitive inventory or order monitoring.
  • Document your queries with cards. Add a card on the canvas explaining what the query does, what business logic is applied, and which teams rely on the output.
  • Test in sandbox first. Validate queries against your sandbox account (using the -sb1 Account ID suffix) before pointing the flow at production.

Sample query to copy

A working single-line example that pulls card charges, card refunds, and credit memos from the last 90 days with account, vendor, subsidiary, and department names joined in:
Swap the transaction types in the IN clause or adjust the date range to fit your use case.

FAQ

Use SuiteQL when the records you need aren’t available via Saved Search (cash sales, cash refunds, credit memos, card charges and refunds), when you need to reproduce a standard NetSuite report, when a Saved Search row limit cuts off your data, or when you need custom field values resolved to readable names. For everything else, Pulling Data via Saved Search is simpler.

Can I push data back into NetSuite with this step?

No, Pull from SuiteQL is read-only. To create or update NetSuite records, use Sending Data to NetSuite.

Why is my query failing with a syntax error?

The two most common causes are multi-line queries (the step requires one line) and using SQL functions NetSuite doesn’t support. Check your query against Oracle’s SuiteQL reference for supported syntax.

How do I connect to a NetSuite sandbox?

Use your sandbox Account ID, which has a _SB1 suffix in NetSuite’s URL but is entered in Prowork as 1234567-sb1 (lowercase, with a dash). Generate sandbox credentials separately from production.
Last modified on September 9, 2026