GoRules Version 2 is here - redesigned, now with managed cloud.GoRules Version 2 is here!
Watch the launch videoWatchFlash Sale Eligibility
Smart retail solution that automatically selects products for flash sales based on inventory, profitability, seasonality, and seller performance.
Solution
This dynamic product selection system streamlines flash sale management by evaluating multiple product attributes simultaneously. It first analyzes inventory levels to ensure sufficient stock exists for promotional volume, while verifying profit margins meet minimum thresholds to maintain profitability during discounted pricing periods.
The seasonality analyzer matches product types with appropriate calendar periods, prioritizing seasonal items during their peak relevance while also identifying year-round products. For seller evaluation, the system examines both historical sales performance and customer satisfaction ratings to ensure quality standards. The final eligibility determination applies business rules that weigh these factors together, generating appropriate discount percentages based on how strongly a product meets the criteria. This automation significantly reduces manual review time while maximizing promotional effectiveness.
How it works
The decision graph processes product eligibility through four sequential evaluation nodes:
Inventory & Margin Check: Validates that products have sufficient stock (minimum 50 units) and acceptable profit margins (minimum 25%) to sustain discounting.
Seasonality Analysis: Aligns product seasonality with current calendar month, prioritizing items in their peak selling period while identifying year-round merchandise.
Seller Quality Assessment: Calculates seller performance factors based on rating (minimum 4.0) and historical sales volume (minimum 1000 units), with adjustment factors applied.
Final Eligibility Determination: Combines all evaluation factors to determine qualification status and appropriate discount percentage (ranging from 5-15% based on qualification strength).
Where teams use it
- E-commerce marketplace flash sales
- Retail inventory reduction programs
- Seasonal merchandise promotions
- Seller performance incentive programs
- End-of-season product clearance
- New seller growth acceleration
Inside the decision model
Flash Sale Eligibility ships as a JDM decision graph with 5 nodes, 3 decision tables and 16 rules. Download it, load it into GoRules, and run it as-is on Zen Engine.
Request
inputA flat request describes one candidate product: productId and category identify it, currentInventory and profitMargin cover the economics, season and currentMonth handle timing, and sellerRating with sellerHistoricalSales profiles the merchant. The schema marks all eight fields as required.
Sample requestJSON
{
"productId": "PROD-12345",
"category": "Electronics",
"currentInventory": 75,
"profitMargin": 0.28,
"season": "summer",
"currentMonth": 7,
"sellerRating": 4.5,
"sellerHistoricalSales": 2500
}Check Inventory And Margin
tableStock and margin are screened together with a first hit policy: 50 or more units with a profitMargin of at least 0.25 passes as 'Sufficient inventory and margin', and 100 or more units passes with a thinner 0.15 margin. Below that, fewer than 20 units fails as 'Insufficient inventory for flash sale', a margin under 0.1 fails as 'Margin too low for promotion', and the blank row rejects everything else, writing passesInitialCheck and initialCheckReason either way.
Flash sales spike demand, so the stock floor exists to avoid instant sellouts and the cancellations that follow, a standard concern when planning promotional volume. Accepting a lower 0.15 margin once inventory clears 100 units reflects clearance economics, where moving overstock justifies a thinner cut, while the 0.1 hard floor keeps any discounted sale from going out below cost.
| Current InventorycurrentInventory | Profit MarginprofitMargin | Passes Initial CheckpassesInitialCheck | Initial Check ReasoninitialCheckReason |
|---|---|---|---|
| >= 50 | >= 0.25 | true | 'Sufficient inventory and margin' |
| >= 100 | >= 0.15 | true | 'High inventory with acceptable margin' |
| < 20 | - | false | 'Insufficient inventory for flash sale' |
| - | < 0.1 | false | 'Margin too low for promotion' |
| - | - | false | 'Default: Does not meet primary criteria' |
Check Seasonality
tableCalendar fit is a lookup of season against currentMonth lists: 'summer' matches months 6, 7, 8, 'winter' matches 1, 2, 12, 'fall' matches 9, 10, 11, 'spring' matches 3, 4, 5, and 'all-year' products pass in any month. The blank fallback row sets isInSeason to false with the reason 'Product out of season'.
Tying promotion slots to the demand calendar is how retailers actually plan markdown and event cadences, since discounting a summer item in month 7 amplifies existing demand while the same discount in winter just erodes margin. The 'all-year' row keeps staple merchandise eligible without forcing a fake season onto it.
| Seasonseason | Current MonthcurrentMonth | Is In SeasonisInSeason | Season ReasonseasonReason |
|---|---|---|---|
| 'summer' | 6, 7, 8 | true | 'Summer product in summer months' |
| 'winter' | 1, 2, 12 | true | 'Winter product in winter months' |
| 'fall' | 9, 10, 11 | true | 'Fall product in fall months' |
| 'spring' | 3, 4, 5 | true | 'Spring product in spring months' |
| 'all-year' | - | true | 'Product available year-round' |
| - | - | false | 'Product out of season' |
Check Seller Quality
expressionSeller signals compress into three values: isQualifiedSeller requires sellerRating >= 4.0 and sellerHistoricalSales >= 1000 together, seasonalityFactor becomes 1.2 in season versus 0.8 out, and sellerFactor grades 1.5 for qualified sellers, 1.0 for ratings of at least 3.5, and 0.5 below that. The isQualifiedSeller flag is what the eligibility table branches on next, including its top-seller exemption row.
sellerRating >= 4.0 and sellerHistoricalSales >= 1000isInSeason ? 1.2 : 0.8$.isQualifiedSeller ? 1.5 : (sellerRating >= 3.5 ? 1.0 : 0.5)Determine Eligibility
tableEverything converges in a first hit table over passesInitialCheck, isInSeason, and isQualifiedSeller. All three true earns the full 15 discountPercentage as 'Product fully qualifies for flash sale', an in-season product without a qualified seller gets 10, a qualified seller off season gets 8, and a failed initial check can still salvage 5 through the 'Top seller exemption applied' row when isQualifiedSeller == true and currentInventory >= 30. The fallback row marks the product ineligible with a discount of 0.
Scaling discount depth with qualification strength is sound promotion economics: the deepest cut is only funded when inventory, margin, season, and seller quality all line up, and each missing factor shaves the offer rather than killing it. The exemption row is a sensible business choice to keep proven sellers in the program, with its own 30-unit floor so the override never books a sale the stock cannot cover.
| Initial CheckpassesInitialCheck | SeasonalityisInSeason | Seller QualityisQualifiedSeller | Is Eligible For Flash SaleisEligibleForFlashSale | Eligibility ReasoneligibilityReason | Discount PercentagediscountPercentage |
|---|---|---|---|---|---|
| passesInitialCheck == true | isInSeason == true | isQualifiedSeller == true | true | 'Product fully qualifies for flash sale' | 15 |
| passesInitialCheck == true | isInSeason == true | isQualifiedSeller == false | true | 'Seasonal product with sufficient inventory/margin' | 10 |
| passesInitialCheck == true | isInSeason == false | isQualifiedSeller == true | true | 'Off-season product from top seller' | 8 |
| passesInitialCheck == false | - | isQualifiedSeller == true and currentInventory >= 30 | true | 'Top seller exemption applied' | 5 |
| - | - | - | false | 'Product does not qualify for flash sale' | 0 |
Other Retail templates
View all templatesSeller Approval Workflow
Rules-based marketplace solution that evaluates business credentials, expertise, inventory quality, and background checks to maintain seller standards.
RetailDynamic Marketplace Commission Calculator
Automated system for calculating seller commission rates based on product category, sales data, seller performance, and promotional periods.
RetailProduct Listing Scoring
Automated scoring system that evaluates and ranks product listings based on image quality, description completeness, and other key marketplace success factors.
Make this template
your own.
Load Flash Sale Eligibility into GoRules, adjust the rules to your policy, and ship it behind your own API.