Send emails based on product count
To send a trigger email only if the customer has carted or browsed a given number of products, use the following code in the Advanced box on the Triggers page:
result.proceed = true;
if ( helpers.getProducts().length < 2 ) {
result.proceed = false;
}
Change 2
in the example above to the number of products required before the trigger is sent. In this example, if the customer has carted or browsed two or more products, the email will be sent.
Learn more in Control Triggers using script.
Change the product count
Adjust the number 2 to fit your specific needs. For instance, if you want the email to be sent only when the customer has carted or browsed five or more products, change the code to:
result.proceed = true;
if ( helpers.getProducts().length < 5 ) {
result.proceed = false;
}