# Integration Troubleshooting

## Data Deduplication

DURUM.ai includes a 3-level automatic deduplication system to prevent duplicates:

| Level | How It Works | Example |
|-------|-------------|---------|
| Invoice number | If an event with the same invoice number already exists, it's ignored | Zoho Books sends the same invoice twice |
| Calendly URI | If an event with the same Calendly identifier already exists, it's ignored | Calendly resends a webhook |
| Email + type + date | If an event of the same type, for the same email, on the same day already exists, it's ignored | GHL sends a lead twice |

Additionally, **revenue deduplication** prevents double-counting when the same client has both a sale (Zoho CRM) and a payment (Zoho Books). Only the payment is counted in revenue to avoid inflating numbers.

You don't need to do anything: deduplication is entirely automatic.

---

## Quarantine

When DURUM.ai receives an event from an unknown source or one that can't be associated with a client account, the event is automatically placed in **quarantine**.

### Why an Event Gets Quarantined

| Reason | Explanation |
|--------|-------------|
| Unknown form | A new GHL or Typeform form that DURUM.ai doesn't recognize yet |
| Unresolved client | The `client_key` is missing or invalid |
| Unrecognized source | The event source can't be automatically identified |

### What Happens Next

1. The event is saved in quarantine (nothing is lost)
2. The agency is automatically notified
3. The agency categorizes the event in the **Matching** page
4. Once categorized, all future events from that source are processed automatically

> **Info**
>
> You don't need to do anything when an event is quarantined. The agency handles it. If you see many quarantined events, contact your account manager to speed up categorization.

---

## Verification: How to Know If Your Webhooks Work

### Method 1: Data Logs Page

1. Log in to DURUM.ai
2. Go to the **Data Logs** page (in the sidebar)
3. You'll see all incoming events in real time
4. Each row shows:
   - The **source** (Typeform, Calendly, GHL, Zoho, Stripe)
   - The **event type** (lead, booking, sale, etc.)
   - The **status** (success, queued, quarantined, error)
   - The **date and time** received

### Method 2: Test Manually

For each integration, create a test event:
- **GHL**: create a test contact
- **Calendly**: book a test slot
- **Typeform**: submit a test response
- **Zoho CRM**: create a test deal and change its status
- **Zoho Books**: create and pay a test invoice
- **Stripe**: use the "Send test webhook" function in the Stripe dashboard

Wait 30 seconds then check the Data Logs page.

### Log Statuses

| Status | Meaning | Action Required |
|--------|---------|-----------------|
| `success` | Event was processed and recorded | None, all good |
| `queued` | Event is in queue (temporary issue) | None, will be processed automatically |
| `quarantined` | Unknown source, awaiting categorization | Agency handles it |
| `duplicate` | Event already received, ignored | Normal, deduplication is working |
| `error` | Error during processing | Contact the agency with log details |
| `ignored` | Event configured to be ignored | Normal if the form is intentionally ignored |

---

## General Troubleshooting

### Common Problems

| Problem | Probable Cause | Solution |
|---------|---------------|----------|
| No events in logs | Webhook not activated | Check configuration in the source tool (GHL, Calendly, etc.) |
| `client_key=unknown` | client_key parameter missing from URL | Add `?client_key=YOUR_KEY` to the webhook URL |
| Error 401 | Authentication failed | For GHL: add `&source=ghl`. For Stripe: send the secret to the agency. |
| Error 405 | Wrong HTTP method | Make sure the webhook is configured as **POST** (not GET) |
| Error 429 | Too many requests in a short time | Limit webhooks or contact the agency |
| Error 500 | Server error | Contact the agency with error details |
| Incomplete data (amount is 0, no name) | Fields not mapped in webhook | Check field mapping in the source tool |
| Duplicate event in DURUM.ai | Deduplication system couldn't detect the duplicate | Contact the agency to manually remove the duplicate |

### If Nothing Works

1. Verify the URL is exactly `https://app.durum.ai/api/webhook/{type}?client_key=YOUR_KEY`
2. Verify there are no spaces or special characters in the URL
3. Verify the method is **POST**
4. Verify your `client_key` is correct (ask the agency if in doubt)
5. Try creating a test event and check the **Data Logs** page
6. If the problem persists, contact your account manager with:
   - The integration name (GHL, Calendly, etc.)
   - The webhook URL used
   - The event type that isn't working
   - A screenshot of the error (if available)

> **Tip**
>
> The vast majority of webhook problems are caused by a miscopied URL or an incorrect `client_key`. Always check these two elements first.

---

Source: https://docs.durum.ai/en/integrations/troubleshooting
