ItemPromo

Use this component to apply a promotional price adjustment to an item on the order form.

Ee796473.note(en-US,CS.20).gifNote

  • The ItemPromo component should not be used for future development. The discount features of the Content Selection pipeline provide a more powerful and general mechanism for applying product discounts. For more information, see Discount Objects.

Use this component to apply a promotional price adjustment to an item on the items list for the order form. The ItemPromo component first determines whether the current date falls within the time period specified by the Start Date and End Date boxes. If it does, then the component evaluates the item to determine if it meets the conditions of the promotion (specified by the combination of the Condition Order Key, Condition Operator, and Condition Value boxes). If it does, then the ItemPromo component applies the specified discount and writes the new value to the _iadjust_currentprice key on the item order form, provided that the _iadjust_currentprice key has not been initialized by a previously run component.

Intended use: Order Processing pipeline, Adjust Price stage.

Configuration Values

You can determine the discount the ItemPromo component applies and the discount type by setting component properties. Use the following boxes on the Item Promo tab of the Component Properties dialog box to determine this information.

Box Description
Condition Order Key The name of the item attribute that identifies the condition to meet for a promotion to be applied (for example, _product_type).
Condition Operator An operator (<, <=, =, >=, >, or <>) used to compare the value of the Condition Order Key box with the value in the Condition Value box. The default is the equal (=) operator.
Condition Value The product or products that must be purchased before the promotion is applied. The value in this box is compared with the value in the column name specified in the Condition Order Key box. This value can be text, an integer, or a floating-point number.
Discount Type Shows whether the discount is a percentage-off discount or a price discount. The default is percentage-off discount.
Discount Value The discount amount. This must be an integer value; floating-point numbers (for example, .10) are not accepted. The default is zero (0).
Start Date Optional. The date the promotion begins, starting at 12:00:01 a.m.
End Date Optional. The date the promotion ends, ending at 12:00:01 a.m. For example, if you want the last day of a promotion to be 3/31, you would specify an End Date of 4/1.

Values Read

The ItemPromo component reads the following values from the indicated dictionaries.

Key Dictionary Description
item._iadjust_regularprice Order The regular price of the item.
item._iadjust_currentprice Order The current price of the item.
item.<name> Order Dynamic. The key specified in the ConditionOrderKey box.

Values Written

The ItemPromo component writes the following values to the Order dictionary.

Key Description
item._iadjust_currentprice The current price of the item with the discount applied.

Remarks

The ItemPromo component applies a promotional price adjustment to an item in the item list in the order form. The component performs the following steps in testing and applying the discount:

  1. The ItemPromo component first determines whether the current date falls within the period specified by the values in the Start Date and End Date boxes.
  2. If the current date is in range, the component evaluates the item to determine if it meets the condition for the promotion. The condition is specified by the combination of the values in the Condition Order Key, Condition Operator, and Condition Value boxes.
  3. If the item meets the condition, the ItemPromo component applies the specified discount and writes the new value to the _iadjust_currentprice key of the item in the order form, provided that the _iadjust_currentprice key has not been initialized by a previously run component.

The promotional comparisons specified in the Conditional Value box are case-sensitive. For example, a product ID of AW13-200 will be interpreted differently than a product ID of aw13-200.

In addition, because the Start Date and End Date boxes for a promotion specify midnight, the value in the End Date box excludes the day specified. For example, if you want the last day of a promotion to be 3/31, be sure to specify that the promotion ends on 4/1.

Copyright © 2005 Microsoft Corporation.
All rights reserved.