Ben's Bites
← Back
.md

Prioritize customer support tickets

Build a workflow that automatically prioritizes support tickets based on keywords and customer tiers.

intermediate pro
Tool: ZapierTool: ClaudeTool: SlackTool: Zendesk Topic: Customer SupportTopic: Automation

2024-11-13

Support teams often struggle with the challenge of quickly identifying and addressing high-priority tickets amidst a constant influx of new issues. The ability to rapidly triage and escalate urgent matters can mean the difference between a satisfied customer and a potential churn risk. This is where AI-powered ticket prioritization becomes a game-changer for support operations.

In this tutorial, we'll use Zendesk as our ticketing system to demonstrate the process. However, the principles and techniques we'll cover can be easily adapted to other popular ticketing systems or even custom solutions like tickets generated from Google Forms. The key is to have a system that can trigger an action when a new ticket is created and allows you to update the ticket's priority afterwards.

In this tutorial, you will learn how to:

  • Set up a Zap to trigger when new tickets are created in Zendesk
  • Use Anthropic's Claude AI to analyze and categorize ticket priority
  • Automatically update ticket priority in Zendesk based on AI analysis
  • Send Slack notifications for urgent tickets

You'll need:

  • A Zapier account (paid plan)
  • An Anthropic account with API access
  • A Slack workspace

Let's dive in.

First, we need to create a Zap that triggers when a new ticket is created in Zendesk.

Log into your Zapier account and click "Create Zap" in the top left corner of the dashboard.

__wf_reserved_inherit

In the Trigger step, search for "Zendesk" in the app selection field and click on it when it appears.

From the list of trigger events, select "New Ticket" and click "Continue".

__wf_reserved_inherit

You'll be prompted to connect your Zendesk account if you haven't already. Click "Sign in to Zendesk" and follow the authentication process.

Once connected, you'll need to select the Zendesk organization you want to use for this Zap. Choose the appropriate organization from the dropdown menu.

To ensure everything is set up correctly, click the "Test trigger" button. Zapier will fetch a recent ticket from your Zendesk account. If successful, you'll see the ticket details displayed. Click "Continue" to move to the next step.

Step 2: Set up the Anthropic API integration

Now, let's set up the integration with Anthropic's API to generate our FAQ content.

First, you'll need to get your API key from Anthropic. Go to console.anthropic.com and sign up for an account if you don't have one.

__wf_reserved_inherit

Once logged in, navigate to the "API Keys" section in your account settings. Click "Create Key", give it a name like "Zapier ticker prioritization", and copy the generated key. Keep this key secure and don't share it publicly.

__wf_reserved_inherit

Back in Zapier, in the second step, choose "Send message" as the event. You'll be prompted to connect your Anthropic account - click "Sign in" and paste your API key when asked.

In the "User message" field in the next step, we'll craft our prompt to Claude. Here's a template you can use:

Analyze this support ticket and determine its priority. Only respond with one of these priority levels: urgent, high, normal, or low. Do not include any other text in your response.

Ticket Subject: {{Subject}}
Ticket Description: {{Description}}
Customer Tier: {{Customer_Tier}}
Customer Name: {{Requester Name}}
Organization: {{Organization Name}}

Consider the following factors when determining priority:

1. Severity of the issue (e.g., system down vs. minor inconvenience)
2. Impact on customer's business operations
3. Customer tier (e.g., enterprise customers may get higher priority)
4. Time sensitivity of the issue
5. Potential for the issue to escalate if not addressed quickly
6. Legal or compliance implications
7. Number of users affected
8. Contractual SLAs (if applicable)

[Include any additional factors specific to your business that you want the Anthropic API to consider when determining the priority level.]

Based on these factors, what is the priority level?
__wf_reserved_inherit

Replace the placeholders (e.g., {{Subject}}, {{Description}}) with the corresponding fields from the Zendesk trigger step. You can find these by clicking on the field and selecting the appropriate option from the dropdown menu.

💡 Tip: Consider adding specific examples of what constitutes each priority level in your organization. Regularly review and refine your prompt to Claude, analyzing the results over time and adjusting the factors or wording to improve accuracy.

In the "Advanced" section, set "Max tokens" to 10 and "Temperature" to 0.5. This ensures a concise and consistent response. Then, set "Top P" to 0.3 to further increase response consistency.

__wf_reserved_inherit

Click "Continue" and then "Test action". You should receive a single-word response (URGENT, HIGH, NORMAL, or LOW) from Claude.

__wf_reserved_inherit

Step 3: Update the ticket priority in Zendesk

Now we'll update the ticket in Zendesk with the priority determined by Claude.

Add another step to your Zap by clicking the plus icon. Search for and select "Zendesk" as the app again. Choose "Update Ticket" as the action event and click "Continue".

__wf_reserved_inherit

In the action setup, you'll see several fields. In the "Ticket" field, select the Ticket ID from the initial Zendesk trigger step. Leave all other fields blank except for "Priority".

__wf_reserved_inherit

In the "Priority" field, click on the "Custom" option in the dropdown menu. In the custom value field that appears, click on it and select the "Response content text" output from the Anthropic step. This will be the priority level determined by Claude.

__wf_reserved_inherit

Click "Continue" and then "Test action". This will attempt to update a ticket in your Zendesk account. If successful, you'll see the confirmation message. Click "Continue" to move to the final step.

Step 4: Add a filter for urgent tickets

Before setting up the Slack notification, we need to add a filter to ensure only urgent tickets trigger the notification.

Click the plus icon to add a new step, then search for and select "Filter by Zapier".

In the "Set up action" section, you'll need to define your filter condition:

  1. In the first dropdown, select the "Response content text" field from the Anthropic step.
  2. In the condition dropdown, choose "Exactly matches".
  3. In the text field, type "urgent" (without quotes).
__wf_reserved_inherit

This filter ensures that only tickets classified as urgent by Claude will proceed to the next step.

💡 Tip: You can consider expanding the filter to include both "urgent" and "high" priority tickets. This ensures that important issues are still flagged, even if they don't meet the threshold for "urgent".

Step 5: Send Slack notifications for urgent tickets

Lastly, we'll set up a Slack notification for tickets that Claude has classified as urgent.

Add another step to your Zap. Search for and select "Slack" as the app. Choose "Send Channel Message" as the action event and click "Continue".

__wf_reserved_inherit

If you haven't connected your Slack account yet, click "Sign in to Slack" and follow the authentication process.

In the action setup, select the Slack channel where you want to send notifications. In the "Message Text" field, use the following template:

URGENT TICKET ALERT

Subject: {{Subject}}
Description: {{Description}}
Customer: {{Requester Name}}
Ticket URL: {{Public URL}}

Replace the placeholders with the corresponding fields from the Zendesk trigger step.

__wf_reserved_inherit

Click "Continue" and then "Test action". If everything is set up correctly, you should see a message in your chosen Slack channel.

__wf_reserved_inherit

To test the entire workflow, create a test ticket in Zendesk with varying levels of urgency. You should see the ticket priority updated in Zendesk, and for urgent tickets, you'll receive a notification in your Slack channel.

Review all steps of your Zap to ensure everything is set up correctly. If all looks good, publish your Zap using the Publish button at the top right of the editor.

Congratulations! You've now set up an automated system to prioritize your customer support tickets using AI and notify your team of urgent issues. This will help your support team focus on the most critical issues first, improving response times and customer satisfaction.

This tutorial was created by Tanmay.

Upgrade to Pro

This tutorial contains Pro content. Upgrade to access the full tutorial and all Pro features.

Get Pro Access