In the modern business world, organisations are increasingly focused on their customers. This paper describes the role of data mining in customer relationship management. Data mining is the "heart" of CRM, because it provides us with the insight and predictive power to relate correctly to our customers. The paper outlines how data mining works in the CRM context, and the CRISP-DM process model within which it is applied, and includes a case study of CRM using data mining - the Loyalty Based Management programme of Credit Suisse. Also outlined is the use of data mining in the context of eCommerce: this 'web-mining' offers unique new opportunities and requires new data mining techniques. Finally, the authors describe 'Comprehensive Application Templates' (CATs), which provide a method of packaging a data mining application, such as analytical CRM, so that it can be used for knowledge transfer and for completely flexible reuse.