To only send a trigger if the customer has carted or browsed a β based on the trigger you add it to β a given number of products, use the following code:
result.proceed = true;
if ( helpers.getProducts().length < 2 ) {
result.proceed = false;
}
Change 2
in the example above to alter the number of products before it triggers. In this example case, two or more products would mean the email is sent.
Learn more in Control Triggers using script.