Pipelet ReserveInventoryForOrder

This pipelet is used in the order creation pipeline to reserve inventory for all products contained in the specified Basket. The pipelet should be executed before any order creation actions - such as payment authorization - take place, and ensures that all products are still available once the order is actually being created (pipelet CreateOrder). Inventory transactions are automatically finalized by pipelet CreateOrder, i.e. reservations are converted into actual bookings. If CreateOrder is not called for a basket with reserved inventory items, reservations for this basket will automatically expire after 10 minutes. Also, if the pipelet is called for a basket that already has reserved inventory items, all previous reservations are removed and new reservations are made. Inventory reservations do not count towards the current stock level. So the only use case for this pipelet should be the inventory reservation in context of an order creation.

For product bundles, inventory is reserved for all bundled products. If the bundle has its own inventory record, inventory is also reserved for the bundle itself.

The following conditions must be met for the pipelet to succeed, otherwise the pipelet will return on the ERROR exit:

  • an inventory list must be assigned to the current site
  • all products in the basket must exist, and must not be of type Master or ProductSet
  • each product line item must have a valid quantity
  • each product must have an inventory record, or the inventory list must define that products w/o inventory record are available by default
  • the allocation amount must be sufficient for each product, unless the product has perpetual availability

The pipelet must not be enclosed in any pipeline transaction, otherwise it will throw an exception.

This pipelet must not be used with CreateOrder2 pipelet or dw.order.OrderMgr#createOrder() in the same request.

Since API version 10.6 if an order is being replaced, only the delta amounts (positive and negative) are reserved for the basket.

Group:
Order
Flags:
Error Connector
Input Parameters
Basket  :  Basket (Required)