Customer segmentation: Measuring customer profitability

Customer segmentation is crucial to effectively satisfy the needs of the different segments. But how do you segment customers and measure customer profitability?