v2.0

GoRules Version 2 is here - redesigned, now with managed cloud.GoRules Version 2 is here!

Watch the launch videoWatch

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

  1. Inventory & Margin Check: Validates that products have sufficient stock (minimum 50 units) and acceptable profit margins (minimum 25%) to sustain discounting.

  2. Seasonality Analysis: Aligns product seasonality with current calendar month, prioritizing items in their peak selling period while identifying year-round merchandise.

  3. Seller Quality Assessment: Calculates seller performance factors based on rating (minimum 4.0) and historical sales volume (minimum 1000 units), with adjustment factors applied.

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

Decision graph5 nodes · read-only
input requesttable checkInventoryAndMargintable checkSeasonalityexpression checkSellerQualitytable determineEligibility
01

Request

input

A 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
}
02

Check Inventory And Margin

table

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

Decision tablefirst hit policy
Current InventorycurrentInventoryProfit MarginprofitMarginPasses Initial CheckpassesInitialCheckInitial Check ReasoninitialCheckReason
>= 50>= 0.25true'Sufficient inventory and margin'
>= 100>= 0.15true'High inventory with acceptable margin'
< 20-false'Insufficient inventory for flash sale'
-< 0.1false'Margin too low for promotion'
--false'Default: Does not meet primary criteria'
03

Check Seasonality

table

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

Decision tablefirst hit policy
SeasonseasonCurrent MonthcurrentMonthIs In SeasonisInSeasonSeason ReasonseasonReason
'summer'6, 7, 8true'Summer product in summer months'
'winter'1, 2, 12true'Winter product in winter months'
'fall'9, 10, 11true'Fall product in fall months'
'spring'3, 4, 5true'Spring product in spring months'
'all-year'-true'Product available year-round'
--false'Product out of season'
04

Check Seller Quality

expression

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

Expressions3 fields
isQualifiedSellersellerRating >= 4.0 and sellerHistoricalSales >= 1000
seasonalityFactorisInSeason ? 1.2 : 0.8
sellerFactor$.isQualifiedSeller ? 1.5 : (sellerRating >= 3.5 ? 1.0 : 0.5)
05

Determine Eligibility

table

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

Decision tablefirst hit policy
Initial CheckpassesInitialCheckSeasonalityisInSeasonSeller QualityisQualifiedSellerIs Eligible For Flash SaleisEligibleForFlashSaleEligibility ReasoneligibilityReasonDiscount PercentagediscountPercentage
passesInitialCheck == trueisInSeason == trueisQualifiedSeller == truetrue'Product fully qualifies for flash sale'15
passesInitialCheck == trueisInSeason == trueisQualifiedSeller == falsetrue'Seasonal product with sufficient inventory/margin'10
passesInitialCheck == trueisInSeason == falseisQualifiedSeller == truetrue'Off-season product from top seller'8
passesInitialCheck == false-isQualifiedSeller == true and currentInventory >= 30true'Top seller exemption applied'5
---false'Product does not qualify for flash sale'0

Make this template
your own.

Load Flash Sale Eligibility into GoRules, adjust the rules to your policy, and ship it behind your own API.