How to Add a "Number of Orders" Condition to a Discount Rule

Dynamic Pricing and Discount Rules let you target discounts based on a customer's order history, not just what's in their cart. The Number of orders made with the following products condition checks how many times a logged-in customer has ordered a specific product, then applies your discount if they match.

For example, if you select the belt product, set the time period to "All time," and set the number of orders to 2 with a "greater than" comparison, any logged-in customer who's ordered the belt more than twice becomes eligible for the discount.

Benefits

Adding this condition can help:

  • Reward repeat customers automatically, without manually tracking who's ordered before
  • Target discounts to shoppers who've bought a specific product a set number of times
  • Build win-back offers for customers who haven't reordered recently

How to Add the Number of Orders Condition

Step 1: Add the condition to a rule

On the Discount Rules for checkout screen, click + Add Rule, then choose Number of orders made with following products from the condition dropdown.

Step 2: Choose the comparison

Pick how the customer's order count should compare to the number you set: Equal to (=), less than (<), greater than (>), less than or equal to (<=), or not equal to (!=).

Step 3: Select the product

Use Select a Product to choose which product's order history counts toward the condition.

Step 4: Set the time period

Choose how far back to look for orders:

Option What it does
All time Counts orders placed at any point in the customer's history
Last 7 days Counts orders placed in the past 7 days
Last 30 days Counts orders placed in the previous calendar month
Last 90 days Counts orders placed in the previous calendar 90 days
Custom Date Counts orders placed between a From date and To date you set

Selecting Custom Date enables the From date and To date fields.

Step 5: Set the number of orders

Enter the order count to compare against. This works together with the comparison you picked in Step 2 — for example, "greater than" with "2" matches customers with more than 2 qualifying orders.

Example Use Cases

Rewarding loyal customers: Set the comparison to "greater than," pick a product, and set the number of orders to 2, so anyone who's reordered it qualifies for a discount.

Running a past-campaign check: Use Custom Date to count orders placed only during a specific promotion window, rather than a customer's full order history.

Conclusion

The Number of orders made with following products condition lets you build discounts around what a logged-in customer has already bought, not just what's in their cart. Set the comparison, product, time period, and order count, and the rule takes care of matching eligible customers.

FAQs

1. Where do I find this condition?

It's in the condition dropdown when you add or edit a rule on the Discount Rules for checkout screen.

2. Does this condition count orders from guest checkouts?

The condition is based on a customer's order history, so it applies to logged-in customers.

3. What comparison options are available?

Equal to (=), less than (<), greater than (>), less than or equal to (<=), and not equal to (!=).

4. Can I select more than one product in this condition?

Yes

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.