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

# Plain

> Connect Plain to manage customer support threads with Duckie

Connect Plain to let Duckie respond to customer support threads.

## Capabilities

| Capability | Supported |
| - | - |
| **Knowledge Source** | ✗ |
| **Deployment Trigger** | ✓ Respond to threads |
| **Tool Actions** | ✓ Reply, update status, add labels |

## Setup

### Prerequisites

* Plain workspace with API access
* Admin permissions to create API keys

### Step 1: Get API Credentials

1. Go to your Plain workspace settings
2. Navigate to **API Keys**
3. Create a new API key with full permissions
4. Copy the **Workspace ID** and **API Key**

### Step 2: Connect in Duckie

1. Go to **Settings → Connections** in Duckie
2. Find **Plain** and click **Connect**
3. Enter your details:
   * **Workspace ID**: Your Plain workspace ID
   * **API Key**: The key you created
4. Click **Connect**

## Using as a Deployment Trigger

Deploy an agent to respond to Plain threads:

1. Go to **Deploy**
2. Click **Create Deployment**
3. Select your agent
4. Choose **Plain** as the trigger
5. Configure events:
   * **New thread** — When a customer starts a conversation
   * **Customer reply** — When a customer responds

## Available Tools

| Tool | Description |
| - | - |
| `plain_reply` | Send a reply to the thread |
| `plain_add_label` | Add a label to the thread |
| `plain_change_status` | Update thread status |
| `plain_get_customer` | Get customer information |

## Best Practices

### Use Labels for Routing

Tag threads with labels to route to specialized agents:

* `billing` → Billing-trained agent
* `technical` → Technical support agent

### Monitor Response Quality

Use Plain's built-in metrics alongside Duckie's analytics to track response quality.

## Troubleshooting

### "API key invalid"

* Verify the API key is still active
* Ensure the key has sufficient permissions
* Check that the Workspace ID is correct

### "Thread not found"

* The thread may have been archived
* Verify Duckie has access to the thread's workspace


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.