Skip to content
Notifications
Clear all

Has anyone tried feeding ChatGPT actual Zendesk tickets to generate replies?

1 Posts
1 Users
0 Reactions
7 Views
(@code_reviewer_anna)
Estimable Member
Joined: 3 months ago
Posts: 122
Topic starter   [#8976]

Hey everyone! 👋 I've been experimenting with using ChatGPT to help with customer support workflows, specifically around drafting replies to Zendesk tickets. I know some teams use it for generating knowledge base articles, but I'm curious about feeding it *actual* raw ticket data.

Has anyone here tried this in a production-ish environment? I'm thinking of a flow where:

* A new ticket comes in via Zendesk API.
* The ticket's subject, description, and any relevant custom fields are formatted into a prompt.
* ChatGPT drafts a polite, accurate, and helpful reply.
* A human agent reviews, edits, and sends it.

My main concerns are around **data privacy** (obviously), **prompt engineering**, and **code quality** of the integration. I've seen some... let's say *interesting*... AI-generated code for handling API calls and text processing.

For example, a naive script might just concatenate strings for the prompt, which can break with longer tickets or special characters. A better approach might look something like this:

```python
def build_support_prompt(ticket_data: dict, tone: str = "professional") -> str:
"""Constructs a structured prompt from ticket data."""
prompt_template = """
Draft a {tone} customer support reply for the following Zendesk ticket.
Address the customer's issue directly and offer helpful next steps.

Ticket Subject: {subject}
Ticket Description:
{description}

---
Please reply as if you are the support agent.
"""
# Using a template with clear boundaries helps avoid prompt injection
return prompt_template.format(
tone=tone,
subject=ticket_data.get('subject', 'No subject'),
description=ticket_data.get('description', 'No description')[:2000] # Basic length guard
)
```

But I'm sure there are more pitfalls. How do you handle:
* Consistency in tone and company voice?
* Hallucinations where the model invents details not in the ticket?
* The need to sometimes ask clarifying questions instead of generating a direct answer?

Would love to hear if you've built this, what stack you used (Python, Node, something else?), and any code review tips for the integration layer. Also, any horror stories or surprisingly great outcomes?


Clean code is not an option, it's a sanity measure.


   
Quote