Automatic Ticket Categorisation and Sentiment Analysis via ChatGPT

This article will show you how to automatically categorise any incoming ticket and assign a customer sentiment by using ChatGPT, Cloudflare Workers and Zendesk APIs.

Automatic Ticket Categorisation and Sentiment Analysis via ChatGPT

These last few months ChatGPT and Generative AI have been all the hype and new use cases for this fun API have been popping up left and right.

Zendesk itself has also picked up these new capabilities and has been actively blogging about its possibilities here and here.
And last week they also promised some major announcements in this space on their Relate Event in May.

Even though there is a lot of noise and hype around this tool, in the end it is an API, and like any technology, it's more important thinking about how it can fit in your processes and improve them than to think about the technology itself.

“The question you have to ask yourself is, what is your application designed to do? What problem are you looking for the LLM to solve? Different applications have different requirements and different risks."
Jaakko Pasanen, Chief Science Officer, Ultimate

According to Ultimate, a leading ChatBot and Automation provider, there's four ways Generative AI like ChatGPT can assist in Customer Care, as highlighted in a recent article they posted on their website.

How to Use ChatGPT for Your Customer Support: Challenges to Overcome
The challenges and opportunities of LLMs and generative AI in customer service, based on real examples.

The four main impact points

  1. 📝 Summarise support tickets
  2. 🔀 Sort and categorise customer data into intents
  3. 💬 Craft example replies for conversation designers to use as is or as inspiration to brainstorm dialogue
  4. 🧙‍♀️ Transform factual replies to customer requests into a specific tone of voice

In this article we'll do a deep-dive into two flows that build on top of the Summarise and Sorting powers of ChatGPT and Zendesk.

📝 Summarise

The first impact point has been nicely explained by Zendesk itself in a tutorial on the Zendesk Developer website. They published a full how-to on how to create a sidebar app that summarises a conversation each time a ticket is updated.

This makes it easy for anyone looking at a ticket to get the conversation at a glance.

🔀 Set Ticket Category and Sentiment

The focus of this article lies on the second impact point: Sorting tickets.

The tutorial below will show you how to build a flow that takes any incoming ticket and assigns a category and sentiment to the ticket, which can then be used to set SLA, priority e.a. in your environment.

Concept

This flow uses a Cloudflare Worker to set the sentiment and category of any created ticket upon ticket creation.

It runs as follows:

  1. We have a trigger that notifies a webhook whenever a ticket is created
  2. The webhook submits the ID of the created ticket to a Cloudflare Worker
  3. The worker uses OpenAI to define a category and sentiment for the ticket and maps it to existing custom field values in your instance.
  4. We update the ticket with the sentiment and category value.

Read on for the full tutorial.