price-rules-engine
БесплатноБез исполняемых скриптовНе проверенDefine stackable pricing rules with priority ordering, customer-segment targeting, product exclusions, and automatic discount combination logic
от finsilabs★ 69 звёзд на GitHubОб этом скилле
Price Rules Engine
Overview
A price rules engine lets you define multiple concurrent promotions — site-wide sales, coupon codes, loyalty discounts — and apply them to a cart in a predictable, controlled order. The key concerns are: which rules apply to which products, which rules can stack with others, and what happens when multiple rules target the same item. Every major platform has some form of this built in; the gap is usually in advanced stacking control and customer-segment targeting.
When to Use This Skill
- When you have multiple concurrent promotions (site-wide sale + coupon + loyalty discount) and need deterministic stacking behavior
- When marketing needs to create complex promotions (e.g., "20% off all shoes except Nike, for Gold loyalty members") without engineering involvement
- When migrating from hardcoded promotional logic scattered across the codebase to a data-driven rule system
- When building a promotion scheduler that activates and deactivates rules at configured times
- When you need an audit log that shows exactly which rules were applied and why for customer service queries
Core Instructions
Step 1: Determine the merchant's platform and choose the right tool
| Platform | Built-in Capability | When to Extend |
|---|---|---|
| Shopify | Discounts admin handles basic stacking via "Combinations" settings | Use Bold Discounts or Shopify Scripts (Plus) for advanced rule stacking, customer-segment targeting, and conditional logic |
| WooCommerce | Coupons core + Dynamic Pricing plugin for conditional rules | For complex priority ordering and segment targeting: YITH WooCommerce Dynamic Pricing & Discounts provides the most control |
| BigCommerce | Promotions engine supports multiple concurrent promotions with priority ordering and stacking rules | BigCommerce's built-in system handles most scenarios natively |
| Custom / Headless | Must build | Required when none of the above fits your use case |
Step 2: Configure price rules with stacking on your platform
Shopify
Shopify manages discount stacking through the Combinations setting on each discount.
Setting up stacking rules:
- Go to Discounts → create or edit a discount
- Scroll to the Combinations section
- Toggle which types this discount can combine with:
- Product discounts — can this stack with other product-level discounts?
- Order discounts — can this stack with order-level discounts?
- Shipping discounts — can this stack with free-shipping discounts?
- For automatic discounts, the highest-value automatic discount takes precedence by default; use Combinations to allow stacking
Customer-segment targeting:
- Under Customer eligibility, choose Specific customer segments
- Select segments created in Customers → Segments (e.g., "VIP customers", "First-time buyers")
Priority and exclusions:
- Set Start and end dates to control which rules are active
- Under Products, set which products or collections the discount applies to
- Add exclusions: "Exclude sale items" or specify products that are excluded
Shopify Plus — Shopify Scripts: For rules that cannot be expressed through the Discounts UI (e.g., tiered stacking where the second discount only applies if the cart is above a threshold):
- Go to Apps → Script Editor (Scripts is a separate Shopify Plus feature)
- Create a Line Item Script or Shipping Script
- Scripts run at checkout and can apply complex conditional discounts; they take precedence over other discounts
Bold Discounts (App Store, ~$20/month): A visual rule builder for Shopify that supports:
- Stack / don't stack per promotion
- Priority ordering between promotions
- Complex conditions (customer tags, collection membership, quantity thresholds)
WooCommerce
WooCommerce coupons support basic single-rule discounts. For a full price rules engine with priority ordering and stacking control, use the Dynamic Pricing plugin.
Installing and configuring YITH WooCommerce Dynamic Pricing & Discounts:
- Install the plugin from YITH.com (~$70/year)
- Go to YITH → Dynamic Pricing → Pricing Rules
- Create a rule and configure:
- Type: cart, product, or category pricing
- Discount: percentage or fixed amount
- Conditions: cart subtotal, quantity, customer role, date range
- Products/categories: which items the rule applies to; set exclusions
- Priority: lower number = higher priority (applied first)
- Stacking: "Stop other rules" to prevent lower-priority rules from stacking
Customer segment targeting in WooCommerce:
- Use WooCommerce Customer Roles (available via plugins like User Role Editor or WooCommerce B2B):
- Assign customers to roles like "wholesale", "vip", "trade"
- In Dynamic Pricing rules, restrict each rule to specific customer roles
- Customers in that role see t
Установить price-rules-engine в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
claude-codecursorgemini-clicopilotcodex-clikiroopencodeВложенные файлы
FAQ
Что делает скилл price-rules-engine?
Define stackable pricing rules with priority ordering, customer-segment targeting, product exclusions, and automatic discount combination logic
Как установить скилл price-rules-engine?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл price-rules-engine запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic