The first pass of this prompt said that 222 sales order lines on my NetSuite test account were unshipped. The real number was 106.

The other 116 were assembly component rows. When a sales order carries an assembly item, NetSuite explodes its bill of materials onto the order as child lines that carry no price, no amount, and a shipped quantity of zero forever, because they never ship or bill on their own. To a query that doesn't know that, they look like unshipped demand. The unshipped count doubled, a hand wash appeared to have 60 units open across 33 lines instead of 2, and four raw components with no real demand behind them showed as the top unshipped items in the account.

The prompt now excludes them automatically, and the report has a data-quality section titled "the component-line trap" that explains exactly what would have happened if it hadn't. That's the lesson from building it, and I think that it's the most useful thing in the post. The difference between a scary number and the right number is usually one careful question about what a row means.

This is the sixth study in the process-mining series that went into the Sonar AI Prompt Library in September. If you're new to this, Sonar AI is an AI agent that runs inside NetSuite. Every prompt in the library is a playbook that I engineered and tested against live NetSuite data, and you run it inside your own account, against your own records. Nothing leaves the account, and nothing is written to it.

The top of the Inventory Fulfillment and Transfers Process Mining sample report, with the executive summary tiles: 97.5% of fulfilled lines shipped the day the order was entered, a 45-day lag on 18 built-to-order assembly lines, 106 sellable lines unshipped worth $121,041, and 116 assembly-component rows that must be excluded.

Same-Day, With Two Exceptions

Fulfillment on the test account is a same-day process. Across 2,248 sellable lines, 2,142 have shipped, and 97.5% of the measurable line-to-fulfillment pairs shipped on the order date. Every location, the two distribution centers and the two stores, has a median lag of zero. New York has never shipped anything on any day other than the day the order was placed.

Section 9 of the report, Data quality: the component-line trap, a table showing that 116 assembly-component rows would inflate the unshipped count from 106 to 222, followed by the report's three recommended actions.

The first exception is built-to-order assemblies. Eighteen lines of two assembly items waited 45 to 48 days, and every one of them was ordered in the first half of a month and shipped after the next monthly build, which happens on the 16th through the 20th. Demand arrives at one to three units per order and supply arrives in lumps of three to ten once a month, so orders queue. One of the two items now has 37 units backordered against 55 on released work orders. The other has 8 backordered against 7 units on work orders that are only planned, none released.

The second exception is a single 365-day outlier: one eye shadow, ordered February 9, 2025, fulfilled February 9, 2026. The report reads that as a wrong-year entry rather than a process problem, and it's the only lag above 48 days in the account.

The Backlog That Isn't the Warehouse's Problem Yet

Of the 106 unshipped lines, worth $121,041, 37 lines and $52,123 sit on 13 sales orders in Pending Approval, and 63 lines are on orders dated after the run. The genuinely aged backlog is 18 lines on 5 orders, 31 to 90 days old, worth $15,511. Eight of those are the assembly lines. The other ten are a single Miami order for 148 units that has waited since June.

Then there's the cohort the report calls the most valuable unshipped lines in the account: 30 lines, $43,099, with no location assigned. They can't commit inventory, because there's no location to commit it from. That includes 23 backordered units of a hoodie that has 140 units on hand.

Eight fulfillments are stuck between pick and ship. Three have been in Picked status at the Los Angeles distribution center since early July, 51 to 61 days, with the inventory already pulled and the order still showing the lines as unshipped. Four more are Packed, dated late September. One of those is dated eleven days before the order it fulfills.

Transfers Are New

There are 14 transfer orders in the account and every one of them is dated after August 1. Three were received, and all three shipped and received on the same day. Four are in transit, one of them unreceived for nine days. Seven haven't shipped, including one from Los Angeles to Chicago that has been sitting for 34 days. The report notes that there's no transfer-order history before August, so the process is new, and it's already half stuck.

What It Recommends

Release the planned work orders for the second assembly item and either move to a fortnightly build or publish a six-week lead time on both items so the sales order carries an honest promise date. Ship the three July pick tickets or put the stock back. Correct the two wrong dates so cycle-time reporting stops carrying a 365-day pair and a negative one. Make location mandatory on the sales order line for inventory items, and approve or cancel the 13 pending orders that make up a third of the backlog.

The SuiteQL is in the appendix, starting with the exclusion test that separates sellable rows from component rows. The query notes list three fields that turned out not to be exposed and what was read instead. The hand-check reconciles the line counts by location, the unshipped value by status and age, the backorder register, and the transfer and work-order totals. Nothing was altered.

Wrapping Up

This is the item-and-location view of the fulfillment step that the Order-to-Cash study sees only as a single edge. That report says shipment is same-day. This one says which items aren't, why, and what's sitting in a picked state with nobody looking at it.

Inventory Fulfillment and Transfers Process Mining is in the paid tier of the library. The full sample report from the test account is online, and I covered the whole September release in a separate post.

A hoodie with 140 units in stock has 23 units backordered because nobody told the order where the stock is. That's a one-field fix, and nothing in the warehouse would have found it.