Zendesk
The Zendesk integration enables your Minded agents to seamlessly interact with Zendesk tickets, conversations, and customer data. This integration provides a complete interface for building intelligent customer support agents that can handle ticket management, customer communication, and workflow automation.
Overview
The Zendesk integration provides:
Ticket Management - Create, update, and manage ticket status
Customer Communication - Send messages and comments
Conversation Handling - Access conversation history and context
Tag Management - Add and manage ticket tags
Custom Fields - Set and update custom field values
Search Capabilities - Search tickets and conversations
Real-time Updates - Receive and respond to Zendesk events
Quick Start
1. Basic Setup
import { Agent } from '@minded/sdk';
import { zendesk } from '@minded/sdk/interfaces/zendesk';
import { events } from '@minded/sdk';
const agent = new Agent({
memorySchema: yourMemorySchema,
config: mindedConfig,
tools: yourTools,
});
// Initialize Zendesk interface
zendesk.init(agent);
// Handle AI messages - send them to Zendesk
agent.on(events.AI_MESSAGE, async ({ message, state }) => {
await zendesk.sendMessage(state.sessionId!, message);
});2. Trigger Configuration
Configure your flow with a Zendesk trigger:
Available Methods
Core Communication
sendMessage(sessionId: string, message: string)
sendMessage(sessionId: string, message: string)Send a message to the customer in the Zendesk conversation.
sendComment(sessionId: string, comment: string)
sendComment(sessionId: string, comment: string)Add an internal comment to the ticket (not visible to customer).
sendPublicComment(sessionId: string, comment: string)
sendPublicComment(sessionId: string, comment: string)Add a public comment to the ticket (visible to customer).
Conversation Management
getConversation(sessionId: string)
getConversation(sessionId: string)Retrieve the complete conversation context.
getConversationMessages(sessionId: string)
getConversationMessages(sessionId: string)Get all messages in the conversation.
Ticket Operations
getTicket(sessionId: string)
getTicket(sessionId: string)Retrieve ticket information and metadata.
createTicket(params)
createTicket(params)Create a new ticket with specified parameters.
markTicketAsSolved(sessionId: string)
markTicketAsSolved(sessionId: string)Mark a ticket as solved.
markTicketAsOpen(sessionId: string)
markTicketAsOpen(sessionId: string)Reopen a closed ticket.
Tag and Field Management
addTag(sessionId: string, tag: string)
addTag(sessionId: string, tag: string)Add a tag to the ticket.
setCustomFields(sessionId: string, fields: any[])
setCustomFields(sessionId: string, fields: any[])Set custom field values on the ticket.
search(sessionId: string, query: string)
search(sessionId: string, query: string)Search tickets and conversations.
Complete Example
Here's a comprehensive example of a Zendesk customer support agent:
Project Structure
Configuration
minded.json:
Memory Schema
schema.ts:
Agent Implementation
zendeskAgent.ts:
Flow Definition
flows/supportFlow.yaml:
Tools Implementation
tools/escalateIssue.ts:
Best Practices
1. Error Handling
Always implement proper error handling for Zendesk operations:
2. Memory Management
Use memory to maintain context across the conversation:
3. Trigger Qualification
Implement proper trigger qualification to handle only relevant events:
4. Tag Management
Use tags consistently for tracking and automation:
5. Custom Fields
Leverage custom fields for enhanced workflow automation:
Integration Architecture
The Zendesk integration follows this architecture:
Trigger Events - Zendesk sends events to your agent
Agent Processing - Your agent processes the event and determines response
Zendesk API Calls - Agent makes calls back to Zendesk via the interface
Real-time Updates - Changes are reflected in Zendesk immediately
This architecture ensures seamless bi-directional communication between your Minded agent and Zendesk, enabling sophisticated customer support automation while maintaining full control over the conversation flow.
Troubleshooting
Common Issues
Connection Issues: Ensure your Zendesk credentials are properly configured
Permission Errors: Verify your Zendesk API permissions include required scopes
Rate Limiting: Implement proper rate limiting and retry logic
Session Management: Ensure sessionId is properly maintained across requests
Debug Mode
Enable debug logging to troubleshoot issues:
For additional support, consult the Minded platform documentation or contact support.
Last updated