OrderLevelDiscountApply
Use this component to apply order level subtotal discounts.
Intended use: Order Processing pipeline, Order Adjust Price stage, between OrderDiscount and RequiredOrderAdjustPriceCy components.
In the Component Properties dialog box, on the Order Level Discount tab, do the following:
Use this | To do this |
---|---|
Apply discounts to all items | Apply order level discounts to all items in the order form. |
Apply discounts to items where the following key exists and the corresponding value is nonzero | Apply order level discounts only to items in the order form where the specified item dictionary key exists and the corresponding value is nonzero. |
Click Apply to save your changes.
For more information about discount interactions, see Order Subtotal Discount.
Configuration Values
None.
Values Read
The OrderDiscountApply component reads the following values from the indicated dictionaries.
Key | Dictionary | Description |
---|---|---|
item.quantity |
Order | Required. The total quantity of all the line items.
Type: Integer (VT_I4) |
item._cy_iadjust_currentprice |
Order | Required. The current price of all the line items.
Type: Currency (VT_CY) |
item._cy_oadjust_adjustedprice |
Order | Optional (default is 0.0). The total price of all the items, after all the discounts have been applied.
Type: Currency (VT_CY) Note
|
item._n_unadjusted |
Order | Optional (default is equal to the quantity). The quantity of line items that have not been adjusted bythe OrderDiscount component or other discounting components (number of line items that are eligible to serve as discount conditions and receive discount awards).
Type: Integer (VT_I4) |
_orderlevel_discounts_detail |
Order | Optional. A dictionary that maps special offer types to a list of order level discounts that applies for that special offer type.
Each element is a dictionary. The exact format of the dictionary depends on whether the element represents a combination of percentage-off discounts of the same priority, or a single discount. Following are the dictionary entries if the element represents a single discount:
Following are the dictionary entries if the element represents a combined percentage-off discount:
Following are the dictionary entries that exist in both cases:
The order the elements appear in the list is significant, because it is the order that OrderDiscount has determined they should be applied. Type: Currency (VT_CY) Note
|
_currency_decimal_places |
Order | Optional (if not set, the _currency_lcid key must be set, and the number of currency decimal places will be the default for that locale). Describes the number of digits of precision (after the decimal point) for which to round certain intermediate results, and to round to when writing currency values into the OrderForm object.
Type: Integer (VT_I4) |
_currency_lcid |
Order | Optional (required only if the _currency_decimal_places key is not set). Describes a locale (LCID) to use to retrieve the number of currency decimal places.
Type: Integer (VT_I4) |
SiteName |
Context | Optional. Used only for reporting the site name as part of several limited error messages, which may be reported to the Event log.
Type: String |
Values Written
The OrderDiscountApply component writes the following values to the Order dictionary.
Key | Description |
---|---|
item._cy_orderlevel_discounts_subtotal |
Not always written (only written if one or more order level discounts apply to the line item). The sum of all order level subtotal discounts applied to this line item. This key is written even if the discount applied has no impact on the price.
Type: Currency (VT_CY) |
item._orderlevel_discounts_applied |
Not always written. A SimpleList of dictionaries where each dictionary contains information about an item level discount that was applied to the line item. The order of the list is significant and represents the order in which the discounts were applied to this line item. This key is written even if the discount applied has no impact on the price.
The dictionary contains the following elements for each discount:
Type: Dictionary (VT_DISPATCH) |
item._cy_oadjust_adjustedprice |
Not always written (default is 0.0). The total price of all the items, after all the discounts have been applied.
Type: Currency (VT_CY) Notes
|
item._n_unadjusted |
Not always written (only for items to which a discount will apply by this component). The quantity of items in this line that have not been adjusted.
Type: Integer (VT_I4) Note
|
Remarks
For information about extending the OrderLevelDiscountApply component, see Order Level Discount Pipeline Components.
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.