About Discounts

Discounts enable businesses to create promotional strategies through custom discount triggers and configurable discount rules. The discount system allows businesses to define specific conditions under which discounts apply to carts and checkouts, extending beyond standard percentage or fixed-amount discounts with custom trigger logic.

This section covers:

  • Custom Discount Triggers Service Plugin: Create custom triggers that define when discounts can apply based on time periods, product categories, or custom business logic.
  • Discount Rules API: Manage discount rules that combine triggers and scopes to define the complete conditions for discount application.

Discount system architecture

The discount system operates through two complementary components:

  • Discount triggers: Define the conditions that must be met for a discount to become available. Triggers can be based on time windows (like happy hour pricing), customer attributes, purchase history, external data, or custom business logic.

  • Discount rules: Combine triggers with scopes to create complete discount definitions. Rules specify not only when discounts apply (triggers) but also what items they apply to (scopes) and how they should be calculated.

When trigger conditions are met, discounts are automatically applied to qualifying items in carts and checkouts, providing immediate pricing updates to customers during the purchase flow.

Custom discount capabilities

The discount extension system supports sophisticated promotional scenarios:

  • Time-based discounts: Create triggers that activate during specific time periods, such as happy hour discounts that only apply between specific hours on certain days of the week.

  • Product-specific promotions: Implement discounts that apply to specific product categories, such as sales on digital products or particular product types.

  • Custom trigger logic: Define business-specific conditions that determine when discounts become available based on your app's custom logic and requirements.

See also

Did this help?