# Zoho CRM

> **Info: Discovery plan**
>
> On the Discovery plan, one CRM connection is active at a time (error `plan_free_one_crm` beyond that).
### What It Does

Zoho CRM sends deal status changes in real time to DURUM.ai.

| Zoho CRM Event | Type in DURUM.ai | When |
|----------------|-----------------|------|
| Deal won (Closed Won) | Sale | A deal is marked as won |
| Deal lost (Closed Lost) | Lost Sale | A deal is marked as lost |

### Step-by-Step Configuration

1. Log in to your Zoho CRM account
2. Click the **Gear icon** (top right) to access **Settings**
3. In the **Automation** section, click **Actions**
4. Select the **Webhooks** tab
5. Click **Configure Webhook** (or **+ New Webhook**)

**Webhook for won deals:**

6. **Name**: `DURUM - Sale Won`
7. **URL**:
   ```
   https://app.durum.ai/api/webhook/sale?client_key=YOUR_KEY
   ```
8. **Method**: POST
9. **URL Format**: JSON
10. In the **Body**, select **Custom** and add the following fields:
    - `Deal_Name`: `${Deals.Deal Name}`
    - `Stage`: `${Deals.Stage}`
    - `Amount`: `${Deals.Amount}`
    - `Contact_Name`: `${Deals.Contact Name}`
    - `Email`: `${Deals.Email}`
    - `Owner`: `${Deals.Deal Owner}`
11. Click **Save**

**Associate the webhook with a workflow:**

12. Go back to **Settings** then **Automation** then **Workflow Rules**
13. Click **+ Create Rule**
14. **Module**: Deals
15. **Rule name**: `DURUM - Notify Sale`
16. **When**: `Stage` is changed to `Closed Won` (or your equivalent status)
17. **Action**: select **Webhook** then choose `DURUM - Sale Won`
18. Save and activate the rule

**Repeat the same steps** for lost deals, changing:
- Webhook name: `DURUM - Sale Lost`
- Rule filter: `Stage` is changed to `Closed Lost`
- The URL stays the same (`/api/webhook/sale`)

### How to Test

1. Create a test deal in Zoho CRM
2. Change its status to **Closed Won**
3. Wait 30 seconds
4. In DURUM.ai, go to **Data Logs**
5. Verify that a `sale` event appears
6. Delete the test deal

### Zoho CRM Troubleshooting

| Problem | Solution |
|---------|----------|
| Event doesn't appear | Verify the workflow rule is active and the webhook is properly associated |
| Error in Zoho logs | Check the URL (no spaces, correct client_key) and that the format is JSON |
| Amount is 0 | Verify the `Amount` field is properly mapped in the webhook body |

---

---

Source: https://docs.durum.ai/en/integrations/zoho-crm
