This paper deals with the classification of electricity customers on the basis of their electrical behavior. Starting from an extensive field measurement-based database of customer daily load diagrams, the authors searched for the most appropriate indices or sets of indices to be used for customer classification. They propose two original measures to quantify the degree of adequacy of each index. Using the indices as distinguishing features, they adopt an automatic clustering algorithm to form customer classes. Each customer class is then represented by its load profile. They use the load profiles to study the margins left to a distribution company for fixing dedicated tariffs to each customer class. They take into account new degrees of freedom available in the competitive electricity markets, which increase flexibility in the tariff definition under imposed revenue caps. Results of a case study performed on a set of customers of a large distribution company are presented.