I want my users to use coupon as a way to upgrade his/her account type (role).

I've added a text field in the profile page whereby user will update their profile with a coupon code. If the coupon code valid, the system will upgrade his/her role.

How do I set this in Rules? I can find "Redeem a coupon" event but not sure how to use it?

How do I write a rule to compare against the coupon codes?

Please give a direction to work on.