# Zendesk App

AI-powered suggestions in Zendesk ticket sidebar.

## Overview

**Features**:

* Auto-suggested responses (sidebar appears on ticket open)
* KB article search (within Twig data sources)
* Similar ticket lookup (semantic similarity)
* Draft insertion (click to insert in response field)
* Confidence scoring (0-1, threshold configurable)

**Plan requirement**: Pro or Enterprise\
**Zendesk requirement**: Professional plan or higher (sidebar API access)

## Installation

### From Zendesk Marketplace

1. Zendesk Admin → Apps and integrations → Marketplace
2. Search "Twig AI"
3. Click **Install** button
4. Enter configuration:
   * **Twig API Key**: Get from Settings → API Keys in Twig
   * **Agent ID**: Get from Agents list in Twig
5. Click **Install**

**Expected result**: App appears in ticket sidebar

**Installation time**: \~2 minutes

### Verify Installation

1. Open any ticket in Zendesk
2. Check right sidebar for "Twig AI" section
3. Should show "Ready" status
4. Click **Get Suggestion** to test

## Configuration

### Initial Setup

After installation:

1. **Authentication**
   * Enter your Twig AI API key
   * Available at: Settings → API Keys in Twig AI
2. **Agent Selection**
   * Choose which AI agent to use
   * Recommend: Create dedicated "Zendesk Support" agent
3. **Display Settings**
   * Enable/disable sidebar
   * Configure auto-suggestions
   * Set response confidence threshold

### Settings

```json
{
  "apiKey": "sk_live_...",
  "agentId": "agent-123",
  "features": {
    "aiSuggestions": true,
    "similarTickets": true,
    "knowledgeBase": true,
    "draftResponses": true
  },
  "confidence": {
    "minimumThreshold": 0.75,
    "showLowConfidence": false
  },
  "branding": {
    "showTwigBranding": true,
    "customLabel": "AI Assistant"
  }
}
```

## Features

### AI Suggestions

**Automatic suggestions appear when:**

* New ticket created
* Ticket assigned to agent
* Ticket content updated

**Suggestion shows:**

* Recommended response
* Confidence score
* Source citations
* Similar tickets

### Knowledge Base Search

**Search your knowledge base:**

1. Open ticket
2. Click "Search KB" in sidebar
3. Enter query or use ticket subject
4. View relevant articles
5. Insert into response

### Similar Tickets

**Find related tickets:**

* Automatically suggests similar resolved tickets
* Shows resolution and response time
* Links to full ticket

### Draft Responses

**Generate response drafts:**

1. Open ticket
2. Review AI suggestion
3. Click "Insert into response"
4. Edit and personalize
5. Send to customer

## Using the App

### Ticket Sidebar

**Location:** Right sidebar in ticket view

**Sections:**

```
╔════════════════════╗
║ 🤖 AI Assistant    ║
╠════════════════════╣
║ Suggested Response ║
║ ✓ High confidence  ║
║ 📄 3 sources       ║
║ [Insert]  [Edit]   ║
╠════════════════════╣
║ Knowledge Base     ║
║ • Article 1        ║
║ • Article 2        ║
║ [View All]         ║
╠════════════════════╣
║ Similar Tickets    ║
║ #12345 - Resolved  ║
║ #12298 - Resolved  ║
║ [View More]        ║
╚════════════════════╝
```

### Keyboard Shortcuts

| Shortcut  | Action                |
| --------- | --------------------- |
| `Alt + A` | Open AI suggestions   |
| `Alt + K` | Search knowledge base |
| `Alt + S` | Find similar tickets  |
| `Alt + I` | Insert suggestion     |

### Quick Actions

**From ticket view:**

* **Summarize**: Get ticket summary
* **Translate**: Translate customer message
* **Classify**: Auto-categorize ticket
* **Prioritize**: Suggest priority level

## Workflows

### New Ticket Workflow

```
1. Ticket arrives
     ↓
2. App analyzes content
     ↓
3. Searches knowledge base
     ↓
4. Finds similar tickets
     ↓
5. Generates suggestion
     ↓
6. Agent reviews & sends
```

### Agent Review Process

```
1. Agent opens ticket
2. Reviews AI suggestion (sidebar)
3. Checks confidence score
4. Verifies sources
5. Personalizes response
6. Sends to customer
7. Provides feedback (👍 👎)
```

## Data & Privacy

### What Data is Sent

**To Twig AI:**

* Ticket subject and description
* Customer message content
* Ticket tags and custom fields
* Agent notes (if enabled)

**NOT sent:**

* Customer PII (unless in message)
* Payment information
* Private internal notes
* Attachments (unless enabled)

### Data Retention

* Queries stored for 90 days (default)
* Can be configured in Twig AI settings
* Subject to Zendesk data policy

### Compliance

* GDPR compliant
* SOC 2 certified
* HIPAA available (Enterprise)
* Data processing agreement available

## Analytics

### Performance Metrics

Track in Twig AI Analytics:

```
Zendesk Integration Performance:
├─ Tickets Analyzed: 1,234
├─ Suggestions Used: 892 (72%)
├─ Avg Time Saved: 3.2 minutes/ticket
├─ Customer Satisfaction: 4.6/5
└─ Agent Satisfaction: 4.4/5
```

### ROI Calculation

```
Monthly Tickets: 1,000
Suggestions Used: 750 (75%)
Time Saved per Ticket: 3 minutes

Total Time Saved: 2,250 minutes (37.5 hours)
Cost Savings: 37.5 hours × $25/hour = $937.50

ROI: $937.50 / $99 (Twig cost) = 9.5x
```

## Best Practices

### 1. Train Your Agent

✅ Add Zendesk KB to data sources ✅ Include resolved ticket examples ✅ Use historical ticket data ✅ Keep documentation updated ❌ Don't use generic agent

### 2. Review Before Sending

✅ Always review AI suggestions ✅ Personalize responses ✅ Verify accuracy ✅ Add human touch ❌ Don't send verbatim

### 3. Provide Feedback

✅ Rate suggestions (👍 👎) ✅ Report issues ✅ Share successes ❌ Don't ignore bad suggestions

### 4. Monitor Performance

✅ Track usage metrics ✅ Review accuracy ✅ Measure time saved ✅ Survey agent satisfaction ❌ Don't set and forget

## Troubleshooting

### App Not Loading

**Check:**

1. App installed and enabled
2. API key valid
3. Agent ID correct
4. Zendesk permissions granted

### No Suggestions Appearing

**Check:**

1. Feature enabled in settings
2. Confidence threshold not too high
3. Agent has sufficient training data
4. Ticket content has enough context

### Suggestions Are Inaccurate

**Solutions:**

1. Lower confidence threshold
2. Improve agent training data
3. Add more KB articles
4. Review agent instructions
5. Provide feedback on suggestions

### API Errors

**Check:**

1. API key not expired
2. Rate limits not exceeded
3. Network connectivity
4. Twig AI service status

## Support

### Getting Help

* **Documentation**: [help.twig.so/zendesk](https://help.twig.so/zendesk)
* **Email Support**: <support@twig.so>
* **Live Chat**: Available in Twig AI app
* **Zendesk Forum**: Community support

### Reporting Issues

Include:

* Twig AI organization ID
* Zendesk subdomain
* Error messages
* Screenshots
* Steps to reproduce

## Updating

### Automatic Updates

* App updates automatically
* Notified of major changes
* No downtime during updates

### Manual Updates

If auto-update disabled:

1. Zendesk Admin → Apps
2. Find Twig AI app
3. Click **Update Available**
4. Review changelog
5. Click **Update**

## Uninstalling

To remove the app:

1. Zendesk Admin → Apps and integrations
2. Find Twig AI
3. Click gear icon → **Uninstall**
4. Confirm removal
5. Data remains in Twig AI (optionally delete)

## Alternatives

If Zendesk app doesn't meet your needs:

* **Browser Extension**: Use Twig AI browser extension in Zendesk
* **API Integration**: Build custom integration
* **Embeddable Widget**: Add widget to Help Center

## Next Steps

* [HelpScout App](https://github.com/thrivapp/twig-help-docs/blob/staging/twig-helpscout-app/README.md) - HelpScout integration
* [Browser Extension](/product/plugins/setup-browser-extension.md) - Desktop assistant
* [Embeddable Widget](/product/plugins/embeddable-widget.md) - Website integration
* [REST API](/product/developer-api/overview.md) - Custom integrations


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.twig.so/product/plugins/zendesk-app.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
