Pipelet CreateOrder
Pipelet CreateOrder
This pipelet creates and places an Order from the specified Basket. An optional OrderNo can be specified. Otherwise, the pipelet generates and assigns a number for the new order.

If the order could be created successfully, the basket is marked for removal.

This pipelet does not create an order and ends on the ERROR exit if any of the following conditions are encountered:

  • specified order no is already assigned to an existing order
  • basket neither contains a product nor a gift certificate line item (basket is empty)
  • any of the totals (net, gross, tax) of the basket is N/A
  • any campaign-based coupon in the basket is invalid (see dw.order.CouponLineItem.isValid())
  • the basket represents an order being edited, but the order has been already been replaced by another order
  • the basket represents an order being edited, but the customer associated with the original order is not the same as the current customer

The pipelet ignores all empty shipments of the basket. A shipment is empty if

  • it contains no product or gift certificate line items
  • all total prices (net, gross, tax) are 0.0

If the basket contains ProductLineItems with associated ProductListItems, the pipelet updates the purchase history of these ProductListItems. For example, if the basket contains items added from a GiftRegistry, the purchase history of the respective GiftRegistry items is updated.

If the basket represents an order that is being edited, this pipelet:

  • 1. Creates a new Order from the basket.
  • 2. Updates the original Order with the Order that replaced it.
  • 3. Sets the status of the original order to 'replaced'.

Please note that this pipelet might result in an order with a different customer ID than the originating registered customer attached to the session. This happens if a registered customer logs in with the "RememberMe" flag set to true, but is later logged out (either explicitly, or automatically via session expiration) before calling this pipelet. This is due to the internal order creation logic, which creates a new guest customer and attaches it to the order in such cases. To avoid this situation, have your custom code verify that the customer is authenticated before it calls this pipelet.

The inventory items reserved previously for the order are finalized when the transaction is committed. Since api version 2.10.6 this is only the delta changes compared with an order being replaced.

Group:
Order
Flags:
Error Connector
Transaction Required
Configuration Properties
CreateCustomerNo  :  Boolean (Optional)
If set to 'true', the pipelet creates a customer number and assigns it to the new order if the order is placed by an anonymous customer. If set to 'false' or not set, no customer number is created.
Permissible Values:
Don't create customer no
Create customer no
Input Parameters
Basket  :  Basket (Required)
OrderNo  :  String (Optional)
Optional order no. If not specified, the pipelet creates an order no.
Output Parameters
Order  :  Order  :  (Required)