In this paper, a framework was developed for the segmentation of the customer base of Norwegian Distribution System Operators (DSO), based on Advanced Metering System (AMS) time series data of the electricity consumption of DSO customers. A computer programme for customer segmentation was synthesised in the programming language Python, using shape-based clustering, and a Cluster Validation Index (CVI) algorithm. Additionally, an option to perform a simple outlier analysis based on user input of the AMS input data was included. The assessment of the developed customer segmentation programme and the underlying methodology was first done through tests on a known data set to verify the results. Following this, an assessment was made on the basis of two actual AMSdata sets provided by the Norwegian DSO Lnett AS. AMSdata was more challenging for the algorithm to cluster than the known data set, possibly because the AMS-data set was more homogeneous with more similarly shaped and less discernible time series groups. Outlier analysis was shown to improve the programme performance by removing irregular (i.e. flat) time series. Based on the second AMS-data set, a comparison with the current standard method of customer segmentation utilised by Norwegian DSOs was performed. The developed customer segmentation method, when measured with a CVI, was shown to produce a better partition compactness and distinctness of the AMS-data set than with the standard DSO method.