skills/pricing-promotions/flash-sale-engine/SKILL.md
Run time-limited sales with live countdown timers, per-item quantity caps, virtual waiting rooms, and automatic price restoration on expiry
npx skillsauth add finsilabs/awesome-ecommerce-skills flash-sale-engineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Flash sales are time-limited discounts — typically 2–24 hours — that create urgency and drive conversion spikes. They require three things to work reliably: a countdown timer visible to shoppers, per-sale quantity limits that prevent overselling, and automatic price restoration when the sale ends. For high-traffic launches (product drops, Black Friday doorbusters), a virtual waiting room is also essential to prevent bot scalping. Most platforms have apps that handle this without custom code.
| Platform | Recommended Tool | Why | |----------|-----------------|-----| | Shopify | Countdown Timer Bar, FOMO, or Hextom Flash Sales app | These apps handle countdown timers, scheduled price changes, and inventory display without custom code | | Shopify Plus | Launchpad (free for Plus) | Shopify's official flash sale app — schedules price changes, enables/disables discount codes, and restores prices automatically | | WooCommerce | YITH WooCommerce Flash Sales or WooCommerce Sales Countdown | Manage sale prices with countdown timers directly on product pages | | BigCommerce | BigCommerce Promotions with custom script for countdown timer | BigCommerce's promotions engine handles discounts; use a storefront script for the timer UI | | High-traffic drops (any platform) | Cloudflare Waiting Room | Cloudflare's managed waiting room queues visitors fairly; prevents scalper bots from monopolizing limited stock | | Custom / Headless | Build with Redis for atomic stock and SSE/WebSocket for timer | Full control for custom platforms where apps don't apply |
Option A: Shopify Launchpad (Plus only, free)
Launchpad is the official Shopify tool for scheduling promotional events:
Important: Set sale quantities separately from your main inventory. If you only want to sell 100 units at the flash sale price, reduce the product's available inventory to 100 before the sale, then restock after. Launchpad does not manage sale quantities natively.
Option B: Hextom Flash Sales app (non-Plus)
Per-product quantity caps: Use Shopify's built-in inventory tracking to set flash sale quantities:
Option A: YITH WooCommerce Flash Sales plugin
Option B: WooCommerce native sale pricing with an add-on for countdown
WooCommerce supports Sale price and Schedule natively on every product:
Add a countdown timer with Countdown Timer for WooCommerce (free plugin) or WooCommerce Sales Countdown Timer.
Per-product flash sale quantity: Reduce the product's stock quantity to the flash sale cap before the sale begins, then restore it manually or via a scheduled script afterward.
Quantity limits on BigCommerce: Set a Maximum uses limit on the promotion to cap how many orders can use the flash sale discount, or use the product's inventory tracking to limit stock.
For product drops expecting high traffic (limited sneakers, concert tickets, exclusive merchandise):
Cloudflare Waiting Room (recommended)
/products/limited-edition-*)This requires a Cloudflare Business or Enterprise plan. For lower-cost alternatives, consider Queue-it or Fastly's Waiting Room.
For custom storefronts, implement atomic stock reservation using Redis for high-concurrency safety:
import { Redis } from 'ioredis';
const redis = new Redis(process.env.REDIS_URL);
// Atomically reserve one unit from the flash sale allocation
async function reserveFlashSaleUnit(saleId: string, customerId: string): Promise<boolean> {
const key = `flash_sale:${saleId}:sold`;
const maxKey = `flash_sale:${saleId}:max`;
const max = parseInt(await redis.get(maxKey) ?? '0');
if (max === 0) return false; // sale not configured
// Atomic increment — safe under high concurrency
const newCount = await redis.incr(key);
if (newCount > max) {
await redis.decr(key); // Undo the over-increment
return false; // Sold out
}
return true;
}
// Send countdown timer data to the client via Server-Sent Events
app.get('/api/sales/:saleId/timer', async (req, res) => {
const { endsAt, maxQuantity } = await db.flashSales.findById(req.params.saleId);
res.setHeader('Content-Type', 'text/event-stream');
res.setHeader('Cache-Control', 'no-cache');
const interval = setInterval(async () => {
const remaining = Math.max(0, new Date(endsAt).getTime() - Date.now());
const sold = parseInt(await redis.get(`flash_sale:${req.params.saleId}:sold`) ?? '0');
res.write(`data: ${JSON.stringify({ remaining, stockLeft: maxQuantity - sold })}\n\n`);
if (remaining === 0) { clearInterval(interval); res.end(); }
}, 1000);
req.on('close', () => clearInterval(interval));
});
| Problem | Solution |
|---------|----------|
| Price not restored after sale ends | Use Launchpad or a countdown app with auto-restore; if using manual scheduling, set a calendar reminder and verify restoration; build a fallback check that validates prices against a "source of truth" table |
| Overselling during traffic spike | Use Redis atomic increment for custom builds; for platforms, set product inventory to the flash sale cap before the sale starts |
| Countdown timer shows different time in different timezones | Always base the countdown on the sale's absolute UTC end time; calculate remaining = endsAt - Date.now() client-side |
| Bots exhaust all stock before real customers can buy | Use Cloudflare Waiting Room or a similar queuing system; enforce per-customer purchase limits in your order system |
| App-managed countdown timer conflicts with manual price changes | Do not modify prices through the Shopify admin while a Launchpad event or countdown app is active |
tools
Let shoppers save products to a wishlist, share it with friends, and get notified when saved items come back in stock or drop in price
development
Build a themeable storefront with design tokens and CSS custom properties that supports white-labeling, multi-brand variants, and dark mode
development
Speed up product discovery with instant search suggestions, fuzzy typo matching, and category-aware results powered by Algolia or Elasticsearch
development
Build a mobile-first storefront with thumb-friendly navigation, sticky add-to-cart buttons, and touch-optimized components for high mobile conversion