Take the community feedback survey now.

Best Practice for Applying Custom LineItem Pricing in Optimizely Commerce?

Vote:
 

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:

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

  • 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:

  1. 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)?

  2. Does changing PlacedPrice interfere with the pricing engine or further recalculations?

  3. 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

#341103
Edited, Nov 26, 2025 10:46
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.