What you're asking for wouldn't necessarily need user intervention.
While creating such coupon, you can set it to auto apply, so they won't have to type such coupon code in, the coupon would apply automatically if specification are met.
I wouldn't think you would need to custom mod for what you're looking for
