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

# Setup

# Connecting Zendesk to ChatCrafterAI

Follow these steps to connect your Zendesk account to ChatCrafterAI.

## Prerequisites

Before starting, ensure you have:

* A Zendesk account (any plan)
* Zendesk admin access
* API credentials ready

## Step-by-Step Setup in ChatCrafterAI

1. Navigate to **Agent Settings** → **Integrations**
2. Click **Add Integration** → Select **Zendesk**
3. Enter your **Zendesk subdomain** (e.g., mycompany.zendesk.com)
4. Enter your **API Email** (your Zendesk admin email)
5. Paste your **API Token**
6. Click **Connect**
7. Verify the status shows **Connected**
8. Click **Test Connection** to verify

## Getting Zendesk Credentials

### Find Your Subdomain

Your Zendesk subdomain is in your account URL:

* If you access Zendesk at `https://mycompany.zendesk.com`
* Your subdomain is: `mycompany`

### Create API Token

1. Log into your **Zendesk Admin Center**
2. Click the **Admin** icon (gear) in the sidebar
3. Go to **Apps and integrations** → **APIs** → **Zendesk API**
4. Click the **Settings** tab
5. Enable **Token Access** if not already enabled
6. Click **Add API token** button
7. Add description: "ChatCrafterAI Integration"
8. Click **Create**
9. **Copy the token immediately** (shown only once - save securely)
10. Click **Save**

### Get API Email

Use the email address of your Zendesk admin account. This is the email you use to log into Zendesk.

### Paste into ChatCrafterAI

1. Return to ChatCrafterAI integration setup
2. Enter your **subdomain** (e.g., mycompany)
3. Enter your **admin email**
4. Paste the **API token** you copied
5. Click **Connect**

## Subdomain Format

Enter only the subdomain, not the full URL:

* **Correct:** `mycompany`
* **Correct:** `mycompany.zendesk.com` (both work)
* **Incorrect:** `https://mycompany.zendesk.com` (no protocol)

## Verification

After setup, verify the connection works:

1. Open **Chatlab** (ChatCrafterAI testing environment)
2. Send test message: "Create a test ticket"
3. Provide details when agent asks
4. Agent should confirm ticket creation with ticket ID
5. Check your **Zendesk inbox** for the new ticket
6. If error appears:
   * Verify token is copied exactly (no spaces)
   * Check email address is correct
   * Ensure token access is enabled in Zendesk
   * Confirm subdomain matches your Zendesk URL

## Troubleshooting Setup

**Authentication failed?**

* Verify API token is valid and not expired
* Check email address matches Zendesk admin account
* Ensure token access is enabled in Zendesk settings
* Try generating a new API token

**"Subdomain not found"?**

* Verify subdomain spelling is correct
* Check you're using the right Zendesk account
* Ensure account is active (not suspended)

**Cannot create tickets?**

* Verify API email has agent permissions
* Check token has necessary scopes enabled
* Ensure no IP restrictions blocking ChatCrafterAI

## Security Notes

* Store API token securely - it provides access to your Zendesk
* Token gives same permissions as your admin account
* You can revoke token anytime in Zendesk API settings
* Create token specifically for ChatCrafterAI (don't reuse)
* Monitor token usage in Zendesk audit logs

## API Permissions

The integration requires these permissions (automatically included with API token):

* **Read tickets** - View ticket information
* **Write tickets** - Create and update tickets
* **Read users** - Look up customer information
* **Write users** - Create customer records if needed

## Next Steps

Now that Zendesk is connected, learn about [Available Actions](./actions) your agent can perform.
