RequiredOrderAdjustPriceCy

Use the RequiredOrderAdjustPriceCy pipeline component to adjust the total price of each item in an order after you apply any discounts.

Use the RequiredOrderAdjustPriceCy pipeline component to calculate the price of undiscounted items and the discount for all items in the order.

Intended use: Order Processing pipeline, Order Adjust Price stage.

Configuration Values

None.

Values Read

The RequiredOrderAdjustPriceCy pipeline component reads the following values from the indicated dictionaries.

Key

Dictionary

Description

item._n_unadjusted

Order

The quantity of this item that have not been discounted.

item._cy_iadjust_currentprice

Order

The current price of an item.

item._cy_oadjust_adjustedprice

Order

The total price of all the items, after all the discounts have been applied.

item.quantity

Order

The total quantity of an item.

Values Written

The RequiredOrderAdjustPriceCy pipeline component writes the following values to the indicated dictionaries.

Key

Description

item._cy_oadjust_adjustedprice

The total price of all the items, after all the discounts have been applied.

item._cy_oadjust_discount

The discount on an item.

Remarks

The RequiredOrderAdjustPriceCy pipeline component processes each item in the items collection of the Order dictionary.

For each item, the RequiredOrderAdjustPriceCy pipeline component first calculates the price of the non-discounted quantity. It multiplies the current price of the item (_cy_iadjust_currentprice) by the undiscounted quantity of the item (_n_unadjusted) and adds it to the total price of the item (_cy_oadjust_adjustedprice).

Next, it calculates the discount for the item (_cy_oadjust_discount) by calculating the total price for the item (multiplying the current price of the item (_cy_iadjust_currentprice) by the total quantity (quantity)) and subtracting the previously calculated cost of the undiscounted items.

The RequiredOrderAdjustPriceCy pipeline component is visible in the Pipeline Editor only when the Editor is run in expert mode.

See Also

Other Resources

Pipeline Component Reference