Order fulfillment report
distru-report-order-fulfillmentReadA grid of products by order for a date range, showing how much of each product each order needs.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| cursor | string | No | nextCursor of the previous call; keep the other arguments unchanged. |
| customerIds | string[] | No | Resolve via distru-search-companies. |
| locationIds | string[] | No | Order items fulfilled from these locations. ORed with userIds. Resolve via distru-search-locations. |
| orderDatetime | object | No | Inclusive. YYYY-MM-DD (whole days, company timezone) or ISO 8601 with a UTC offset. Defaults to the last 30 days. |
| orderDatetime. | string | No | |
| orderDatetime. | string | No | |
| ownerIds | string[] | No | Sales rep owning the order. Resolve via distru-search-users. |
| productIds | string[] | No | Narrows the orders, not the products: other products on those orders still come back. Resolve via distru-search-products. |
| search | string | No | Case-insensitive substring of order number, customer name or LeafLink short ID (name skipped under 2 characters). |
| statuses | enum[]PENDINGPROCESSINGREADY_TO_SHIPDELIVERINGDELIVEREDCOMPLETED | No | Default: every status listed. Canceled and merged orders are always left out. |
| userIds | string[] | No | Order items assigned to these users. ORed with locationIds. Resolve via distru-search-users. |
| productCategoryIds | string[] | No | Product category of the rows. ORed with productSubcategoryIds; a listed subcategory of a listed category narrows that category to it. Resolve via distru-search-lookups (type PRODUCT_CATEGORY). |
| productSubcategoryIds | string[] | No | Product subcategory of the rows. See productCategoryIds. Resolve via distru-search-lookups (type PRODUCT_CATEGORY, each row's subcategories). |
| productTagIds | string[] | No | Any of these tags on the product. Resolve via distru-search-lookups (type PRODUCT_TAG). |
| vendorIds | string[] | No | The vendor set on the product, not the company an order was placed with. Resolve via distru-search-companies. |
| brandIds | string[] | No | Product brand of the rows, itself a company. Resolve via distru-search-companies, or read it on a distru-search-products row. |
| productGroupIds | string[] | No | Resolve via distru-search-lookups (type PRODUCT_GROUP). |
| maxRowsLimit | integer | No | Rows per page. Defaults to 500. |
Output
Presence on a nested field assumes its parent exists.
| Field | Type | Presence | Description |
|---|---|---|---|
| nextCursor | string | Can be absent | Pass as cursor to fetch the next page. Present only when meta.truncated. |
| meta | object | Always | |
| meta. | string | Always | |
| meta. | string | Always | |
| meta. | number | Always | |
| meta. | number | Always | |
| meta. | number | Always | |
| meta. | number | Always | |
| meta. | boolean | Always | |
| meta. | object[] | Always | |
| meta. | string | Always | |
| meta. | string | Always | |
| rows | object[] | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Can be null | |
| rows[]. | string | Always | |
| rows[]. | string | Can be null | |
| rows[]. | string | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Always | |
| rows[]. | object[] | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Always | |
| rows[]. | string | Can be null |
What the AI reads
Product-by-order grid: one row per product sold in the range, with one customFields entry per matching order (keyed by the camelized slugified order number, e.g. SO-1042 is so1042) holding that product's quantity on that order net of returns ("" when not on it), plus totalUnits. The order entries vary with the matching orders; read meta.columns. Use for fulfillment or pick breakdowns and which products are on which orders. For line items with their actual prices use distru-report-sales-orders with rowsPer LINE_ITEM; for sales totals per product use distru-report-sales-totals with rowsPer PRODUCT; for order totals use distru-report-sales-orders with rowsPer ORDER. unitPrice is the product's base price, not the order line price, so totalValue (unitPrice × totalUnits) can differ from what was billed. Quantities and money are numeric strings. Returns 500 rows by default (maxRowsLimit, up to 5000). When meta.truncated is true more rows exist: repeat the call with the same filters, any date range made explicit so every page covers the same one, and cursor set to nextCursor — or narrow the filters when you need a summary rather than every row.