PurposeThis paper aims to propose a framework on complaint management system for quality management by applying the text mining method and potential failure identification that can support organization learning (OL). Customer complaints in the form of email text is the input of the framework, while the most frequent complaints are visualized using a Pareto diagram. The company can learn from this Pareto diagram and take action to improve their process.Design/methodology/approachThe first main part of the framework is creating a defect database from potential failure identification, which is the initial part of the failure mode and effect analysis technique. The second main part is the text mining of customer email complaints. The last part of the framework is matching the result of text mining with the defect database and presenting in the form of a Pareto diagram. After the framework is proposed, a case study is conducted to illustrate the applicability of the proposed method.FindingsBy using the defect database, the framework can interpret the customer email complaints into the list of most defect complained by customer using a Pareto diagram. The results of the Pareto diagram, based on the results of text mining of consumer complaints via email, can be used by a company to learn from complaint and to analyze the potential failure mode. This analysis helps company to take anticipatory action for avoiding potential failure mode happening in the future.Originality/valueThe framework on complaint management system for quality management by applying the text mining method and potential failure identification is proposed for the first time in this paper.