The pricing process creates a pricingAdjustment
object, which stores the promotion that caused the adjustment. The coupon
property of the pricingAdjustment
stores the coupon that resulted in the adjustment.
The ProcUpdateAdjustmentsWithCoupon
pipeline processor iterates through the pricing adjustments on the order and pulls the first coupon
related to the promotion
from the promotionStatus
matching on the promotion. This processor runs before the ProcRemoveUnusedPromotions
pipeline processor in the processOrder
pipeline chain.