Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Applies to versions: 12.2-13
Other versions:
ARCHIVED This content is retired and no longer maintained. See the version selector for other versions of this topic.

AdjustInventory activity [Legacy]

During checkout, activity flows process payments, adjust item stock quantity, and record promotion usage. Episerver 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.

How it works

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.

Customizing the AdjustInventory activity

To customize the AdjustInventory activity, create an activity flow that mirrors the CartCheckout activity flow, and substitute the AdjustInventoryActivity with your implementation.

Last updated: Apr 01, 2021