Skip to content

How to use customer complaints to improve retention and engagement rates

  • by

In a world of big data, it is easy to get lost with the variety of available information that you can use to improve business. Dealing with data growth is a positive thing but how to use it effectively is another discussion.

One of the most common challenges of working with big data is finding the right signals or the right indicators.  But what happens when you finally find the right data to explore?

How do you monetize it? How do you leverage the use of that data to keep existing customers, generate new leads or improve a company’s economic growth?

This article will show one of the most obvious but easy to ignore data that can be used to improve customer retention. This is the Customer Inquiries and Complaints database. Why use this? Simply because it has the true indicator of customer true needs and pain points.

Similar to Text mining, we will use customer suggestions and feedback to identify customer sentiments. This method will allow us to be more aware on customer complaints real time, plus this helps us generate topics for marketing materials such as blog or brochure content to engage customers and make them feel that we are receptive of their needs.

I will use Python Notebook to extract and transform data while to enhance  visualization, I will use Tableau. The data set used is a US consumer complaints database of a financial institution available for download at

Our expected output is a world cloud visualization of the most common customer complaints in the database. This is going to be a dashboard of customer complaints with filter functionalities to narrow down complaints based on referring channel. Let’s get started.

Sample Output


Extract data set using your python notebook. Use both Pandas and Numpy as your python libraries.

I’m not going to use all columns in the table so as you can see below I have only selected those that I feel important for data exploration.

load customer data

Duplicate the Issue column, we will use the duplicated Issue column to explode customer statements into individual words for our word cloud visualization.


I have also rename the columns so I can easily identify and call them in the future.

I will be using a Explode function to split the words in the duplicated Issue columns,  I found this at stackoverflow discussions. You can find the conversation thread here:

explode function

After assigning the Explode function, I then applied it on duplicated column named issue_kw column. As you can see below, the statement in issue column is now split by individual words on issue_kw column. We will use it to identify the most common and frequent complaints.

explode KW


Using simple loop and if statement in Python, I have also categorize each words based on genuine or valid complaints and words that does not give context such as PII, conjunction, preposition and special characters.

Finally, after identifying words that are valid complaints, I exported the output to CSV. I will use Tableau to visualize this information.


Uploading the dataset in Tableau. Follow the instruction below to achieve the same word cloud visualization.

  1. Upload the CSV file.
  2. Open a new sheet and name it Complaints.
  3. Put the issue_kw column on the MarksText.
  4. Subsequently put it on MarksSize, right click and “count” as measure.
  5. Move another issue_kw column to MarksColor to assign color variation for each words.

customer complaints word cloud

Open another sheet and use pie chart to visualize each referring channels.


Lastly, open another sheet for the Complaint Narrative columns.


Put all sheets together into one dashboard.  In this example, I use the referring channel chart as filter. To do this, click on the chart, click the arrow down icon and chose “Use as Filter”.


Expected output should look like the screenshot below. The final output should serve as your real time monitoring system to find out the latest customer complaints, feedback, expectations, likes and dislikes.

Automating this dashboard in real time basis allow us to see customers sentiments faster and gives direction on where to begin improving customer experience. Responding to it quickly (via social media, blog post, brochures or emails) is an indicator that we truly value the Voice of Customer.