For the complete documentation index, see llms.txt. This page is also available as Markdown.

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)

Send a message to the customer in the Zendesk conversation.

sendComment(sessionId: string, comment: string)

Add an internal comment to the ticket (not visible to customer).

sendPublicComment(sessionId: string, comment: string)

Add a public comment to the ticket (visible to customer).

Conversation Management

getConversation(sessionId: string)

Retrieve the complete conversation context.

getConversationMessages(sessionId: string)

Get all messages in the conversation.

Ticket Operations

getTicket(sessionId: string)

Retrieve ticket information and metadata.

createTicket(params)

Create a new ticket with specified parameters.

markTicketAsSolved(sessionId: string)

Mark a ticket as solved.

markTicketAsOpen(sessionId: string)

Reopen a closed ticket.

Tag and Field Management

addTag(sessionId: string, tag: string)

Add a tag to the ticket.

setCustomFields(sessionId: string, fields: any[])

Set custom field values on the ticket.

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

agentMemorySchema.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:

  1. Trigger Events - Zendesk sends events to your agent

  2. Agent Processing - Your agent processes the event and determines response

  3. Zendesk API Calls - Agent makes calls back to Zendesk via the interface

  4. 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

  1. Connection Issues: Ensure your Zendesk credentials are properly configured

  2. Permission Errors: Verify your Zendesk API permissions include required scopes

  3. Rate Limiting: Implement proper rate limiting and retry logic

  4. 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