We’re implementing Floor Sample pricing (Custom Pricing) in an Optimizely Commerce 14 project and I wanted to check if the approach we’re using is considered best practice, or if there’s a more Commerce-native way to handle dynamic pricing.
Right now, when an item qualifies as a Floor Sample, we override the price directly on the line item:
lineItem.PlacedPrice = floorSamplePrice; // custom price from database - decimal
_cartRepository.SaveCart(cart); // Save cart after updating placed price
This works, but I’m not sure if overriding PlacedPrice is the recommended pattern, especially when:
promotions need to run on top of the modified price
the price needs to persist through checkout → purchase order conversion
we later need to audit/track that the price used was a floor-sample price
My questions:
Is directly setting PlacedPrice the correct way to inject custom/dynamic pricing? Or should we instead be extending a service like:
IPriceService
IPlacedPriceProcessor
or IShippingPromotionProcessor (if price affects eligibility)?
Does changing PlacedPrice interfere with the pricing engine or further recalculations?
Should we be storing the Floor Sample price in a custom line item property instead of overwriting PlacedPrice, and let a custom price processor pick it up?
Looking for guidance from anyone who has implemented custom/dynamic pricing outside the standard Price Cards. Any best practices or pitfalls would be really helpful!
Hi everyone,
We’re implementing Floor Sample pricing (Custom Pricing) in an Optimizely Commerce 14 project and I wanted to check if the approach we’re using is considered best practice, or if there’s a more Commerce-native way to handle dynamic pricing.
Right now, when an item qualifies as a Floor Sample, we override the price directly on the line item:
This works, but I’m not sure if overriding
PlacedPriceis the recommended pattern, especially when:promotions need to run on top of the modified price
cart recalculation happens (totals, taxes, fees, etc.)
the user refreshes the cart or shipping methods
the price needs to persist through checkout → purchase order conversion
we later need to audit/track that the price used was a floor-sample price
My questions:
Is directly setting
PlacedPricethe correct way to inject custom/dynamic pricing?Or should we instead be extending a service like:
IPriceServiceIPlacedPriceProcessoror
IShippingPromotionProcessor(if price affects eligibility)?Does changing
PlacedPriceinterfere with the pricing engine or further recalculations?Should we be storing the Floor Sample price in a custom line item property instead of overwriting
PlacedPrice, and let a custom price processor pick it up?Looking for guidance from anyone who has implemented custom/dynamic pricing outside the standard Price Cards. Any best practices or pitfalls would be really helpful!
Thanks