> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duckie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Zendesk

> Connect Zendesk to manage support tickets with Duckie

Zendesk is one of Duckie's most popular integrations, enabling AI-powered responses directly in your Zendesk tickets.

## Capabilities

| Capability             | Supported                                 |
| ---------------------- | ----------------------------------------- |
| **Knowledge Source**   | ✓ Sync help center articles               |
| **Deployment Trigger** | ✓ Respond to tickets automatically        |
| **Tool Actions**       | ✓ Update tickets, add tags, change status |

## Setup

### Prerequisites

* Zendesk Admin or Agent account
* API token enabled in your Zendesk instance

### Step 1: Get Your API Token

1. Go to **Zendesk Admin Center**
2. Navigate to **Apps & Integrations → Zendesk API → API Tokens**
3. Click **Add API Token**
4. Give it a name (e.g., "Duckie Integration")
5. Copy the token immediately (you won't see it again)

### Step 2: Connect in Duckie

1. Go to **Settings → Connections** in Duckie
2. Find **Zendesk** and click **Connect**
3. Enter your details:
   * **Subdomain**: Your Zendesk subdomain (e.g., `yourcompany` from `yourcompany.zendesk.com`)
   * **Email**: Your Zendesk admin email
   * **API Token**: The token you created
4. Click **Connect**

## Using as a Knowledge Source

Once connected, you can sync your Zendesk Help Center articles:

1. Go to **Train → Knowledge**
2. Click **Add Source**
3. Select **Zendesk**
4. Choose which help center categories to sync
5. Click **Start Sync**

Articles are automatically re-synced when they change.

## Using as a Deployment Trigger

Deploy an agent to respond to Zendesk tickets:

1. Go to **Deploy**
2. Click **Create Deployment**
3. Select your agent
4. Choose **Zendesk** as the trigger
5. Configure which events trigger the agent:
   * **New ticket** — When a ticket is created
   * **Customer reply** — When the customer responds
   * **Internal note** — When an agent adds a note (for internal assistants)

### Event Filters

Filter which tickets Duckie responds to:

* **Channel**: Only tickets from specific channels (email, chat, etc.)
* **Tags**: Only tickets with specific tags
* **Group**: Only tickets assigned to specific groups

## Available Tools

When Zendesk is connected, your agents can use these tools:

| Tool                        | Description                               |
| --------------------------- | ----------------------------------------- |
| `zendesk_get_ticket`        | Retrieve ticket details                   |
| `zendesk_update_ticket`     | Update ticket status, priority, or fields |
| `zendesk_add_tags`          | Add tags to a ticket                      |
| `zendesk_add_internal_note` | Add a private note                        |
| `zendesk_get_user`          | Get customer information                  |

## Best Practices

### Start with Testing Mode

Deploy in testing mode first to review behavior before switching to live customer responses:

1. Set deployment mode to **Testing**
2. Monitor the **Runs** page to review what Duckie would have sent
3. When confident, switch to **Live** mode

### Use Tags for Routing

Create Zendesk tags to route different ticket types:

* Tag billing tickets → route to billing-trained agent
* Tag technical tickets → route to technical-trained agent

### Leverage Help Center

Ensure your Zendesk Help Center is up-to-date — Duckie will use these articles to answer customer questions accurately.

## Troubleshooting

### "Authentication failed"

* Verify your subdomain is correct (just `company`, not `company.zendesk.com`)
* Ensure the API token is still active
* Check that the email matches an active Zendesk user

### "Webhook not receiving events"

* Verify the webhook is enabled in Zendesk
* Check that your Zendesk plan supports webhooks
* Confirm the target URL is correct in Zendesk settings

### "Missing ticket data"

* Ensure your API token has sufficient permissions
* Check that the ticket exists and hasn't been deleted
