During checkout, activity flows process payments, adjust item stock quantity, and record promotion usage. Optimizely Customized Commerce includes an adjust inventory activity that is incorporated into activity flows. The activity re-calculates and adjusts warehouse inventories after placing an order.
Classes in this topic are available in the following namespace:
Mediachase.Commerce.Workflow.Activities.Cart. Contains AdjustInventoryActivity.
The CartCheckout activity flow is executed when a cart is submitted for processing during order placement. The flow performs these tasks:
If the Process payment flag is _true_, calls the ProcessPayment method associated with the cart's payment providers.
Calculates totals for the cart based on line item price, item quantity, shipping totals, handling totals, and taxes. OrderForm, Cart, and LineItem properties are updated for totals.
If inventory tracking is enabled, the SKU inventory is adjusted after purchase.
Saves promotion usage data to the PromotionUsage table, where it tracks each promotion entry for enforcement of promotion redemption limits.
The AdjustInventory activity recalculates and adjusts the stock quantity of the cart's items.
Example: the AdjustInventoryActivity activity
**Example: AdjustInventoryOrRemoveLineItems**
Note
To customize the AdjustInventory activity, create an activity flow that mirrors the CartCheckout activity flow, and substitute the AdjustInventoryActivity with your implementation.