How to Do Customer Complaint Classification with AI

Good customer service is a cornerstone of any well-run business because, of course, without customers what have you got? Undoubtedly the most important part of providing good customer service is properly managing consumer complaints.

Customer feedback can come from anywhere, not just through emails, phone calls, and chatbots. Customers leave unsolicited feedback about your products and services on social media, online forums, pretty much all over the internet. And spontaneous feedback, more often than not, is negative because that’s when customers feel most compelled to voice their opinions – when they’re unhappy.

These online complaints are only growing by the day, and they can be difficult to get a handle on. Furthermore, surveys show that 18% of customers who comment or complain on social media expect a response immediately, while a full 83% expect it to come the same day. And nearly 50% of customers reported that they’d stopped doing business with a company due to poor customer service.

But how can you respond quickly and effectively to all these customers, coming from all corners of the internet (as well as through regular customer support channels)?

Customer complaint classification with machine learning is the answer. AI-powered text analysis tools can monitor customer comments – wherever they may appear – find out which are complaints, automatically route them to the right team, and analyze them for immediately actionable insights.

How to Detect Customer Complaints

The first step to performing customer complaint classification is properly detecting which customer service tickets or online customer comments are complaints. This process can be exceedingly easy when you put AI-powered tools to work for you.

Text analysis applications can monitor social media, online forums, survey responses, emails, and more, for mentions of your brand, then perform sentiment analysis to automatically find out which comments are positive and negative.

Sentiment analysis is a text analysis technique that uses natural language processing (NLP) to read and break down text much as a human would. It reads for polarity of opinion (positive, negative, neutral) and can analyse text for the thoughts and opinions of the writer – right down to context and sarcasm.

Take a look at this example from a pre-trained sentiment analyzer or try MonkeyLearn API to connect directly to your data source.

Test with your own text

Results

TagConfidence
Positive99.1%

The above statement is easily tagged as Negative – a customer complaint.

Sentiment analysis can be easy to implement and easy to use with SaaS tools, like MonkeyLearn. You can use demo models, like the above (try it out now). Or you can custom-train your own sentiment analyzer to the specific needs and criteria of your business (no coding needed).

Sentiment analysis allows you to locate complaints online or from customer service tickets and automatically route them to the proper department or employee.

Detecting urgency is another text analysis technique used to prioritize customer feedback and make sure the most urgent issues, like complaints, are tended to right away.

Test with your own text

Results

TagConfidence
Urgent79.0%

MonkeyLearn offers a suite of text analysis tools that can be used individually or in concert to help you get a handle on consumer complaints. Read on to find out how to put them to use in just a few steps.

Tutorial: How to Automatically Categorize Customer Complaints

There are two options when it comes to customer complaint classification: you can build a model from scratch or use a SaaS tool.

Building a model from scratch can produce accurate results and perform at extremely high levels, but it can take months and far exceed 100k to build. It’s generally not recommended unless you have years of data science and coding experience, or are prepared to hire whole teams of engineers and data scientists.

SaaS tools, on the other hand, are often ready to put into use right away and much less costly because you only use what you need. Furthermore, they can be trained to perform at just as high of levels, are completely scalable, and can be implemented with little to no code.

MonkeyLearn is a SaaS platform with super easy-to-use text analysis tools to make customer complaint classification a snap in just a few steps:

  1. Organize customer feedback to find complaints
  2. Classify complaints by subject or aspect

1. Organize customer feedback to find complaints

As mentioned above, the first step to identifying customer complaints is performing sentiment analysis on customer comments to find out which are negative. MonkeyLearn offers the option to dive right in with pre-trained sentiment analysis models or train your own in just a few steps. For this step, it’s usually recommended to create a custom model with your own data, criteria, and tags for maximum accuracy (see how to create your own models in step 2).

However, for the sake of brevity, we’ll be using a pre-made model for this first step to analyzea dataset of hotel reviews.

1.1. Choose demo model

MonkeyLearn offers a number of pre-trained demo models. Just register for free, go to the ‘Explore’ tab, click ‘Sentiment,’ then choose the model you’d like to use:

MonkeyLearn dashboard showing sentiment analysis demo models.

The Hotel Sentiment model is pre-trained to read hotel reviews as Good or Bad. You can enter your own text to see how it’s classified:

Test with your own text

Results

TagConfidence
Good95.8%

Here you can see that you also have the option to import data from third-party app integrations, connect via the MonkeyLearn API, or upload an Excel or CSV file.

1.2. Upload your data

We’ll be uploading a CSV file of our hotel reviews. Click ‘Batch’ and upload your file. If there is more than one column, choose the column you want to use.

Showing a choice of which columns to use from a CSV file.

Click ‘Continue’ and the sentiment analyzer will automatically categorize the comments as Good or Bad. Then it will output a new CSV file with your results. Organize these results as Bad only, and you have your customer complaint data.

Screenshot of a CSV output showing statements classified as "Bad."

2. Classify complaints by subject or aspect

Now we’re ready to get even more fine-grained. We’ll classify the complaints by category, so that we can dig more thoroughly into why each category is problematic or route the complaints to the proper department or employee.

As this tutorial is for hotel reviews, we’ll be using the aspects/categories: Staff, Value for Money, Facilities, and Location. However, if you’re classifying customer complaints for a software company, for example, you might use categories, like, Usability, Speed, Pricing, Shipping, etc.

2.1. Choose your model

Go to the Dashboard, click on ‘Create a model,’ and choose ‘Classifier.’

The choice to select model type: "Classifier" or "Extractor."

2.2. Choose ‘Topic Classification’:

The choice to select "Topic Classification," "Sentiment Analysis," or "Intent Classification."

2.3. Import your data

Upload the text data you’ll use to train your topic classifier. You can upload a CSV or an Excel file, or import data from apps like Twitter, Gmail, or Zendesk. We’ll be using the CSV download of Bad hotel reviews.

The choice to upload data from a variety of sources.

If you don’t have a dataset handy, you can download it from the Data Library.

2.4. Define your tags

Again, for this tutorial we’ll be tagging by aspects: Staff, Value for Money, Facilities, and Location.

Entering tags: Facilities, Location, Staff, Value for Money.

2.5. Train your model

Tag each comment according to your criteria.

Manually tagging statements into the correct category.

After you’ve tagged a few, the model will begin predicting for you. Keep training if the tagging isn’t consistently accurate.

2.6. Run your analysis

Once your model is properly trained you can upload an Excel or CSV file to batch process or connect with integrations or the MonkeyLearn API. Click ‘Run,’ then select your choice from the left column.

Uploading a CSV file for batch processing.

In this example we batch-processed a CSV file and immediately received a processed file organized by category:

Screenshot of a CSV file showing complaints organized by category.

When you use MonkeyLearn’s Zendesk integration, you can automatically perform a number of analyses simultaneously within your workflow. Find complaints, organize them by category, and route them directly to the correct employee.

Conclusion

It’s clear that sentiment analysis and topic classification can be extremely helpful to automatically classify customer complaints, so you can respond quickly and efficiently to your customers when they (and your company) need it most. Putting machine learning into practice can help you maintain and monitor your customer base, 24/7, and in real time.

Find customer complaints from all over the web and automatically route them to the proper employee. Constantly analyze customer support tickets to make sure the most urgent requests get handled first.

From here, you can go even deeper into your analysis with MonkeyLearn Studio, an all-in-one text analysis and visualization platform for easy-to-understand insights.

Sign up for a MonkeyLearn demo to learn more about customer complaint classification and even more advanced text analysis techniques.

Inés Roldós

October 1st, 2020