The application relates to a compound of Formula (I): or a pharmaceutically acceptable salt thereof, tautomer, prodrug, solvate, metabolite, polymorph, analog or derivative thereof, which modulates the activity of BTK, a pharmaceutical composition comprising the compound of Formula (I), and a method of treating or preventing a disease in which BTK plays a role.