DirectFulfillmentOrderItems
Returns a list of the line-item details for each direct fulfillment order, including product identifiers, quantities, and pricing information.
View-Specific Information
Select
To retrieve detailed line items for a specific purchase order:
SELECT
PurchaseOrderNumber,
ItemSequenceNumber,
ItemTitle,
VendorProductId,
BuyerProductId,
OrderedAmount,
UnitOfMeasure,
NetPrice,
TotalPrice,
CurrencyCode
FROM VendorCentral.DirectFulfillmentOrderItems
WHERE PurchaseOrderNumber = 'PO-12345-67890';
You can retrieve all order items requiring shipment from recent orders. The following query joins order items with order headers to show all items requiring shipment, sorted by deadline:
SELECT
PurchaseOrderNumber,
ItemSequenceNumber,
ItemTitle,
VendorProductId,
OrderedAmount,
UnitOfMeasure,
NetPrice,
OrderDate,
RequiredDate,
ShipFromId
FROM VendorCentral.DirectFulfillmentOrderItems
INNER JOIN VendorCentral.DirectFulfillmentOrders
ON PurchaseOrderNumber = PurchaseOrderNumber
WHERE OrderStatus = 'NEW'
AND OrderDate >= DATEADD(day, -7, GETDATE())
ORDER BY RequiredDate ASC, ItemSequenceNumber ASC;
To retrieve gift items requiring additional handling, such as requiring special packaging and gift messages:
SELECT
PurchaseOrderNumber,
ItemSequenceNumber,
ItemTitle,
GiftMessage,
GiftWrapId,
OrderedAmount
FROM VendorCentral.DirectFulfillmentOrderItems
WHERE GiftMessage IS NOT NULL
AND OrderStatus = 'NEW';
To retrieve scheduled delivery items with delivery windows:
SELECT
PurchaseOrderNumber,
ItemSequenceNumber,
ItemTitle,
DeliveryServiceType,
EarliestDeliveryDate,
LatestDeliveryDate,
OrderedAmount
FROM VendorCentral.DirectFulfillmentOrderItems
WHERE DeliveryServiceType IS NOT NULL
AND EarliestDeliveryDate >= GETDATE()
ORDER BY EarliestDeliveryDate ASC;
To identify high-velocity items ordered frequently, helping with inventory planning and warehouse slotting decisions:
SELECT
VendorProductId,
BuyerProductId,
ItemTitle,
COUNT(DISTINCT PurchaseOrderNumber) AS OrderFrequency,
SUM(CAST(OrderedAmount AS INT)) AS TotalUnitsOrdered,
AVG(CAST(NetPrice AS DECIMAL(18,2))) AS AvgUnitPrice,
MIN(OrderDate) AS FirstOrderDate,
MAX(OrderDate) AS LastOrderDate
FROM VendorCentral.DirectFulfillmentOrderItems
INNER JOIN VendorCentral.DirectFulfillmentOrders
ON PurchaseOrderNumber = PurchaseOrderNumber
WHERE OrderDate >= DATEADD(day, -30, GETDATE())
GROUP BY
VendorProductId,
BuyerProductId,
ItemTitle
HAVING COUNT(DISTINCT PurchaseOrderNumber) >= 5
ORDER BY TotalUnitsOrdered DESC;
The HAVING clause filters the results to products ordered at least five times.
Columns
| Name | Type | References | Description |
| ItemSequenceNumber [KEY] | String | The position of the item on the purchase order, starting at 1 and increasing sequentially. | |
| PurchaseOrderNumber [KEY] | String | The purchase order number for this order. | |
| BuyerProductId | String | The buyer's standard identification number (ASIN) of an item. | |
| CurrencyCode | String | The three-letter currency code in ISO 4217 format. | |
| CustomUrl | String | A Base64-encoded URL using the UTF-8 character set. The URL provides the location of the zip file that specifies the types of customizations or configurations allowed by the vendor, along with types and ranges for the attributes of their products. | |
| DeliveryServiceType | String | The scheduled delivery service type. | |
| EarliestDeliveryDate | Datetime | The earliest nominated delivery date for the scheduled delivery. | |
| GiftMessage | String | The gift message to be printed with the shipment. | |
| GiftWrapId | String | The identifier for the selected gift-wrap option, if applicable. | |
| ItemTitle | String | The title for the item. | |
| LatestDeliveryDate | Datetime | The latest nominated delivery date for the scheduled delivery. | |
| NetPrice | String | A decimal number with no loss of precision. This format is useful when precision loss is unacceptable, such as with currency values, and follows RFC 7159 for number representation. | |
| OrderDate | Datetime | The date the order was placed. | |
| OrderedAmount | Int | The acknowledged quantity for the item. This value must be greater than zero. | |
| OrderStatus | String | The current status of the order. | |
| ShipFromId | String | The vendor warehouse identifier for the fulfillment warehouse. If not specified, the result contains orders for all warehouses. | |
| TaxLineItem | String | The tax details for the order. | |
| TotalPrice | String | A decimal number with no loss of precision. This format is useful when precision loss is unacceptable, such as with currency values, and follows RFC 7159 for number representation. | |
| UnitOfMeasure | String | The unit of measure for the acknowledged quantity. | |
| VendorProductId | String | The vendor-selected product identification of the item. |