The Commerce Server OrderDiscount pipeline component writes applicable discount information into the Order dictionary. Specifically, it writes discount information into the item._itemlevel_discounts_applied SimpleList and the _orderlevel_discounts_detail Dictionary/SimpleList. The written information includes the property discount_timestamp which contains the last modified DateTime for the discount. Curiously, it would appear that the values placed in these discount_timestamp properties are always one second later than the actual last modified DateTime value. The correct value can be found in the dt_campaignitem_modified column of the mktg_campaign_item table (where the discounts and other campaign items are stored).
Is this a hack of some sort? A mistake on my part? A bug? I have not done a detailed investigation (as that would be sad) so I don't really know the answer.
Filed under Commerce Server minutiae. Do not read when operating heavy machinery as may cause drowsiness.