Inventory Fulfillment & Transfers: Process Mining Analysis
NetSuite account TD3016323 (production, OneWorld, USD) · Objects: SalesOrd line, ItemShip, TrnfrOrd, WorkOrd, Build, item, location · Scope: all history, Oct 2024 → Sep 2026 · Prepared 2026-09-04 · Revision 1 · Method: SuiteQL via runSql over transactionline, nexttransactionlinelink, inventoryitemlocations · Sixth study in the series; the item-and-location view of the Order-to-Cash fulfillment step · Document numbers link to the source record inside NetSuite
- 0Executive summary
- 1Method and assumptions
- 2Structure — the fulfillment graph
- 3Fulfillment lag by location
- 4Built-to-order assemblies
- 5Unshipped demand
- 6Transfer orders
- 7Work orders and builds
- 8Exception registers
- 9Data quality — the component-line trap
- 10Findings and actions
- ASuiteQL used
- BHand-check
0Executive summary
97.5%
Of 2,149 fulfilled SO lines shipped the day the order was entered
45 d
Uniform lag on 18 built-to-order assembly lines — the only systematic delay
106
Sellable SO lines unshipped, $121,041 — 37 of them still awaiting approval
116
Assembly-component rows that look unshipped forever and must be excluded
Fulfillment in this account is a same-day process with two well-defined exceptions. Across 2,248 sellable sales-order lines, 2,142 have shipped; 2,096 of the 2,149 measurable line-to-fulfillment pairs (97.5%) shipped on the order date, and every location — Los Angeles DC, Miami, San Francisco, New York — has a median lag of zero. The first exception is built-to-order assemblies: 18 lines of AS_SAF001 (Solar Powered Fan) and AS_MBK001 waited 45–48 days, spanning the monthly assembly build on the 16th–20th; both items are now backordered (37 and 8 units) with 55 units of AS_SAF001 released to work orders and 7 units of AS_MBK001 still only planned. The second is a single 365-day outlier, SO3910 → IF5503 (one eye shadow, San Francisco), which is almost certainly a wrong-year fulfillment date.
- Half the unshipped backlog is not the warehouse's problem yet. Of 106 unshipped sellable lines ($121,041), 37 lines ($52,123) sit on 13 sales orders in Pending Approval, and 63 lines are on orders dated after today. The genuinely aged backlog is 18 lines on 5 orders, 31–90 days old ($15,511): 8 assembly lines at LA DC and one 10-line Miami order (SO for 148 units, $3,711) that has waited since June.
- Eight fulfillments are stuck between pick and ship. 4 Picked (IF5724/5725/5726 since 5–15 July, plus IF3115 for transfer TO05) and 4 Packed (IF4947/4950/4953/4955, late September). Their 11 source lines show as unshipped on the order while inventory is already pulled — 60–90 days of "picked, not shipped" at LA DC.
- Transfers are new and already half-stuck. 14 transfer orders, all since 1 Aug 2026: 3 received (same-day ship and receive), 4 in transit (22 units, TO03 unreceived for 9 days), 7 not yet shipped, including TO15 (LA→Chicago, 34 days). There is no transfer-order history before August.
1Method and assumptions
| # | Assumption | Effect |
| A1 | Case = sales-order line (transactionline, mainline='F' AND taxline='F', itemtype IN ('InvtPart','Assembly','Kit')). Object-centric view over item and location. | 2,364 lines before exclusion; 2,248 sellable. |
| A2 | Exclude rows with assemblycomponent='T' or kitcomponent='T' — BOM explosions of assembly/kit lines that carry no price and never ship or bill. | 116 rows removed. See §9. |
| A3 | Fulfillment link = nexttransactionlinelink SO→ItemShip (ShipRcpt / PickPack) at previousline granularity; lag = MIN(fulfillment trandate − SO trandate) per line. | 2,149 measurable pairs; 4 shipped lines have no line-level link. |
| A4 | Shipped = quantityshiprecv > 0; unshipped = 0; open backlog also requires SO status not Closed/Cancelled (NOT IN ('C','H')). | Picked/Packed fulfillments leave the line at 0 — counted as unshipped with the IF noted. |
| A5 | Location from transactionline.location (header transaction.location is NOT_EXPOSED in SuiteQL). | 30 lines have no location. |
| A6 | Age from SO trandate to 2026-09-04; future-dated orders bucketed separately. | 63 of 106 unshipped lines are future-dated demo data. |
| A7 | Transfer orders: transferlocation for destination; ItemShip/ItemRcpt links for ship/receive. Work orders: Build via OrdBuild links; SO→WO via SpecOrd. | 14 TOs, 24 WOs, 13 builds. |
2Structure — the fulfillment graph
Figure 1 — Sales-order lines to shipment, with the two side-flows that feed stock: assembly builds (work order → build) and inter-location transfers. Labels: count · median days.
| Multiplicity | 0 | 1 | 2 | Note |
| Fulfillments per sellable SO line | 106 | 2,132 | 10 | 10 lines split into two same-day fulfillments (e.g. 27 + 20 units of LOT_Velvet Black Mascara) |
| SO lines per fulfillment document | — | — | — | 1–6; always one order per fulfillment — no consolidation across orders |
| Fulfillments per transfer order | 7 | 7 | 0 | Receipts per TO: 0 (11) or 1 (3) |
| Builds per work order | 11 | 13 | 0 | 1 WO (WO13) created from a sales order; 1 WO (WO06) created from another WO |
The fulfillment graph is one-to-one at the order level and nearly so at the line level: no fulfillment ever spans two orders, and only ten lines were ever split. The many-to-many structure lives one layer down, where one item's stock at one location is drawn by dozens of lines a month and replenished by a build or a transfer — that is where the 45-day waits come from.
3Fulfillment lag by location
Figure 2 — Order → fulfillment lag, 2,149 line pairs.
Figure 3 — Lines by location: shipped vs unshipped.
| Location | Sellable lines | Shipped | Unshipped | Unshipped $ | Same day | 1–7 d | > 7 d | Max d |
| 03: Los Angeles DC | 1,021 | 970 | 51 | 62,823.96 | 938 | 21 | 18 | 48 |
| 05: Miami | 691 | 681 | 10 | 3,711.30 | 668 | 12 | 0 | 4 |
| 01: San Francisco Store | 289 | 277 | 12 | 9,288.18 | 276 | 1 | 1 | 365 |
| 02: New York Store | 217 | 214 | 3 | 2,119.00 | 214 | 0 | 0 | 0 |
| (unassigned) | 30 | 0 | 30 | 43,098.53 | 0 | 0 | 0 | — |
| Total | 2,248 | 2,142 | 106 | 121,040.97 | 2,096 | 34 | 19 | 365 |
Every location has a median lag of zero. All 18 lags over 7 days at LA DC are the built-to-order assemblies of §4; the single >7-day lag at San Francisco is the 365-day SO3910 outlier. New York has never shipped anything on any day other than the order date. The 30 unassigned lines — the most valuable unshipped cohort at $43,099 — are on orders that have not been approved or located yet.
4Built-to-order assemblies
| Item | Late lines | Lag | Orders (SO date → IF date) | Builds inside the window | Backordered now | WO units released / planned |
| AS_SAF001 Solar Powered Fan | 11 | 45–48 | SO4270 06-03→07-18 · SO4272 · SO4273 · SO4276 · SO4277 · SO4279 · SO4281 08-02→09-17 · SO4283 · SO4286 · SO4287 08-13→09-30 | ASSYB1 06-16 · ASSYB5 07-16 · ASSYB10 08-16 · ASSYB11 09-04 | 37 | 55 / 0 |
| AS_MBK001 | 7 | 45–46 | SO4271 06-03→07-18 · SO4274 · SO4275 · SO4278 · SO4280 · SO4282 08-03→09-18 · SO4284 · SO4285 | ASSYB4 06-20 · ASSYB7 07-16 · ASSYB9 08-16 | 8 | 0 / 7 |
Every one of the 18 slow fulfillments is an assembly ordered in the first half of a month and shipped 45–48 days later; each window contains at least one build of that item, i.e. the order waited for the next build cycle and then some. The pattern is monthly builds (16th–20th) of 3–10 units against demand of 1–3 units per order — supply arrives in lumps, orders queue. AS_SAF001 now has 37 units backordered on 5 orders (SO4312 alone wants 25) against 55 units on released work orders WO01/21/22/25; AS_MBK001 has 8 backordered against only planned work orders WO16/19/20 (7 units), none released.
5Unshipped demand
| Order status | Age of order | Lines | Orders | Units | Backordered | Value | Where |
| Pending Approval | future / 0–7 d | 37 | 13 | 405 | 0 | 52,122.58 | 24 lines unassigned, 13 LA DC |
| Pending Fulfillment | future | 32 | 26 | 134 | 60 | 42,712.04 | LA DC 17 · SF 8 · unassigned 5 · NY 2 |
| Pending Fulfillment | 0–7 d | 4 | 4 | 32 | 31 | 5,713.80 | LA DC 2 · SF 1 · unassigned 1 |
| Pending Fulfillment | 8–30 d | 12 | 5 | 144 | 0 | 4,565.89 | LA DC 8 (one order, 140 units) · SF 3 · NY 1 |
| Pending Fulfillment | 31–90 d | 18 | 5 | 183 | 0 | 15,510.68 | LA DC 8 · Miami 10 (one order, 148 units, since June) |
| Partially Fulfilled | future | 3 | 1 | 3 | 0 | 415.98 | LA DC |
| Total unshipped sellable lines on open orders | 106 | | 901 | 91 | 121,040.97 | Nothing older than 90 days |
Items with the most unshipped units (open orders)
| Item | Type | Lines | Units | Backordered | Value | Oldest order | On hand (all locs) | Reading |
| INV_Basil Lemon Hand Wash | InvtPart | 2 | 60 | 10 | 1,579.20 | 2026-09-17 | 179 | Stock exists; SF line 10 short at its location |
| AS_SAF001 | Assembly | 6 | 41 | 37 | 17,371.00 | 2026-09-01 | 0 | Built to order; 55 units on released WOs |
| INV_Grey Cotton Hoodie | InvtPart | 6 | 33 | 22 | 1,594.67 | 2026-08-31 | 140 | Stock exists; 3 lines unassigned so cannot commit |
| INV_Rose Petal Conditioner · Scalp Therapy Shampoo · Replenish Conditioner · The Gentleman | InvtPart | 4 | 110 | 0 | 3,769.40 | 2026-09-22 | 160–236 | One future-dated LA DC order |
| INV_Black Leather Jacket | InvtPart | 2 | 28 | 0 | 7,745.20 | 2026-09-10 | 552 | Future-dated |
| INV_Motorized Pump | InvtPart | 3 | 23 | 0 | 960.75 | 2026-07-15 | 10 | One line already picked (IF5726, 15 Jul) — see §8-B |
| INV_Estes Park Chair | InvtPart | 4 | 22 | 0 | 8,182.80 | 2026-07-05 | 54 | Two lines unassigned |
6Transfer orders
| Route | TOs | Received | In transit | Not shipped |
| LA DC → San Francisco Store | 5 | TO06 (0 d) | TO01 (shipped 09-01) | TO05 (IF3115 Picked 09-08) · TO16 (31 units) |
| LA DC → Chicago DC | 3 | — | TO03 (shipped 08-26, 9 d unreceived) | TO15 (08-01, 34 d) · TO18 (31 units) |
| LA DC → New York Store | 2 | TO04 (0 d) | TO02 (shipped 09-01) | — |
| San Francisco Store → Miami | 3 | TO13 (0 d) | TO12 (13 units, shipped 09-08) | TO14 |
| New York Store → San Francisco Store | 2 | — | — | TO09 · TO10 |
| Total (all dated 2026-08-01 → 09-24) | 14 | 3 · 16 units | 4 · 22 units | 7 · 79 units |
All three completed transfers shipped and received on the same day; the four in transit have no receipt after 0–9 days. Transfer orders appear only from 1 Aug 2026 — the process is new to this account. Two InvTrnfr (direct inventory transfers), 3 adjustments, 5 counts and 2 worksheets exist in the same window; none is linked to a sales order.
7Work orders and builds
| Status | WOs | Units | Items | WO → build lag | Note |
| Built | 13 | 79 | AS_SAF001 ×4 · AS_WHL001 ×3 · AS_MBK001 ×3 · AS_PHA0001 · AS_Keyboard · AS_Flex Circuit Board | 0 d ×5 · 1 d ×7 · 2 d ×1 (median 1) | WO13 special-ordered from SO4290; WO24 also raised PO1206 for a component |
| Released | 6 | 71 | AS_SAF001 55 (WO01/21/22/25) · AS_WHL001 16 (WO06/14) | — | WO06 (6 units) special-ordered from WO05 |
| Planned | 5 | 9 | AS_MBK001 7 (WO16/19/20) · AS_WHL001 2 (WO17/18) | — | AS_MBK001 backorder (8) has no released supply |
| Total | 24 | 159 | All LA DC except WO23 (San Francisco) and WO01 (Chicago DC); 1 unbuild (2026-07-01) |
8Exception registers
8-A · Backorder register (14 lines, 91 units)
| Order | Date | Item | Location | Ordered | Backordered | Committed |
| SO4312 | 2026-09-11 | AS_SAF001 | LA DC | 25 | 25 | 0 |
| SO3129 | 2026-08-31 | INV_Grey Cotton Hoodie | (unassigned) | 20 | 20 | 0 |
| SO4306 | 2026-09-17 | INV_Basil Lemon Hand Wash | SF Store | 30 | 10 | 20 |
| SO4304 | 2026-09-01 | AS_SAF001 | LA DC | 10 | 10 | 0 |
| SO4309 (3 lines) | 2026-09-29 | Thermal Jacket BU L · Contour Rhapsody Breeze F B / F M | (unassigned) | 15 | 15 | 0 |
| SO4308 | 2026-09-23 | AS_MBK001 | LA DC | 5 | 5 | 0 |
| SO3148 · SO3149 | 2026-09-25 | INV_Grey Cotton Hoodie | (unassigned) | 2 | 2 | 0 |
| SO4291 · SO4307 | 2026-09-04 · 09-23 | AS_SAF001 | LA DC · SF Store | 2 | 2 | 0 |
| SO4294 · SO4295 | 2026-09-12 | AS_MBK001 | LA DC | 2 | 2 | 0 |
| 14 lines · 10 orders | 111 | 91 | 20 |
Grey Cotton Hoodie has 140 units on hand; its 23 backordered units are on lines with no location, so nothing can commit. The two assemblies account for 45 of 91 backordered units.
8-B · Fulfillments picked or packed but not shipped (8)
| Fulfillment | Status | Date | Source | Source date | Days since IF | Lines / items |
| IF5724 | Picked | 2026-07-05 | SO4299 | 2026-07-05 | 61 | 2 × INV_SmaTrack Headphones |
| IF5725 | Picked | 2026-07-05 | SO4300 | 2026-07-05 | 61 | 5 × LOT_Cylindrical Roller Bearings |
| IF5726 | Picked | 2026-07-15 | SO4301 | 2026-07-15 | 51 | 3 × INV_Motorized Pump |
| IF3115 | Picked | 2026-09-08 | TO05 (transfer) | 2026-09-08 | −4 | 3 lines LA DC → SF |
| IF4955 | Packed | 2026-09-20 | SO2903 | 2026-10-01 | −16 | 3 lines — fulfillment dated 11 days before its order |
| IF4947 · IF4950 | Packed | 2026-09-25 · 09-26 | SO3151 · SO3150 | 2026-09-25 | −21 · −22 | 1 × INV_Rhinestone Blouse each |
| IF4953 | Packed | 2026-09-30 | SO2738 | 2026-09-24 | −26 | 3 apparel lines |
8-C · Date anomalies (2)
SO3910 (2025-02-09, 1 × LOT_Posh Collection Eye Shadow, San Francisco) fulfilled by IF5503 dated 2026-02-09 — exactly one year later, the only lag above 48 days in the account; a wrong-year entry. IF4955 is dated 2026-09-20 against SO2903 dated 2026-10-01 — a fulfillment 11 days before its order.
9Data quality — the component-line trap
| Limitation | Evidence | Effect if ignored |
| Assembly component rows on sales orders | 116 transactionline rows with assemblycomponent='T', no rate, no netamount, quantityshiprecv always 0, on 29 orders for AS_* items (4 components each) | Unshipped count inflates from 106 to 222 (+109%); INV_Basil Lemon Hand Wash appears as "60 units across 33 lines" instead of 2 lines; INV_BLD100 / FRM100 / HDW001 / ELC001 appear as top unshipped items with 37 units each — none is real demand |
| Picked/Packed fulfillments | 8 IFs not in status Shipped; source lines show quantityshiprecv=0 | 11 lines counted unshipped although inventory is already pulled |
shipdate NULL on all 752 fulfillments | Census | Ship timing measured from trandate only |
| Future-dated orders | 63 of 106 unshipped lines dated after 2026-09-04 | Aging computed only on the 43 past-dated lines |
transaction.location NOT_EXPOSED | Query error "Field is removed" | Location read from mainline transactionline |
10Findings and recommended actions
- Release AS_MBK001 supply and set the assemblies' expected lead time honestly. Both built-to-order assemblies run a 45-day order-to-ship cycle because builds happen once a month; AS_MBK001 has 8 units backordered and only planned work orders. Release WO16/19/20 now, and either move to a fortnightly build or publish a 6-week lead time on these two items so the sales order carries the right promise date.
- Ship the three July pick tickets and fix the two wrong dates. IF5724, IF5725, IF5726 have been Picked for 51–61 days at LA DC — either ship them or put the stock back. Correct IF5503 (2026 → 2025) and IF4955 (dated before its order) so cycle-time reporting stops carrying a 365-day and a −11-day pair.
- Assign a location before approval. 30 unshipped lines worth $43,099 — including 23 backordered units of a hoodie with 140 in stock — have no location and therefore cannot commit inventory. Make location mandatory on the sales-order line for inventory items, and approve or cancel the 13 Pending-Approval orders ($52,123) that make up a third of the unshipped backlog.
AAppendix A — SuiteQL used
Q1 — Sellable vs component rows (the exclusion test)
SELECT CASE WHEN sl.assemblycomponent='T' THEN 'assembly component' WHEN sl.kitcomponent='T' THEN 'kit component' ELSE 'sellable' END AS kind,
COUNT(*) AS lines, SUM(CASE WHEN COALESCE(sl.quantityshiprecv,0) >= ABS(sl.quantity) THEN 1 ELSE 0 END) AS fully_shipped,
SUM(CASE WHEN COALESCE(sl.quantityshiprecv,0) = 0 THEN 1 ELSE 0 END) AS unshipped,
SUM(CASE WHEN COALESCE(sl.quantityshiprecv,0) = 0 AND so.status NOT IN ('C','H') THEN 1 ELSE 0 END) AS unshipped_open_so,
ROUND(SUM(CASE WHEN COALESCE(sl.quantityshiprecv,0) = 0 AND so.status NOT IN ('C','H') THEN ABS(COALESCE(sl.netamount,0)) ELSE 0 END),2) AS value_unshipped_open
FROM transactionline sl JOIN transaction so ON so.id=sl.transaction AND so.type='SalesOrd'
WHERE sl.mainline='F' AND sl.taxline='F' AND sl.item IS NOT NULL AND sl.itemtype IN ('InvtPart','Assembly','Kit')
GROUP BY CASE WHEN sl.assemblycomponent='T' THEN 'assembly component' WHEN sl.kitcomponent='T' THEN 'kit component' ELSE 'sellable' END
Q2 — Per-location lag and backlog
SELECT COALESCE(BUILTIN.DF(sl.location),'(unassigned)') AS loc, COUNT(*) AS lines,
SUM(CASE WHEN COALESCE(sl.quantityshiprecv,0)>0 THEN 1 ELSE 0 END) AS shipped, SUM(CASE WHEN COALESCE(sl.quantityshiprecv,0)=0 THEN 1 ELSE 0 END) AS unshipped,
ROUND(SUM(CASE WHEN COALESCE(sl.quantityshiprecv,0)=0 THEN ABS(COALESCE(sl.netamount,0)) ELSE 0 END),2) AS unshipped_value,
SUM(CASE WHEN x.lag=0 THEN 1 ELSE 0 END) AS same_day, SUM(CASE WHEN x.lag BETWEEN 1 AND 7 THEN 1 ELSE 0 END) AS d1_7, SUM(CASE WHEN x.lag > 7 THEN 1 ELSE 0 END) AS d_over7, MAX(x.lag) AS max_lag
FROM transactionline sl JOIN transaction so ON so.id=sl.transaction AND so.type='SalesOrd'
LEFT JOIN (SELECT l.previousdoc, l.previousline, MIN(TRUNC(f.trandate)-TRUNC(s.trandate)) AS lag FROM nexttransactionlinelink l
JOIN transaction f ON f.id=l.nextdoc AND f.type='ItemShip' JOIN transaction s ON s.id=l.previousdoc GROUP BY l.previousdoc, l.previousline) x
ON x.previousdoc=so.id AND x.previousline=sl.id
WHERE sl.mainline='F' AND sl.taxline='F' AND sl.item IS NOT NULL AND sl.itemtype IN ('InvtPart','Assembly','Kit') AND sl.assemblycomponent='F' AND sl.kitcomponent='F'
GROUP BY COALESCE(BUILTIN.DF(sl.location),'(unassigned)') ORDER BY lines DESC
Q3 — Slow fulfillments with builds in the window
SELECT BUILTIN.DF(sl.item) AS item, so.tranid AS so, TO_CHAR(so.trandate,'YYYY-MM-DD') AS so_date, f.tranid AS if_doc, TO_CHAR(f.trandate,'YYYY-MM-DD') AS if_date,
TRUNC(f.trandate)-TRUNC(so.trandate) AS lag, ROUND(ABS(sl.quantity),0) AS qty,
(SELECT LISTAGG(DISTINCT b.tranid || ' ' || TO_CHAR(b.trandate,'MM-DD'), '; ') FROM transaction b JOIN transactionline bl ON bl.transaction=b.id AND bl.mainline='T'
WHERE b.type='Build' AND bl.item=sl.item AND b.trandate BETWEEN so.trandate AND f.trandate) AS builds_in_window
FROM nexttransactionlinelink l JOIN transaction so ON so.id=l.previousdoc AND so.type='SalesOrd' JOIN transaction f ON f.id=l.nextdoc AND f.type='ItemShip'
JOIN transactionline sl ON sl.transaction=so.id AND sl.id=l.previousline
WHERE TRUNC(f.trandate)-TRUNC(so.trandate) > 30 ORDER BY lag DESC, so.tranid
Q4 — Unshipped by status, location, age
SELECT COALESCE(BUILTIN.DF(sl.location),'(unassigned)') AS loc, BUILTIN.DF(so.status) AS so_status,
CASE WHEN TRUNC(SYSDATE)-TRUNC(so.trandate) < 0 THEN 'a future' WHEN TRUNC(SYSDATE)-TRUNC(so.trandate) <= 7 THEN 'b 0-7' WHEN TRUNC(SYSDATE)-TRUNC(so.trandate) <= 30 THEN 'c 8-30'
WHEN TRUNC(SYSDATE)-TRUNC(so.trandate) <= 90 THEN 'd 31-90' ELSE 'e >90' END AS age,
COUNT(*) AS lines, COUNT(DISTINCT so.id) AS orders, ROUND(SUM(ABS(sl.quantity)),0) AS qty, ROUND(SUM(COALESCE(sl.quantitybackordered,0)),0) AS backordered, ROUND(SUM(ABS(COALESCE(sl.netamount,0))),2) AS value
FROM transactionline sl JOIN transaction so ON so.id=sl.transaction AND so.type='SalesOrd'
WHERE sl.mainline='F' AND sl.taxline='F' AND sl.item IS NOT NULL AND sl.itemtype IN ('InvtPart','Assembly','Kit') AND sl.assemblycomponent='F' AND sl.kitcomponent='F'
AND COALESCE(sl.quantityshiprecv,0)=0 AND so.status NOT IN ('C','H')
GROUP BY [same three expressions] ORDER BY 1,2,3
Q5 — Top unshipped items with on-hand
SELECT BUILTIN.DF(sl.item) AS item, sl.itemtype, COUNT(*) AS lines, ROUND(SUM(ABS(sl.quantity)),0) AS qty_unshipped, ROUND(SUM(COALESCE(sl.quantitybackordered,0)),0) AS backordered,
ROUND(SUM(ABS(COALESCE(sl.netamount,0))),2) AS value, MIN(TO_CHAR(so.trandate,'YYYY-MM-DD')) AS oldest_so,
(SELECT ROUND(SUM(il.quantityonhand),0) FROM inventoryitemlocations il WHERE il.item=sl.item) AS onhand_all_locs
FROM transactionline sl JOIN transaction so ON so.id=sl.transaction AND so.type='SalesOrd'
WHERE [sellable, unshipped, open — as Q4] GROUP BY sl.item, BUILTIN.DF(sl.item), sl.itemtype ORDER BY qty_unshipped DESC FETCH FIRST 12 ROWS ONLY
Q6 — Transfer orders
SELECT t.id, t.tranid, TO_CHAR(t.trandate,'YYYY-MM-DD') AS trandate, BUILTIN.DF(t.status) AS status,
(SELECT BUILTIN.DF(tl.location) FROM transactionline tl WHERE tl.transaction=t.id AND tl.mainline='T') AS from_loc, BUILTIN.DF(t.transferlocation) AS to_loc,
(SELECT COUNT(*) FROM transactionline tl WHERE tl.transaction=t.id AND tl.mainline='F' AND tl.taxline='F' AND tl.item IS NOT NULL) AS lines,
(SELECT ROUND(SUM(ABS(tl.quantity)),0) FROM transactionline tl WHERE tl.transaction=t.id AND tl.mainline='F' AND tl.taxline='F' AND tl.item IS NOT NULL) AS qty,
(SELECT LISTAGG(DISTINCT n.tranid || ' ' || TO_CHAR(n.trandate,'MM-DD'), '; ') FROM nexttransactionlinelink l JOIN transaction n ON n.id=l.nextdoc AND n.type='ItemShip' WHERE l.previousdoc=t.id) AS shipments,
(SELECT LISTAGG(DISTINCT n.tranid || ' ' || TO_CHAR(n.trandate,'MM-DD'), '; ') FROM nexttransactionlinelink l JOIN transaction n ON n.id=l.nextdoc AND n.type='ItemRcpt' WHERE l.previousdoc=t.id) AS receipts
FROM transaction t WHERE t.type='TrnfrOrd' ORDER BY t.trandate
Q7 — Work orders with builds and origin
SELECT t.id, t.tranid, TO_CHAR(t.trandate,'YYYY-MM-DD') AS trandate, BUILTIN.DF(t.status) AS status,
(SELECT BUILTIN.DF(tl.location) FROM transactionline tl WHERE tl.transaction=t.id AND tl.mainline='T') AS loc,
(SELECT BUILTIN.DF(tl.item) FROM transactionline tl WHERE tl.transaction=t.id AND tl.mainline='T') AS assembly,
(SELECT ROUND(ABS(tl.quantity),0) FROM transactionline tl WHERE tl.transaction=t.id AND tl.mainline='T') AS qty,
(SELECT LISTAGG(DISTINCT n.tranid || ' ' || TO_CHAR(n.trandate,'MM-DD') || ' ' || l.linktype, '; ') FROM nexttransactionlinelink l JOIN transaction n ON n.id=l.nextdoc WHERE l.previousdoc=t.id) AS next_docs,
(SELECT LISTAGG(DISTINCT p.tranid || ' ' || p.type || ' ' || l.linktype, '; ') FROM nexttransactionlinelink l JOIN transaction p ON p.id=l.previousdoc WHERE l.nextdoc=t.id) AS prev_docs
FROM transaction t WHERE t.type='WorkOrd' ORDER BY t.trandate
Q8 — Backorder register · Q9 — Unshipped fulfillments
SELECT so.tranid, TO_CHAR(so.trandate,'YYYY-MM-DD') AS so_date, BUILTIN.DF(sl.item) AS item, COALESCE(BUILTIN.DF(sl.location),'(unassigned)') AS loc,
ROUND(ABS(sl.quantity),0) AS qty, ROUND(sl.quantitybackordered,0) AS backordered, ROUND(COALESCE(sl.quantitycommitted,0),0) AS committed
FROM transactionline sl JOIN transaction so ON so.id=sl.transaction AND so.type='SalesOrd'
WHERE sl.mainline='F' AND sl.taxline='F' AND sl.assemblycomponent='F' AND sl.kitcomponent='F' AND sl.quantitybackordered > 0 ORDER BY sl.quantitybackordered DESC;
SELECT f.tranid AS if_doc, BUILTIN.DF(f.status) AS if_status, TO_CHAR(f.trandate,'YYYY-MM-DD') AS if_date, p.type AS src_type, p.tranid AS src, TO_CHAR(p.trandate,'YYYY-MM-DD') AS src_date,
TRUNC(f.trandate)-TRUNC(p.trandate) AS lag, BUILTIN.DF(p.status) AS src_status
FROM transaction f JOIN (SELECT DISTINCT previousdoc, nextdoc FROM nexttransactionlinelink) l ON l.nextdoc=f.id JOIN transaction p ON p.id=l.previousdoc
WHERE f.type='ItemShip' AND f.status <> 'C' ORDER BY f.trandate
Query notes
transaction.location → "Field is removed" (use mainline
transactionline.location).
transactionline.amount is NOT_EXPOSED (use
netamount,
rate).
BUILTIN.DF(so.entity) combined with
SUM(sl.rate*sl.quantity) in one GROUP BY → "Invalid or unsupported search". ItemShip status letters: A Picked · B Packed · C Shipped. Transfer-order fulfillments carry linktype ShipRcpt like sales orders.
BAppendix B — Hand-check
Lines: 2,248 sellable + 116 component = 2,364 ✓ · 2,142 shipped + 106 unshipped = 2,248 ✓ · Location rows: 1,021 + 691 + 289 + 217 + 30 = 2,248; shipped 970 + 681 + 277 + 214 + 0 = 2,142; unshipped 51 + 10 + 12 + 3 + 30 = 106 ✓ · Unshipped value 62,823.96 + 3,711.30 + 9,288.18 + 2,119.00 + 43,098.53 = 121,040.97 ✓ · Lag pairs 2,096 + 34 + 19 = 2,149 (2,142 shipped + 11 picked/packed − 4 without line-level link) · Status/age table 37 + 32 + 4 + 12 + 18 + 3 = 106; 52,122.58 + 42,712.04 + 5,713.80 + 4,565.89 + 15,510.68 + 415.98 = 121,040.97 ✓ · Backorder 25 + 20 + 10 + 10 + 15 + 5 + 2 + 2 + 2 = 91 ✓ · TOs 3 + 4 + 7 = 14; units 16 + 22 + 79 = 117 ✓ · WOs 13 + 6 + 5 = 24; units 79 + 71 + 9 = 159 ✓ · IFs 744 + 4 + 4 = 752 ✓.