Reference for the buy box optimization pricing algorithm. Use when understanding pricing decisions, debugging price changes, or investigating buy box behavior. Covers the core optimization loop, buy box detection, and edge cases like multiple buy box winners.
Inherits all available tools
Additional assets for this skill
This skill inherits all available tools. When active, it can use any tool Claude has access to.
The pricing engine uses a buy box optimization strategy that continuously adjusts prices to find the optimal ceiling while retaining the buy box. The algorithm oscillates prices to test boundaries.
Goal: Maximize price while maintaining buy box ownership.
Logic Flow:
Key Files:
BuyBoxOptimizationPricingStrategy.cs - Core pricing logicAmazonAnyOfferNotificationsReader.cs - Buy box detection from notificationsRecommendationContextCollector.cs - Context gathering for pricing decisionsWe detect buy box ownership by checking if our specific offer has IsBuyBoxWinner = true:
var weHaveBuyBox = sortedOffersByPrice
.FirstOrDefault(offer => offer.SellerId == BisonSellerId && offer.IsBuyBoxWinner) is not null;
Multiple offers on a listing can have buy box, thus we have to filter our own offers which has buybox and take highest priced one to determine if we have buy box or not. Then this does not impact the algorithm.
| Condition | Action | Reason |
|---|---|---|
WeHaveBuyBox && BuyBoxPct >= 90% | +1% | Test higher ceiling |
WeHaveBuyBox && BuyBoxPct < 90% | Hold | Stabilize ownership |
!WeHaveBuyBox && Price > Min | -1% or match competitor | Win buy box back |
!WeHaveBuyBox && Price == Min | Hold | Cannot compete further |