| Key | Description |
| _discounts | Not always written (if the _discounts list was set before the OrderDiscount object was run, it is not changed). A ContentList object that contains the discounts from the discounts cache that is based on the CacheName key in the pipeline context. For the structure of the ContentList object, see CSFLoadDiscounts. Type: ContentList (VT_DISPATCH) |
| _winners | Always written. A SimpleList object that contains the campaign item IDs of all discounts applied to the basket. Type: SimpleList (VT_DISPATCH) Note: |
|---|
| Used by the RecordEvent and IISAppendToLog components to record the fact that the campaign items were applied (SOLD events), usually in the Accept stage of the checkout pipeline. |
|
| _event | Always written. Contains the name of the event to record. This should always be set to SOLD. Type: String (VT_BSTR) Note: |
|---|
| This value is used by the RecordEvent and IISAppendToLog components to record the fact that the campaign items were applied (SOLD events), usually in the Accept stage of the checkout pipeline. |
|
| item._cy_oadjust_adjustedprice | Always written. The total price of all the items, after all the discounts have been applied. An item is adjusted if it received a discount or was used as a condition for a discount where either the reuse_condition_as_condition or reuse_condition_as_award flags were set to false. Type: Currency (VT_CY) Note: |
|---|
| Total price for the line item can be computed as the following: _n_unadjusted*_cy_iadjust_currentprice+_cy_oadjust_adjustedprice |
|
| item._n_unadjusted | Always written. The number of items whose price remains unadjusted after discounts are applied. An item is adjusted if it received a discount or was used as a condition for a discount where either the reuse_condition_as_condition or reuse_condition_as_award flags was set to false. Type: Integer (VT_I4) |
| item.discounts_applied | Optional. A dictionary that contains the campaign item IDs of the discounts that applied to this item. The keys are the IDs. The values are the date-time stamps of the discounts. This is usually persisted together with the Order dictionary and used by the OrderDiscount object to detect discount changes and warn the user when a discount has changed or been removed. Type: IDictionary (VT_DISPATCH) Note: |
|---|
| The format of the dictionary is a mapping from discount ID (campaign item ID) to a last-modified timestamp (VT_DATE). |
|
| item._itemlevel_discounts_applied | Optional (only written if one or more item level discounts apply to the line item). 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. The dictionary contains the following elements for each discount: -
discount_id: Campaign item ID (VT_I4) -
discount_priority: Discount priority (rank) (VT_I4) -
discount_timestamp: Last-modified timestamp of the discount (VT_DATE) -
cy_discount_amount: How much was actually taken off the item (VT_CY) -
discount_type: 1=Currency value; 2=Percentage (VT_I4) -
cy_discount_value: Currency value or percentage value (VT_CY) -
discount_name: Discount name (VT_BSTR) -
discount_basket_display: The name of the discount suitable for displaying to the user. If the Language key of the Context dictionary has a value, the value is used to look up the string to use for the value of the discount_basket_display element. If the Language key of the Context dictionary does not have a value, the value of the discount_basket_display element is in the default language of the Marketing system. (VT_BSTR) Type: Dictionary (VT_DISPATCH) |
| item._cy_itemlevel_discounts_subtotal | Not always written (only written if one or more item level discounts apply to the line item). Sum of all item level discounts apply to this line item. Type: Currency (VT_CY) |
| orderlevel_discounts_applied | Optional. This component writes discount_basket_display into each entry in this list. This is a dictionary with information about the discounts that applied at the order level the last time that the OrderDiscount component was run. This is usually persisted together with the Order dictionary and used by the OrderDiscount object to detect discount changes and warn the user when a discount has changed or been removed. Type: Dictionary (VT_DISPATCH) Note: |
|---|
| The format of the dictionary is a mapping from the discount ID (campaign item ID) to a last-modified timestamp (VT_DATE). |
|
| _orderlevel_discounts_detail | This is a dictionary that maps special offer types to a list of order level discounts that applies for that special offer type. It is written here so that OrderDiscountApply can read the value and write it into the orderlevel_discounts_detail entries that it writes. Other components such as OrderDiscountApply or ShippingDiscountAdjust are responsible for actually applying the discounts. 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. The following are the dictionary entries if the element represents a single discount: -
discount_id: Integer (VT_I4) -
discount_timestamp: Last-modified timestamp of the discount (VT_DATE) -
discount_name: Discount name (VT_BSTR) -
discount_basket_display: The name of the discount suitable for displaying to the user. If the Language key of the Context dictionary has a value, the value is used to look up the string to use for the value of the discount_basket_display element. If the Language key of the Context dictionary does not have a value, the value of the discount_basket_display element is in the default language of the Marketing system. (VT_BSTR) The following are the dictionary entries if the element represents a combined percentage-off discount: The following are the dictionary entries that exist in both cases: -
discount_priority: Priority (rank). -
discount_type: 1=Currency; 2=Percentage (VT_I4). -
cy_discount_value: Currency or Percentage value (VT_CY). If the element represents a combined percentage-off discount, this is the total percentage. The order the elements appear in the list is significant, because it is the order that OrderDiscount has determined they should be applied. Type: Dictionary (VT_DISPATCH) Note: |
|---|
| A combined percentage discount will never reflect a value larger than 100 percent, even if the sum of the percentages of discounts in the discounts_combined list is larger than 100. The last contribution of the discount is considered as the only amount that will apply. |
Note: |
|---|
| If the combination is already discounted 100 percent, no additional percentage discounts of the same priority will be considered as applied, even if they could apply. Therefore, they will not be written to the list. |
|
| _discounts_removed | Optional. A SimpleList object that contains campaign item IDs of discounts that no longer apply to the basket since the last time that the pipeline was run. This key is written only if some discounts no longer apply. Type: SimpleList (VT_DISPATCH) Note: |
|---|
| If this key is set, OPPERRORLEV_WARN (2) is returned from the Execute method, and the MessageManager message pur_discount_changed is added to the _Basket_Errors list. |
|
| _discounts_changed | Optional. A SimpleList object that contains campaign item IDs of discounts that have changed since the last time that the pipeline was run. This key is written only if some discounts have changed. Type: SimpleList (VT_DISPATCH) Note: |
|---|
| If this key is set, OPPERRORLEV_WARN (2) is returned from the Execute method and the MessageManager message pur_discount_changed is added to the _Basket_Errors list. |
|
| _Basket_Errors | Optional (modified if _discounts_removed or discounts_changed is set). Error messages are written to this SimpleList object. Type: IsimpleList (VT_DISPATCH) Note: |
|---|
| Every Order dictionary has a _Basket_Errors list that is used to report nonfatal pipeline errors to the user. |
|
| _qualifying_discounts | Optional (written only when one or more discounts meet their qualification, but the discount has nothing to which to apply). Discount item IDs of the discounts that meet their qualifications, but for which there is nothing to award are written to this SimpleList object. Type: IsimpleList (VT_DISPATCH) |
| _discounts_trace_info | Optional. Not always written (written only if context_trace_discounts was set to true). Contains information about discount decisions. Type: String (VT_BSTR) |
| _<special_offer_type>_type | Optional (legacy). Not always written. The type of an order level discount (for example, free shipping), if one applies. Another component in the pipeline (such as ShippingDiscountAdjust) applies the discount. The key name is formed from the string stored in the special_offer_type key in the ContentList object. Possible values are as follows: -
1 (money discount) -
2 (percentage discount) More than one type of order level discount may apply to the same OrderForm. Type: Currency (VT_CY) Important Note: |
|---|
| This is a legacy key for backward compatibility with the Commerce Server 2000 OrderDiscount component. New development should use the _orderlevel_discounts_detail dictionary. |
|
| _cy_<special_offer_type>_value | Optional (legacy). The value of an order level discount (for example, free shipping), if one applies. Another component in the pipeline (such as ShippingDiscountAdjust) applies the discount. This key is used only for custom discounts applied outside the pipeline. The key name is formed from the string stored in the u_special_offer_type key in the discount database. The value of the discount comes from the offer_value field in the ContentList object. Type: Currency (VT_CY) Important Note: |
|---|
| This is a legacy key for backward compatibility with the Commerce Server 2000 OrderDiscount component. New development should use the _orderlevel_discounts_detail dictionary. |
|
| _cy_<special_offer_type>_description | Optional (legacy). The description of an order level discount if one applies. This key may be used to display when the discount applies somewhere on the page. The value comes from the description field in the ContentList object. Type: String (VT_BSTR) Important Note: |
|---|
| This is a legacy key for backward compatibility with the Commerce Server 2000 OrderDiscount component. New development should use the _orderlevel_discounts_detail dictionary or the item_orderlevel_discounts_applied dictionary to obtain the item IDs. It can then look up the discount descriptions from the _discounts ContentList. |
|