The order-item can be accessed using ProductLineItem.getOrderItem() or ShippingLineItem.getOrderItem() - these methods return null if the item is associated with a basket rather than an order. Alternative access is available using Order.getOrderItem(String) by passing the itemID used to identify the order-item in for example export files. The associated order-item can also be accessed from invoice-items, shipping-order-items, return-items and return-case-items using AbstractItem.getOrderItem().
The order-item provides an item-level status and type, methods for accessing and creating associated items, and methods used to allocate inventory for shipping-order creation.
Order post-processing APIs (gillian) are now inactive by default and will throw an exception if accessed. Activation needs preliminary approval by Product Management. Please contact support in this case. Existing customers using these APIs are not affected by this change and can use the APIs until further notice.
null
.
Multiple shipping order items that are not in status ShippingOrderItem.STATUS_CANCELLED
can exist for one OrderItem, for example if the OrderItem has been split for shipping purposes.
The method returns null
if no non-cancelled shipping order item exists.
true
.Split order items are created when
- creating a ShippingOrderItem for a ShippingOrder, see ShippingOrder.createShippingOrderItem(OrderItem, Quantity)
- splitting an existing ShippingOrderItem, see ShippingOrderItem.split(Quantity)
A split source item is associated after the successful creation of a split item with a quantity less than the existing quantity of the item to split. For details see getSplitItems().
The possible values are:
- SERVICE (method getLineItem() returns a ShippingLineItem
- PRODUCT (method getLineItem() returns a ProductLineItem
null
.- SERVICE (method getLineItem() returns a ShippingLineItem
- PRODUCT (method getLineItem() returns a ProductLineItem
Attempts to allocate inventory for the item and returns the quantity that could be allocated or null
if no allocation was possible.
All option product line items are allocated with
their parent. Note that for items with option product line items no partial allocation is possible. That means
the partialAllocation parameter will in this case always be considered as false
true
accept a partial allocation as a result. Partial allocation is only possible when no option product line items are included,false
only full allocation will be used, partial allocation will be released automatically
- successful: the newly allocated quantity
- failed:
null
null
.
Multiple shipping order items that are not in status ShippingOrderItem.STATUS_CANCELLED
can exist for one OrderItem, for example if the OrderItem has been split for shipping purposes.
The method returns null
if no non-cancelled shipping order item exists.
null
true
.includeCancelled
parameter the cancelled shipping order
items will be returned or not.true
all shipping order items, including the cancelled, created for this item will be returnedfalse
only non-cancelled shipping order items created for this item will be returned
Split order items are created when
- creating a ShippingOrderItem for a ShippingOrder, see ShippingOrder.createShippingOrderItem(OrderItem, Quantity)
- splitting an existing ShippingOrderItem, see ShippingOrderItem.split(Quantity)
A split source item is associated after the successful creation of a split item with a quantity less than the existing quantity of the item to split. For details see getSplitItems().
null
The possible values are:
- SERVICE (method getLineItem() returns a ShippingLineItem
- PRODUCT (method getLineItem() returns a ProductLineItem
If the order item has a related shipping order item (see getShippingOrderItem()) the status of the shipping order item will be adjusted to the same status. Setting the status of an order item might also change the status of the related order. The following rules apply in top-down order:
- all items STATUS_CANCELLED - order status is Order.ORDER_STATUS_CANCELLED
- at least one item in status STATUS_SHIPPED and all other items are STATUS_CANCELLED order status is Order.ORDER_STATUS_COMPLETED
- at least one item in status STATUS_CREATED, STATUS_OPEN, STATUS_NEW , STATUS_BACKORDER - order status is Order.ORDER_STATUS_OPEN, order confirmation status is Order.CONFIRMATION_STATUS_NOTCONFIRMED
- other combinations will have only items in STATUS_CONFIRMED, STATUS_CANCELLED and STATUS_SHIPPED - order status is Order.ORDER_STATUS_OPEN, order confirmation status is Order.CONFIRMATION_STATUS_CONFIRMED