salesordered
viewSubsidiary-scopedLocation-scopedViewThe ordered-sales analytics view: one row per sales transaction line with the amount, quantity, estimated cost and estimated gross profit already computed, alongside the customer, item, and the class/department/location segments.
a convenience VIEW over the spine, not a separate ledger — its rows are transaction lines, so never union or add it to a transactionline read of the same documents.
Browser page name is salesOrdered (label "Sales (Ordered)"). Useful for a quick revenue read, but land transaction / transactionline for anything you have to reconcile or extend: this view's estimated-cost and gross-profit columns are NetSuite's own computations, and neither their inputs nor their timing are visible here. transaction + tranline is its tie-back to the spine. One caveat on the generated location anchor: line-level location is NULL on accounts that don't run multi-location inventory, so an active anchor there quietly excludes those rows — drop it when site scoping isn't what you want.
What the badges mean
- master
- Data class: what the record holds — master data, transaction documents, control/configuration, or a documented convenience record. NetSuite has no product-family or schema axis, so this is the whole classification.
- Subsidiary-scoped
- The record carries a
subsidiarycolumn that partitions its rows, so the generated SQL anchors it. On a few records the column is a multiselect rather than a scalar foreign key — the table notes say which (see the quirks guide). - Location-scoped
- The record carries a
locationcolumn — an org segment in NetSuite before it is a warehouse — and the generated SQL anchors it the same way. - View
- A documented convenience record rather than a stored one. Land the records it stands in for instead of assuming it extracts as-is — the table notes say where the rows actually live.
Structural facts — how the record is partitioned, not a trap by itself
Join & extract hazards — verify before you rely on this
'T'/'F' string.Fields
22 fields · 3 key
22 fields.
| # | Field | Description | Type | Flags |
|---|---|---|---|---|
| 1 | uniquekey | Unique key | NUMBER | Primary-key field |
| 2 | transaction | Transaction (internal id) — the tie-back to the spine | NUMBER | Primary-key field |
| 3 | tranline | Transaction line (internal id) | NUMBER | Primary-key field |
| 4 | trandate | Transaction date | DATE | The record's primary analysis date — a real DATE/TIMESTAMP column, no conversion needed |
| 5 | type | Document type — values are discoverable in-account only | VARCHAR | |
| 6 | entity | Customer (internal id) | NUMBER | |
| 7 | item | Item (internal id) | NUMBER | |
| 8 | amount | Ordered amount | NUMBER | |
| 9 | amountnet | Ordered amount, net | NUMBER | |
| 10 | itemcount | Quantity — the column is named itemcount, not quantity | NUMBER | |
| 11 | costestimate | Estimated cost — NetSuite's own computation | NUMBER | |
| 12 | estgrossprofit | Estimated gross profit — a computed column, not a posted amount | NUMBER | |
| 13 | estgrossprofitpercent | Estimated gross profit percentage | NUMBER | |
| 14 | account | GL account (internal id) | NUMBER | |
| 15 | subsidiary | Subsidiary (internal id) | NUMBER | |
| 16 | location | Location (internal id) | NUMBER | |
| 17 | department | Department (internal id) | NUMBER | |
| 18 | class | Class (internal id) — the classification record | NUMBER | |
| 19 | partner | Partner (internal id) | NUMBER | |
| 20 | employee | Sales rep (internal id) | NUMBER | |
| 21 | promotioncombinations | Promotion combinations — MULTISELECT, not a scalar foreign key | VARCHAR | |
| 22 | memo | Memo | VARCHAR |
Field provenance: hand-curated. 3 key fields.
Boilerplate SQL
Starting point for reading the Connect-landed copy of salesordered on Databricks — dates are real DATE/TIMESTAMP columns and need no conversion, and the partition anchors are already in place. This record carries no modification stamp, and the snippet says so where the watermark would otherwise go. Set your Unity Catalog location, schema, and filter values below; they’re substituted into the SQL and the copy button.
8 parameters not filled: <catalog>, <schema>, <subsidiary_id>, <location_id>, <uniquekey>, <transaction>, <DATE_FROM>, <DATE_TO>
-- ============================================================
-- Table : salesordered — The ordered-sales analytics view: one row per sales transaction line with the amount, quantity, estimated cost and estimated gross profit already computed, alongside the customer, item, and the class/department/location segments.
-- Purpose: Column-selected read of salesordered — auto-generated from field metadata
-- Grain : One row per uniquekey + transaction + tranline
-- Caution: a convenience VIEW over the spine, not a separate ledger — its rows are transaction lines, so never union or add it to a transactionline read of the same documents.
-- Notes : Auto-generated skeleton for NetSuite data landed in your lakehouse from a SuiteAnalytics Connect (or SuiteQL) extract — it never addresses live NetSuite. Identifiers are lowercase as NetSuite2.com renders them. Select-type columns hold numeric internal ids: BUILTIN.DF() display resolution exists only at extraction time, so decode ids by joining the landed list records; see quirks #display-values. Check-box columns arrive as 'T'/'F' strings; see quirks #tf-booleans. Documented convenience record — land the records it stands in for; see the table notes.
-- ============================================================
SELECT
t.uniquekey AS "Unique key",
t.transaction AS "Transaction (internal id) — the tie-back to the spine",
t.tranline AS "Transaction line (internal id)",
t.trandate AS "Transaction date",
t.type AS "Document type — values are discoverable in-account only",
t.entity AS "Customer (internal id)",
t.item AS "Item (internal id)",
t.amount AS "Ordered amount",
t.amountnet AS "Ordered amount, net",
t.itemcount AS "Quantity — the column is named itemcount, not quantity",
t.costestimate AS "Estimated cost — NetSuite's own computation",
t.estgrossprofit AS "Estimated gross profit — a computed column, not a posted amount",
t.estgrossprofitpercent AS "Estimated gross profit percentage",
t.account AS "GL account (internal id)",
t.subsidiary AS "Subsidiary (internal id)",
t.location AS "Location (internal id)",
t.department AS "Department (internal id)",
t.class AS "Class (internal id) — the classification record",
t.partner AS "Partner (internal id)",
t.employee AS "Sales rep (internal id)",
t.promotioncombinations AS "Promotion combinations — MULTISELECT, not a scalar foreign key",
t.memo AS "Memo"
FROM <catalog>.<schema>.salesordered t
WHERE
t.subsidiary = <subsidiary_id> -- OneWorld partition — see quirks guide #oneworld
AND t.location = <location_id> -- location scope — see quirks guide #oneworld
-- AND t.uniquekey = <uniquekey>
-- AND t.transaction = <transaction>
-- AND t.trandate >= DATE '<DATE_FROM>'
-- AND t.trandate <= DATE '<DATE_TO>'
-- no lastmodifieddate on this record — there is no watermark column, so incremental extraction must full-refresh it (see quirks #deletes)
ORDER BY t.uniquekey;Verified August 2026 · Analytics Browser 2021.1 · corroborated 2025.2
Select columns hold internal ids, not display text — see decoding display values.
Relationships
Diagram of 1-hop neighbors — join details below. Document-link edges are highlighted; they chain one document to the next and are the joins newcomers most often get wrong.
salesordered is a documented convenience record. Land the records it stands in for rather than assuming it extracts as-is — see the table notes for where the stored rows live.
More Transactions tables
- transactionThe document header for every transaction type NetSuite records — sales orders, purchase orders, fulfillments, receipts, invoices, journals — separated by the type column rather than by table.
- transactionaccountinglineThe accounting projection of a transaction line: base-currency amount, debit, credit and net, per accounting book, with the GL account and audit-number stamps.
- transactionbillingaddressThe billing address stamped on a document: the same fourteen columns as the shipping twin, keyed by the address key the transaction header's billing pointer resolves to.
- transactionlineThe line grain of the transaction spine: item, quantity, rate and transaction-currency amounts, plus the subsidiary, location, class and department that scope the line.
- transactionshipmentThe shipment satellite of a transaction: ship-from and ship-to addresses, ship method, shipping and handling rates, weight, and whether the shipment has been fulfilled.
- transactionshippingaddressThe shipping address as it was stamped on a document: the formatted block plus the parsed lines, city, state, zip, country and phone, keyed by the address key the transaction header points at.