discount-engine

Configure and implement rule-based discount systems supporting percentage, fixed, BOGO, and tiered promotions.

3|1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill discount-engine-tomtoto757
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: discount-engine
Source: https://github.com/tomtoto757/ecomm-ai-team/tree/main/skills/pricing-promotions-loyalty/finsilabs/pricing-promotions/discount-engine
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill discount-engine-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a promotions system that applies the right discounts in the right order is error-prone: stacking rules, tiered thresholds, and BOGO logic often cause margin losses or negative order totals when implemented incorrectly. This Skill guides you through configuring native discount engines on Shopify, WooCommerce, and BigCommerce, or building a custom server-side evaluation pipeline. ## Core Features & Use Cases - Platform Configuration Guides: Step-by-step setup for automatic discounts, BOGO, and tiered pricing on Shopify, WooCommerce (Dynamic Pricing plugins), and BigCommerce (Promotions and Price Lists). - Custom Discount Engine: A TypeScript reference implementation that filters eligible discounts, sorts by priority, enforces stacking flags, and allocates percentage, fixed-amount, and BOGO discounts to cart lines. - Stacking and Safety Rules: Explicit combination settings, maximum discount caps, sale-item exclusions, and server-side recalculation at order creation. - Use Case: A merchant wants tiered quantity pricing (buy 5+ get 10% off, buy 10+ get 20% off) that never stacks with a site-wide coupon. Use this Skill to configure the rules on their platform or implement the evaluation logic in a headless storefront. ## Quick Start Ask the AI to set up a tiered quantity discount with BOGO support and stacking rules for your Shopify, WooCommerce, or custom storefront.

Frequently Asked Questions about discount-engine

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a tiered quantity discount on Shopify?▼

Native Shopify does not support tiered quantity breaks without an app. Use Bold Discounts or Wholesale Club from the App Store, or write a Discount Function with Shopify Functions on Shopify Plus to apply the correct tier based on cart line quantities.

How to implement BOGO discounts in WooCommerce?▼

WooCommerce core coupons do not cover BOGO, so install YITH Dynamic Pricing & Discounts or the WooCommerce Dynamic Pricing extension. Create a Cart Pricing rule with the condition 'cart contains X of product' and the action 'add Y at 0% of regular price'.

Should discount amounts be calculated client-side or server-side?▼

Always calculate discounts server-side and never trust client-submitted amounts. Re-run the full discount evaluation at order creation, not just at cart-add time, to catch expired discounts and race conditions before charging the customer.

How do I prevent multiple discounts from stacking unexpectedly?▼

In Shopify, edit each discount's Combinations settings to control which discount types it combines with. In WooCommerce coupons, tick 'Individual use only', and in Dynamic Pricing rules use the 'Stops further rules' option to block lower-priority rules.

What happens if a discount makes the order total negative?▼

Cap the total discount at the cart subtotal so no order total goes below zero. For percentage discounts, also set a maximum dollar cap to prevent runaway promotions from destroying margins.

When should I build a custom discount engine instead of using platform features?▼

Configure the platform's native system first, since Shopify, WooCommerce, and BigCommerce cover most scenarios. Build custom evaluation logic only for headless storefronts or edge cases that native promotions and apps cannot express.