diff --git a/16/umbraco-commerce/SUMMARY.md b/16/umbraco-commerce/SUMMARY.md index 4dd8a2924c0..524a0d7e1dc 100644 --- a/16/umbraco-commerce/SUMMARY.md +++ b/16/umbraco-commerce/SUMMARY.md @@ -108,7 +108,10 @@ ## Reference * [Stores](reference/stores/README.md) -* [Shipping](reference/shipping/README.md) +* [Discounts](reference/discounts/README.md) + * [Rules](reference/discounts/rules/README.md.md) + * [Rewards](reference/discounts/rewards/README.md) +* [Shipping](reference/discounts/README.md) * [Fixed Rate Shipping](reference/shipping/fixed-rate-shipping.md) * [Dynamic Rate Shipping](reference/shipping/dynamic-rate-shipping.md) * [Realtime Rate Shipping](reference/shipping/realtime-rate-shipping.md) diff --git a/16/umbraco-commerce/media/discounts/country-discount-type-config.png b/16/umbraco-commerce/media/discounts/country-discount-type-config.png new file mode 100644 index 00000000000..e56a57b5510 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/country-discount-type-config.png differ diff --git a/16/umbraco-commerce/media/discounts/discount-editor.png b/16/umbraco-commerce/media/discounts/discount-editor.png new file mode 100644 index 00000000000..97da52c95a8 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/discount-editor.png differ diff --git a/16/umbraco-commerce/media/discounts/discount-rewards-config.png b/16/umbraco-commerce/media/discounts/discount-rewards-config.png new file mode 100644 index 00000000000..9f792222ab3 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/discount-rewards-config.png differ diff --git a/16/umbraco-commerce/media/discounts/discount-rule-blocking-options.png b/16/umbraco-commerce/media/discounts/discount-rule-blocking-options.png new file mode 100644 index 00000000000..35cc39934a2 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/discount-rule-blocking-options.png differ diff --git a/16/umbraco-commerce/media/discounts/discount-rules-config.png b/16/umbraco-commerce/media/discounts/discount-rules-config.png new file mode 100644 index 00000000000..c01f249b403 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/discount-rules-config.png differ diff --git a/16/umbraco-commerce/media/discounts/discounts-create.png b/16/umbraco-commerce/media/discounts/discounts-create.png new file mode 100644 index 00000000000..3444d52641b Binary files /dev/null and b/16/umbraco-commerce/media/discounts/discounts-create.png differ diff --git a/16/umbraco-commerce/media/discounts/discounts-editor.png b/16/umbraco-commerce/media/discounts/discounts-editor.png new file mode 100644 index 00000000000..abc38ac0c68 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/discounts-editor.png differ diff --git a/16/umbraco-commerce/media/discounts/discounts-list.png b/16/umbraco-commerce/media/discounts/discounts-list.png new file mode 100644 index 00000000000..58a9fa09d3c Binary files /dev/null and b/16/umbraco-commerce/media/discounts/discounts-list.png differ diff --git a/16/umbraco-commerce/media/discounts/discounts-sort.png b/16/umbraco-commerce/media/discounts/discounts-sort.png new file mode 100644 index 00000000000..24f439a615c Binary files /dev/null and b/16/umbraco-commerce/media/discounts/discounts-sort.png differ diff --git a/16/umbraco-commerce/media/discounts/group-discount-type-all-config.png b/16/umbraco-commerce/media/discounts/group-discount-type-all-config.png new file mode 100644 index 00000000000..6e1a77bfae9 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/group-discount-type-all-config.png differ diff --git a/16/umbraco-commerce/media/discounts/group-discount-type-any-config.png b/16/umbraco-commerce/media/discounts/group-discount-type-any-config.png new file mode 100644 index 00000000000..3db49e991f6 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/group-discount-type-any-config.png differ diff --git a/16/umbraco-commerce/media/discounts/group-discount-type-funnel-config.png b/16/umbraco-commerce/media/discounts/group-discount-type-funnel-config.png new file mode 100644 index 00000000000..d22b4ad5c46 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/group-discount-type-funnel-config.png differ diff --git a/16/umbraco-commerce/media/discounts/group-discount-type.png b/16/umbraco-commerce/media/discounts/group-discount-type.png new file mode 100644 index 00000000000..3e3b4cd23bd Binary files /dev/null and b/16/umbraco-commerce/media/discounts/group-discount-type.png differ diff --git a/16/umbraco-commerce/media/discounts/member-group-discount-type-config.png b/16/umbraco-commerce/media/discounts/member-group-discount-type-config.png new file mode 100644 index 00000000000..f8bd23c6bc4 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/member-group-discount-type-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-amount-discount-type-config.png b/16/umbraco-commerce/media/discounts/order-amount-discount-type-config.png new file mode 100644 index 00000000000..2c8af8a66d2 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-amount-discount-type-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-amount-reward-config.png b/16/umbraco-commerce/media/discounts/order-amount-reward-config.png new file mode 100644 index 00000000000..176ae3fdf36 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-amount-reward-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-line-amount-discount-type-config.png b/16/umbraco-commerce/media/discounts/order-line-amount-discount-type-config.png new file mode 100644 index 00000000000..1dddec1a683 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-line-amount-discount-type-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-line-amount-reward-config.png b/16/umbraco-commerce/media/discounts/order-line-amount-reward-config.png new file mode 100644 index 00000000000..464bfb55249 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-line-amount-reward-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-line-percentage-reward-config.png b/16/umbraco-commerce/media/discounts/order-line-percentage-reward-config.png new file mode 100644 index 00000000000..7b4034a42d5 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-line-percentage-reward-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-line-product-amount-reward-config.png b/16/umbraco-commerce/media/discounts/order-line-product-amount-reward-config.png new file mode 100644 index 00000000000..d21ab31b7ac Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-line-product-amount-reward-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-line-product-category-discount-type-config.png b/16/umbraco-commerce/media/discounts/order-line-product-category-discount-type-config.png new file mode 100644 index 00000000000..f9df9b72db3 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-line-product-category-discount-type-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-line-product-discount-type-config.png b/16/umbraco-commerce/media/discounts/order-line-product-discount-type-config.png new file mode 100644 index 00000000000..bc1566ff064 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-line-product-discount-type-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-line-product-percentage-reward-config.png b/16/umbraco-commerce/media/discounts/order-line-product-percentage-reward-config.png new file mode 100644 index 00000000000..ed37fd1f0ad Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-line-product-percentage-reward-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-line-product-section-discount-type-config.png b/16/umbraco-commerce/media/discounts/order-line-product-section-discount-type-config.png new file mode 100644 index 00000000000..bc06122fca0 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-line-product-section-discount-type-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-line-quantity-discount-type-config.png b/16/umbraco-commerce/media/discounts/order-line-quantity-discount-type-config.png new file mode 100644 index 00000000000..e2580a372d7 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-line-quantity-discount-type-config.png differ diff --git a/16/umbraco-commerce/media/discounts/order-percentage-reward-config.png b/16/umbraco-commerce/media/discounts/order-percentage-reward-config.png new file mode 100644 index 00000000000..53e59ec4f3f Binary files /dev/null and b/16/umbraco-commerce/media/discounts/order-percentage-reward-config.png differ diff --git a/16/umbraco-commerce/media/discounts/payment-method-discount-type-config.png b/16/umbraco-commerce/media/discounts/payment-method-discount-type-config.png new file mode 100644 index 00000000000..d18711acc85 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/payment-method-discount-type-config.png differ diff --git a/16/umbraco-commerce/media/discounts/property-discount-type-config.png b/16/umbraco-commerce/media/discounts/property-discount-type-config.png new file mode 100644 index 00000000000..88d42680653 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/property-discount-type-config.png differ diff --git a/16/umbraco-commerce/media/discounts/shipping-method-discount-type-config.png b/16/umbraco-commerce/media/discounts/shipping-method-discount-type-config.png new file mode 100644 index 00000000000..b33bc532d00 Binary files /dev/null and b/16/umbraco-commerce/media/discounts/shipping-method-discount-type-config.png differ diff --git a/16/umbraco-commerce/reference/discounts/README.md b/16/umbraco-commerce/reference/discounts/README.md new file mode 100644 index 00000000000..f26e68e0da4 --- /dev/null +++ b/16/umbraco-commerce/reference/discounts/README.md @@ -0,0 +1,99 @@ +--- +description: Discount options in Umbraco Commerce. +--- + +# Discounts + +The discount system is a powerful and flexible way to apply different types of discounts to orders based on a wide range of conditions. Discounts can be configured to apply automatically or via a discount code, and can be targeted to specific products, categories, member groups, and more. + +![Discount Management Interface](../../media/discounts/discount-editor.png) + +## Overview + +Discounts provide a comprehensive solution for promotional pricing strategies. Whether you need percentage-off campaigns or multi-tier discount structures, the system supports both automated discounts that apply based on conditions. Manual discount codes can also be entered by customers during checkout. + +The discount system consists of three main components: +- **Rules** - Define the conditions that must be met for a discount to apply +- **Rewards** - Specify what discount should be given when rules are satisfied +- **Configuration** - Control when, how, and to whom discounts are available + +## Creating a Discount + +To create a new discount, navigate to the Commerce section in the Umbraco backoffice and select **Discounts** from the sidebar. Click the **Create** button to open the discount creation interface. + +![Create Discount Button](../../media/discounts/discounts-create.png) +![New Discount Interface](../../media/discounts/discounts-editor.png) + +## Basic Configuration + +- **Name and Alias** - Every discount requires a unique **Name** for display purposes and an **Alias** for programmatic reference. The name appears in the backoffice and on customer receipts, while the alias is used internally by the system. +- **Type** - Choose between **Automatic** or **Code** discounts. + - When **Code** is selected: + - **Codes** - Enter one or more discount codes that customers can use and set a usage limit or allow unlimited usage. + - **Date Range** - Set the active period for the discount using the **Start Date** and **Expiry Date** date fields. + - **Is Active** - Toggle to enable or disable the discount without deleting it. + +## Rules System + +The rules system determines when a discount should be applied. Rules can be single conditions or complex multi-layered logic structures. + +### Rule Builder Interface +The visual rule builder allows you to construct discount conditions using a drag-and-drop interface. Rules can be combined using logical operators to create sophisticated discount scenarios. + +![Rule Builder Interface](../../media/discounts/discount-rules-config.png) + +### Logical Operators +Rules can be grouped using three types of logic: +- **`ALL`** - Every rule in the group must be satisfied +- **`ANY`** - At least one rule in the group must be satisfied +- **`FUNNEL`** - Rules are applied sequentially, with matching items passed to the next rule + +### Blocking Options +Rules can include blocking conditions to prevent discount stacking: +- **Block Further Discounts** - Prevent other discounts from applying if this one is used +- **Block if Other Discounts Apply** - Don't apply this discount if others are already active + +For detailed information about available rules and their configuration, see the [Rules Reference](rules/). + +## Rewards System + +Rewards define what discount should be applied when rules are satisfied. The system supports different reward types for different discount scenarios. + +![Reward Builder Interface](../../media/discounts/discount-rules-config.png) + +### Reward Types +- **Order Amount Rewards** - Apply discounts to order subtotal, shipping, payment, or total +- **Order Line Rewards** - Apply discounts to specific order lines or products + +### Discount Methods +Most rewards support multiple discount methods: +- **Percentage** - Apply a percentage discount (e.g., 10% off) +- **Fixed Amount** - Apply a fixed monetary discount (e.g., $5 off) + +For detailed information about available rewards and their configuration, see the [Rewards Reference](rewards/). + +## Discount Ordering and Priority + +Discounts are processed in the order they appear in the discount list. This ordering can impact how multiple discounts interact with each other. + +![Discount Order List](../../media/discounts/discounts-list.png) + +### Reordering Discounts +You can change the processing order by: +1. From the sidebar, click the `...` button on the **Discounts** menu item. +2. Select **Sort** menu option. +3. Drag and drop discounts to reorder them. +4. Click the **Sort** button to apply the new order. + +![Discount Sort Modal](../../media/discounts/discounts-sort.png) + +### Best Practices for Ordering +- Place percentage-based discounts before fixed-amount discounts +- Order more restrictive discounts before general ones +- Consider how blocking rules interact with discount order + +## Integration and Extensibility + +The discount system is built with extensibility in mind. Developers can create custom rules and rewards to meet specific business requirements. + +See the [Discount Rules & Rewards Key Concepts](../../key-concepts/discount-rules-and-rewards.md) for guidance on creating custom rules & rewards. diff --git a/16/umbraco-commerce/reference/discounts/rewards/README.md b/16/umbraco-commerce/reference/discounts/rewards/README.md new file mode 100644 index 00000000000..d816ef1a202 --- /dev/null +++ b/16/umbraco-commerce/reference/discounts/rewards/README.md @@ -0,0 +1,114 @@ +--- +description: Discount reward options in Umbraco Commerce. +--- + +# Discount Rewards + +Discount rewards define what discount should be applied when discount rules are satisfied. The reward system supports discounts such as percentage reductions, product-specific offers, and free shipping promotions. + +![Discount Rewards Overview](../../../media/discounts/discount-rewards-config.png) + +## How Rewards Work + +When discount rules are satisfied, the associated rewards are applied to the order. Rewards can target different aspects of an order, including the overall order value, specific order lines, shipping costs, or payment fees. + +The rules system determines when a discount should be applied. Rules can be single conditions or complex multi-layered logic structures. + +### Logical Operators +Rules can be grouped using three types of logic: +- **`ALL`** - Every rule in the group must be satisfied +- **`ANY`** - At least one rule in the group must be satisfied +- **`FUNNEL`** - Rules are applied sequentially, with matching items passed to the next rule + +### Funnel Logic +Funnel logic is particularly powerful for product-specific discounts. Order lines that match the first rule are passed to subsequent rules for additional filtering. This enables scenarios like "Buy 2 shirts and get 20% off pants" where the system first identifies shirt purchases, then applies discounts to pants. + +### Blocking Options +Rules can include blocking conditions to prevent discount stacking: +- **Block Further Discounts** - Prevent other discounts from applying if this one is used +- **Block if Other Discounts Apply** - Don't apply this discount if others are already active + +For detailed information about available rules and their configuration, see the [Rules Reference](../rules/). + +## Reward Types + +### Order Amount Reward +Applies discounts to different aspects of the overall order amount, including subtotal, shipping, payment fees, or the complete order total. + +**Configuration:** +- **Price Type** - Choose what to discount (subtotal, shipping, payment, or total) +- **Adjustment Type** - Amount or percentage + - When **Amount** is selected: + - **Amounts** - Define the discount value for amount based adjustments + - **Amounts Include Tax** - Whether the amounts include tax or not (defaults to the store's tax setting) + - When **Percentage** is selected: + - **Percentage** - Define the discount percentage for percentage based adjustments + +![Order Amount Reward Configuration](../../../media/discounts/order-amount-reward-config.png) +![Order Percentage Reward Configuration](../../../media/discounts/order-percentage-reward-config.png) + +**Price Types:** +- **Subtotal Price** - The total of all order line amounts before shipping and fees +- **Shipment Price** - The shipping cost for the order +- **Payment Price** - Payment processing fees +- **Total Price** - The complete order total including all fees + +**Use Cases:** +- Site-wide sales and promotions +- Free shipping offers +- Payment method incentives +- Volume-based discounts + +### Order Line Amount Reward +Applies discounts to specific order lines based on different criteria such as product categories, sections, or custom properties. + +**Configuration:** +- **Price Type** - Choose what to discount (base price, unit price or total) +- **Adjustment Type** - Amount or percentage + - When **Amount** is selected: + - **Amounts** - Define the discount value for amount based adjustments + - **Amounts Include Tax** - Whether the amounts include tax or not (defaults to the stores tax setting) + - When **Percentage** is selected: + - **Percentage** - Define the discount percentage for percentage based adjustments + +![Order Line Amount Reward Configuration](../../../media/discounts/order-line-amount-reward-config.png) +![Order Line Percentage Reward Configuration](../../../media/discounts/order-line-percentage-reward-config.png) + +**Price Types:** +- **Base Price** - The base price of any bundle order line +- **Unit Price** - The price per individual item +- **Total Price** - The complete order line total including all fees + +**Use Cases:** +- Clearance discounts +- Brand promotions +- Seasonal offers + +### Order Line Product Reward +Applies discounts to specific order lines containing particular products. This reward type provides precise control over which products receive discounts. + +**Configuration:** +- **Product / Category Node** - Select the specific product or category to target +- **Order Line Source** - Choose whether to target products matching rules or the entire order +- **Price Type** - Choose what to discount (base price, unit price or total) +- **Adjustment Type** - Amount or percentage + - When **Amount** is selected: + - **Amounts** - Define the discount value for amount based adjustments + - **Amounts Include Tax** - Whether the amounts include tax or not (defaults to the stores tax setting) + - When **Percentage** is selected: + - **Percentage** - Define the discount percentage for percentage based adjustments + +![Order Line Product Reward Configuration](../../../media/discounts/order-line-product-amount-reward-config.png) +![Order Line Product Percentage Reward Configuration](../../../media/discounts/order-line-product-percentage-reward-config.png) + +**Use Cases:** +- Product-specific promotions +- Inventory clearance +- Cross-selling incentives +- Bundle discounts + +## Custom Reward Provider Development + +The reward system is extensible, allowing developers to create custom rewards for specific business needs. + +See the [Discount Rules & Rewards Key Concepts](../../../key-concepts/discount-rules-and-rewards.md) for guidance on creating custom rules. diff --git a/16/umbraco-commerce/reference/discounts/rules/README.md b/16/umbraco-commerce/reference/discounts/rules/README.md new file mode 100644 index 00000000000..3c038b7292d --- /dev/null +++ b/16/umbraco-commerce/reference/discounts/rules/README.md @@ -0,0 +1,264 @@ +--- +description: Discount rule options in Umbraco Commerce. +--- + +# Discount Rules + +Discount rules define the conditions that must be met for a discount to be applied to an order. The rule system in Umbraco Commerce is highly flexible, allowing you to create single-condition rules or complex multi-layered logic structures. + +![Discount Rules Overview](../../../media/discounts/discount-rules-config.png) + +## How Rules Work + +Rules are evaluated against orders during the checkout process. When all conditions within a rule (or rule group) are satisfied, the associated discount rewards are applied. Rules can be combined using logical operators to create sophisticated discount scenarios. + +## Rule Types + +### Group Rule +The Group rule acts as a container for other rules, allowing you to combine multiple conditions using logical operators. + +**Configuration:** +- **Match Type** - Choose between `ALL`, `ANY`, or `FUNNEL` logic +- **Child Rules** - Add one or more rules to the group + +![Group Rule Configuration](../../../media/discounts/group-discount-type.png) + +**Match Types:** +- **`ALL`** - Every child rule must be satisfied +- **`ANY`** - At least one child rule must be satisfied +- **`FUNNEL`** - Rules are applied sequentially, with matching line items passed to the next rule + +For detailed examples and explanations of how each match type works, see [Rule Logic and Grouping](#rule-logic-and-grouping). + +**Use Cases:** +- Complex multi-condition discounts +- Hierarchical rule structures +- Sequential filtering scenarios + +### Country Rule +Checks if the order's billing or shipping country matches specific countries. + +**Configuration:** +- **Country** - Select a country to match against +- **Country Source** - Choose between billing or shipping address + +![Country Rule Configuration](../../../media/discounts/country-discount-type-config.png) + +**Use Cases:** +- Geographic promotions (e.g., "Free shipping to EU countries") +- Market-specific discounts +- Compliance with regional pricing requirements + +### Member Group Rule +Verifies if the customer belongs to specific member groups in Umbraco. + +**Configuration:** +- **Customer Source** - Choose between the customer on the order or the current logged-in user +- **Member Groups** - Select one or more member groups +- **Match Type** - Customer must be in `ANY` or `ALL` selected groups + +![Member Group Rule Configuration](../../../media/discounts/member-group-discount-type-config.png) + +**Use Cases:** +- VIP customer discounts +- Membership tier benefits +- Employee or partner pricing +- Customer loyalty programs + +### Order Amount Rule +Compares the total order value against specified amounts. + +**Configuration:** +- **Price Type** - Choose from subtotal, total, shipping, or payment fees +- **Comparison Operator** - Greater than, less than, equal to, between, etc +- **Amounts** - The values per currency to compare against +- **Amounts Include Tax** - Whether the above amounts include tax (defaults to the stores tax setting) + +![Order Amount Rule Configuration](../../../media/discounts/order-amount-discount-type-config.png) + +**Use Cases:** +- Minimum purchase requirements +- Free shipping thresholds +- Volume-based discounts +- Order value tiers + +### Order Line Amount Rule +Evaluates the total value of specific order lines that match certain criteria. + +**Configuration:** +- **Price Type** - Choose from base price, unit price, or line total +- **Comparison Operator** - Greater than, less than, equal to, between, etc +- **Amounts** - The values per currency to compare against +- **Amounts Include Tax** - Whether the above amounts include tax (defaults to the stores tax setting) +- **Accumulative** - Whether to sum matching lines or evaluate individually + +![Order Line Amount Rule Configuration](../../../media/discounts/order-line-amount-discount-type-config.png) + +**Use Cases:** +- Product-specific spend thresholds +- High-value item filtering +- Conditional bundling discounts + +### Order Line Product Rule +Checks if specific products are present in the order lines. + +**Configuration:** +- **Product** - The product to match against (search by name or SKU) + +![Order Line Product Rule Configuration](../../../media/discounts/order-line-product-discount-type-config.png) + +**Use Cases:** +- Product-specific promotions +- Cross-selling incentives +- Inventory clearance discounts + +### Order Line Product Category Rule +Evaluates whether products from specific categories are in the order. + +**Configuration:** +- **Category** - The category to match against + +![Order Line Product Category Rule Configuration](../../../media/discounts/order-line-product-category-discount-type-config.png) + +**Use Cases:** +- Category-wide sales +- Seasonal promotions +- Department-specific discounts + +### Order Line Product Section Rule +Checks if products from specific sections of the website are in the order. + +**Configuration:** +- **Section** - The section of the website under which a product must be organized + +![Order Line Product Section Rule Configuration](../../../media/discounts/order-line-product-section-discount-type-config.png) + +**Use Cases:** +- Site section promotions +- Brand-specific discounts +- Departmental sales +- Landing page campaigns + +### Order Line Quantity Rule +Compares the quantity of specific order lines against target values. + +**Configuration:** +- **Comparison Operator** - Greater than, less than, equal to, between, etc +- **Quantity** - The quantity to compare against +- **Accumulative** - Whether to sum matching lines or evaluate individually + +![Order Line Quantity Rule Configuration](../../../media/discounts/order-line-quantity-discount-type-config.png) + +**Use Cases:** +- Bulk purchase discounts +- Buy X get Y promotions +- Minimum quantity requirements +- Inventory movement incentives + +### Payment Method Rule +Verifies if a specific payment method is being used for the order. + +**Configuration:** +- **Payment Method** - Select the payment method to match against + +![Payment Method Rule Configuration](../../../media/discounts/payment-method-discount-type-config.png) + +**Use Cases:** +- Payment method incentives (e.g., "5% off for bank transfers") +- Credit card promotions +- Alternative payment discounts +- Processing fee offsets + +### Shipping Method Rule +Checks if a specific shipping method is selected for the order. + +**Configuration:** +- **Shipping Method** - Select the shipping method to match against + +![Shipping Method Rule Configuration](../../../media/discounts/shipping-method-discount-type-config.png) + +**Use Cases:** +- Shipping method promotions +- Express delivery discounts +- Local pickup incentives +- Carrier-specific offers + +### Property Rule +Evaluates custom properties on orders or order lines against specified values. + +**Configuration:** +- **Property Source** - Order or order line properties +- **Property Alias** - The alias of the property to evaluate +- **Comparison Operator** - Equals, contains, greater than, etc. +- **Property Value** - The value to compare against + +![Property Rule Configuration](../../../media/discounts/property-discount-type-config.png) + +**Use Cases:** +- Custom business logic +- Third-party system integration +- Advanced product attributes +- Custom customer data evaluation + +## Rule Logic and Grouping + +### `ALL` Logic +All child rules within the group must be satisfied for the group to pass. This creates an "`AND`" relationship between rules. + +**Example:** Free shipping for VIP members with orders over $100 +- Rule Group (`ALL` Logic) + - Member Group Rule: "VIP Members" + - Order Amount Rule: Greater than £100 + +![`ALL` Logic Example](../../../media/discounts/group-discount-type-all-config.png) + +### `ANY` Logic +At least one child rule within the group must be satisfied for the group to pass. This creates an "OR" relationship between rules. + +**Example:** Student or senior citizen discount +- Rule Group (`ANY` Logic) + - Member Group Rule: "Students" + - Member Group Rule: "Senior Citizens" + +![`ANY` Logic Example](../../../media/discounts/group-discount-type-any-config.png) + +### `FUNNEL` Logic +Rules are applied sequentially, with order lines that match the first rule being passed to subsequent rules for additional filtering. This is particularly powerful for product-specific discounts. + +**Example:** Buy more than 2 accessories to get a discount +- Rule Group (`FUNNEL` Logic) + - Order Line Product Category Rule: "Accessories" + - Order Line Quantity: Greater than 2 + +The funnel logic first identifies orders with accessories, then checks if the quantity of those accessories exceeds 2 to apply the discount. + +![`FUNNEL` Logic Example](../../../media/discounts/group-discount-type-funnel-config.png) + +## Rule Blocking Options + +Rules can include blocking conditions to prevent discount stacking and ensure certain discounts are prioritized. + +**Options:** +- **Block further discounts from being applied** - Prevent other discounts from applying if this one is used +- **Block discount if discounts already apply** - Don't apply this discount if others are already active + +![Rule Blocking Options](../../../media/discounts/discount-rule-blocking-options.png) + +**Use Cases:** +- Exclusive promotions +- Preventing over-discounting +- Prioritizing high-value discounts + +## Rule Performance Considerations + +### Optimization Tips +- **Order Rules by Complexity** - Place simpler rules first to fail fast +- **Use Specific Product Rules Sparingly** - They can be more resource-intensive +- **Limit Deep Nesting** - Avoid overly complex rule hierarchies +- **Cache Expensive Calculations** - For custom property rules with complex logic + +## Custom Rule Provider Development + +The rule system is extensible, allowing developers to create custom rules for specific business requirements. + +See the [Discount Rules & Rewards Key Concepts](../../../key-concepts/discount-rules-and-rewards.md) for guidance on creating custom rules.