Salesforce B2C Commerce 23.5 > B2C Commerce API > B2C Commerce Pipelets > Order
Pipelet CreateOrder2

This pipelet creates an Order based on the specified Basket. If the order could be created successfully, it will be in status CREATED. The Basket will be removed from the session and marked for removal.

This pipelet ends on the ERROR exit if any of the following conditions are encountered:

The pipelet removes all empty shipments of the basket before creating the order. A shipment is empty if

The pipelet decrements inventory for all products contained in the order. It redeems all coupons contained in the order.

This pipelet must not be used with ReserveInventoryForOrder pipelet or dw.order.Basket#reserveInventory() in the same request.

If the basket contains product or gift certificate line items associated with product list items, the pipelet updates the purchase history of the product list items. For example, if the basket contains an item added from a gift registry, the purchase history of the respective gift registry item is updated.

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.

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)
The Basket to create an Order from.
OrderNo  :  String (Optional)
Optional order no. If not specified, the pipelet creates an order no.
Output Parameters
Order  :  Order  :  (Required)
An Order in status CREATED.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.