Order Management for Developers

Using the Salesforce B2C Commerce APIs, you can customize your order processing functionality and payment processor methods. B2C Commerce also supports asynchronous payment methods.

Use the pipelet, GetPaymentProcessor, to establish the workflow to connect the payment method chosen by the customer (for example, credit card, bill-me-later, or bank card) to the payment processor defined through Business Manager. Use Studio to edit the pipelet.

You can configure multiple payment instruments per basket/order. For example, an order can be associated with multiple credit cards, gift certificates, or other payment methods. The SiteGenesis application implements a scenario where customers can redeem multiple gift certificates and pay the remaining amount with a credit card or BillMeLater.

Order Post-Processing APIs Deprecated

The order post-processing APIs, including the Gillian package, are inactive by default, except for merchants who are already using them. Attempting to use them when they’re inactive throws an exception.

Note: These APIs are unrelated to Commerce Cloud Order Management.

The following objects and APIs are inactive by default. The APIs are also at End of Adoption, and will be End of Life by the end of 2024.

Objects APIs
  • Appeasement
  • AppeasementItem
  • Invoice
  • InvoiceItem
  • Return
  • ReturnCase
  • ReturnCaseItem
  • ReturnHooks
  • ReturnItem
  • ShippingOrder
  • ShippingOrderHooks
  • ShippingOrderItem
  • dw.order.OrderItem
  • dw.order.TrackingInfo
  • dw.order.TrackingRef
  • dw.order.Order.getShippingOrders()
  • dw.order.ProductLineItem.getOrderItem()
  • dw.order.ShippingLineItem.getOrderItem()
  • dw.order.Order.setOrderStatus(int)
  • dw.order.Order.getShippingOrders()
  • dw.order.Order.getShippingOrders()
  • dw.order.Order.getShippingOrder(String)
  • dw.order.Order.getShippingOrderItem(String)
  • dw.order.Order.getShippingOrderItems()
  • dw.order.Order.getReturnCases()
  • dw.order.Order.getReturns()
  • dw.order.Order.getReturn(String)
  • dw.order.Order.getReturnItems()
  • dw.order.Order.getReturnItem(String)
  • dw.order.Order.getReturnCase(String)
  • dw.order.Order.getReturnCaseItems()
  • dw.order.Order.getReturnCaseItem(String)
  • dw.order.Order.createReturnCase(String, boolean)
  • dw.order.Order.createReturnCase(boolean)
  • dw.order.Order.createServiceItem(String, String)
  • dw.order.Order.createAppeasement(String)
  • dw.order.Order.createAppeasement()
  • dw.order.Order.createShippingOrder(String)
  • dw.order.Order.createShippingOrder()
  • dw.order.OrderMgr.createShippingOrders(Order)
  • dw.order.Order.getInvoices()
  • dw.order.Order.getInvoice(String)
  • dw.order.Order.getInvoiceItems()
  • dw.order.Order.getInvoiceItem(String)

Create a Shipping Order

The Shipping Order Creation API has been optimized, making it possible to create ShippingOrders and ShippingOrderItems with the B2C Commerce Script API. The allocation of inventory is now decoupled from the shipping order creation process. It's also possible to trigger the shipping order creation process from the B2C Commerce Script API by calling OrderMgr#createShippingOrders(Order order).

Obsolete Basket Cleanup

Baskets have a refID that stores customerID, agentID, or NULL. If the refID is NULL, the basket can be removed from B2C Commerce via a basket cleanup job. The basket ID is stored in the session dictionary to help differentiate between baskets restored and baskets restored previously.

Update Orders After Placement Using the APIs

You might want to let an order management system cancel or open orders using the B2C Commerce APIs. When you cancel an order using the API, an entry is created in the order history, just as it is when you cancel an order through Business Manager. When you replace an order via the API, an entry is created in history that specifies the replacement's document number; while the replacement order contains information about the replaced order. If you cancel or replace an order via the API, the inventory availability for that order is updated.

Note: The Gillian cartridge contains specific support for product bundles. All 'sent' notifications include information for the product bundle only, the bundled products are skipped.