Loading...
Area: Episerver Commerce
Applies to versions: 12.2 and higher
Other versions:

AdjustInventory activity

Recommendations [hide]

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.

Do you find this information helpful? Please log in to provide feedback.

Last updated: Oct 24, 2016

Recommendations [hide]