price-rules-engine

Apply stackable pricing rules to shopping carts with priority-ordered evaluation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Complex promotional catalogs produce unpredictable discounts when multiple promotions, coupons, and loyalty rewards overlap, causing margin mistakes, customer support disputes, and loss of trust. This Skill defines a deterministic rule-evaluation approach so teams can control priority ordering, stacking behavior, exclusions, and customer-segment targeting while preserving an audit trail of applied promotions.

Core Features & Use Cases

  • Priority-ordered evaluation: Rules are evaluated in a defined priority order so higher-priority promotions run first.
  • Stacking control: Distinguish stackable vs non-stackable rules and ensure non-stackable rules prevent conflicting applications.
  • Scope and exclusions: Support product/category inclusion and explicit exclusion lists where exclusions always win.
  • Customer-segment gating & coupon codes: Gate rules to specific customer segments or require coupon codes for application.
  • Monetary safety & auditing: Use cents-based integer math, cap discounts at cart subtotal, persist rule applications for order-level audit, and support dry-run previews.
  • Platform mapping: Guidance and integration patterns for Shopify, WooCommerce, BigCommerce, and custom/headless platforms.

Quick Start

Evaluate the active pricing rules for a cart and return the applied rule IDs with discount amounts and an explanation for each application.

Frequently Asked Questions about price-rules-engine

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

FAQPage Schema
How do I apply stackable promotions to a shopping cart without unpredictable discount overlaps?

Priority-ordered evaluation resolves overlapping discounts by running higher-priority promotions first, while non-stackable exclusion flags and coupon gating prevent conflicting applications and margin mistakes.

Does this price rules engine work with Shopify, WooCommerce, and BigCommerce?

Yes, this price rules engine provides platform mapping guidance for Shopify, WooCommerce, BigCommerce, and headless stores to resolve concurrent promotions, customer-segment gating, and coupon logic.

How do I prevent conflicting discounts when multiple coupons and loyalty rewards overlap?

You prevent conflicting discounts by configuring non-stackable exclusion flags and explicit exclusion lists within the rule engine, ensuring exclusions always win over concurrent promotions and loyalty rewards.

Can I preview discount outcomes for a cart before finalizing the order?

Yes, you can preview discount outcomes using the dry-run evaluation feature, which computes deterministic discount amounts for a cart without persisting the rule applications to the order audit trail.

How does the rule engine handle monetary calculations to avoid floating point errors?

The rule engine handles monetary calculations safely using cents-based integer arithmetic, capping discounts at the cart subtotal to prevent floating point errors and ensure accurate e-commerce pricing.

How do I audit which promotions were applied to a completed e-commerce order?

You audit applied promotions using the persistent rule-application auditing feature, which records the applied rule IDs, discount amounts, and explanations for each application during cart evaluation.