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

# Plain

> Connect your Plain workspace to Decimal for ticket syncing, resolution, and chat widget escalation.

The Plain integration connects your Plain workspace to Decimal for ticket resolution and chat widget escalation.

## What It Does

* **Syncs threads** from Plain into Decimal as support tickets
* **Writes resolutions back** as comments on the original Plain thread
* **Enables escalation** from chat widgets to create new Plain threads
* **Imports thread context** including messages and customer information

## Connecting Plain

1. **Navigate to Integrations**: Go to the **Integrations** page in the sidebar.
2. **Click Plain**: Click on the Plain integration row to open the configuration modal.
3. **Provide your API key**: Enter your Plain API key.
4. **Connect**: Click **Connect** to save the configuration.

## Finding Your Plain API Key

1. In Plain, go to **Settings > API Keys**
2. Create a new API key with the necessary permissions
3. Copy the key and paste it into the Decimal configuration

## Webhook Setup

Configure a webhook so Decimal picks up thread updates with lower latency as customers reply.

1. **Copy your signing secret** from Plain under **Settings → Request Signing**.

   <img src="https://mintcdn.com/decimalai/36uDT0OxJGabMazz/plain-request-signing.png?fit=max&auto=format&n=36uDT0OxJGabMazz&q=85&s=93b6240471cf01bf38e6fbde98a7a516" alt="Plain workspace HMAC secret under Request signing" width="1204" height="682" data-path="plain-request-signing.png" />

2. **Save the secret in Decimal**: open the [Plain integration](https://app.getdecimal.ai/settings?tab=integrations), paste the secret into **Webhook signing secret**, and click **Save webhook secret**.

3. **Create a webhook in Plain** under **Settings → Webhooks** with this URL:

   ```
   https://app.getdecimal.ai/api/webhook/plain
   ```

   Subscribe it to the **Thread** events (`thread.*`) so replies and status changes are delivered.

   <img src="https://mintcdn.com/decimalai/36uDT0OxJGabMazz/plain-webhook-target.png?fit=max&auto=format&n=36uDT0OxJGabMazz&q=85&s=1357c28e6544d928e26abb2a8cef9d7c" alt="Plain webhook target configured with the Decimal webhook URL" width="2092" height="1092" data-path="plain-webhook-target.png" />

## Chat Widget Escalation

Once connected, Plain can be selected as an escalation target for [Chat Widgets](/chat-widgets/overview). When a customer escalates a conversation, a new Plain thread is created with the full chat history.
