Credit granting businesses face a challenging environment due to the wide variety of customer behaviors. While only some customers use their credit and pay regularly, a larger percentage may hardly use their available credit. As a key risk management issue, small percentages of customers become delinquent in their payments, and others become bankrupt, requiring write-off. As a business decides upon the deal structure (credit line, repayment terms, interest rate, etc.) of a customer, that business needs to optimize the deal structure considering the uncertainty of that customer’s behavior. We have developed a framework for credit customer optimization based on clustering and prediction. First customer clusters are formed by using hierarchical clustering from past credit performance data. Then, external data. as from a credit bureau, is used to predict the probabilities of membership for each performance cluster. The prediction is done using classification and regression trees (CART). We show an example of this framework used for initial credit line optimization.