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

# Pipedrive and ClickFlare Integration Guide

> Track Pipedrive deals in ClickFlare: store the click ID in a custom field, then send won deals and their value from an automation webhook.

![Pipedrive and ClickFlare Integration](https://mintcdn.com/clickflare/gS923ib4WFySqxSL/images/integrations/covers/pipedrive.png?fit=max\&auto=format\&n=gS923ib4WFySqxSL\&q=85\&s=832c7f297d1e8688fad5b35eac816252)

Pipedrive is a sales CRM built around a deal pipeline. Leads come in, become deals, move through stages and end as won or lost. The outcome you want to optimize on, a won deal and its value, is recorded in Pipedrive long after the ad click.

This guide sends it back to ClickFlare:

* **ClickFlare → Pipedrive:** ClickFlare passes its click ID to your page, and the lead or deal is created with the click ID in a custom field.
* **Pipedrive → ClickFlare:** when the deal reaches the stage you choose, a Pipedrive automation sends a webhook to ClickFlare with that click ID and the deal value.

Each stage arrives as its own custom conversion, so leads, qualified deals and won deals show as separate columns next to your ad cost. An optional last section covers the reverse direction.

***

## At a glance

To set up Pipedrive with ClickFlare:

1. Create conversions, campaign and offer.
2. Create the click ID custom field.
3. Get the click ID into the field.
4. Create the automation webhook.
5. Build the automation and test.

Each step is explained in [Setup](#setup).

| | Pipedrive + ClickFlare |
| - | - |
| **How it connects** | Pipedrive automation webhook, JSON POST to /cf/cv |
| **What reaches ClickFlare** | Leads, qualified deals, won deals, deal value |
| **Timing** | Real time, per conversion |
| **Key parameters** | `cf_click_id`, `ct`, `payout`, param1 to param20 |
| **Works with** | Custom fields on lead/deal or person |
| **Good to know** | Automations need Advanced or higher; global admin creates the webhook. |

***

## How the data flows

```text theme={null}
Ad click
  → https://trk.yourdomain.com/cf/r/CAMPAIGN?...
     (ClickFlare records the click and generates the click ID)
  → https://yourpage.com/?cf_click_id=CF_CLICK_ID
     (your form keeps the click ID in a hidden field)
  → Visitor submits the form
     (a Pipedrive lead or deal is created with the click ID in a custom field)
  → Deal is marked won
  → Pipedrive automation: webhook action
     POST https://trk.yourdomain.com/cf/cv
     {"cf_click_id": "CF_CLICK_ID", "ct": "won", "payout": 1200}
     (ClickFlare matches the conversion to the original click)
```

| Piece | Where | Value |
| - | - | - |
| **Offer URL** (in ClickFlare) | Your parameter + ClickFlare token | `cf_click_id={cf_click_id}` |
| **Custom field** (in Pipedrive) | Lead/deal (or person) | Holds the click ID |
| **Automation webhook** (in Pipedrive) | Endpoint + path | `https://trk.yourdomain.com/` + `cf/cv` |
| **Webhook body** (in the automation) | ClickFlare keys + Pipedrive fields | `cf_click_id`, `ct`, `payout` |

***

## What you'll need

* A ClickFlare account with your **own tracking domain**. See [Tracking domains](/docs/en/settings/tracking-domains.md).
* A Pipedrive plan with automations. Pipedrive's article says automations and webhooks in automations are available on **Advanced and higher** plans; regular webhooks are on all plans. Pipedrive has recently renamed its plans, so check yours.
* **Global admin** rights to create the automation webhook, and permission to add custom fields.
* A way to get the click ID into Pipedrive with the lead. See [the setup step](#setup) for the options.

***

## Setup

**1. Set up your own tracking domain**

Add a custom tracking domain, for example `trk.yourdomain.com`, under [Tracking domains](/docs/en/settings/tracking-domains.md). The Pipedrive webhook points at it.

**2. Create a custom conversion for each stage**

In ClickFlare, go to **Settings → Custom Conversions** and create one per stage:

| Stage in Pipedrive | `ct` value |
| - | - |
| Lead or deal created | `lead` |
| Deal reaches a stage you choose | `qualified` |
| Deal won | `won` |

The parameter of each custom conversion is the `ct` value Pipedrive sends. It must match exactly. See [Custom conversions](/docs/en/settings/custom-conversions.md).

**3. Create the campaign and add your page as the offer**

Go to **Campaigns → New Campaign** and pick your traffic source and tracking domain. See [Creating a campaign](/docs/en/campaigns/creating-a-campaign-in-click-flare.md).

In the campaign path, create a new offer inline with the page that holds your form:

```text theme={null}
https://yourpage.com/?cf_click_id={cf_click_id}
```

Keep the braces. Set the offer payout to **Auto** so ClickFlare uses the deal value Pipedrive sends. Save the campaign and copy the campaign URL for your ads.

**4. Create the click ID custom field**

In Pipedrive, open the account menu, go to **Personal preferences → Data fields**, choose **lead/deal** and click **+ Custom field**. Name it, for example **ClickFlare click ID**, and pick a text type.

A lead/deal field follows the lead when it becomes a deal, which is what the webhook reads. If your form only creates persons, add the field to the person instead.

**5. Get the click ID into the field**

Your form must read `cf_click_id` from the page URL into a hidden field and send it with the lead. Pipedrive users report that Pipedrive's own web forms don't capture URL parameters into hidden fields, so check your current web forms first. The common setups are:

* A form on your page (or a form builder) with a hidden field, sending submissions to Pipedrive through [Zapier](/docs/en/integrations/zapier-click-flare-integration-guide.md), [Make](/docs/en/integrations/make-click-flare-integration-guide.md) or [n8n](/docs/en/integrations/n8n-click-flare-integration-guide.md), which create the lead with the custom field filled.
* Your own backend creating the lead through the Pipedrive API with the custom field's value.

Test with one lead and check the field before you go further.

**6. Create the automation webhook**

Go to the **Webhooks** page (under **Tools and apps**) and click **+ Webhooks → Automation webhook**. Existing regular webhooks can't be reused.

* **Name:** something you'll recognize in the automation, for example "ClickFlare postback".
* **Endpoint URL:** `https://trk.yourdomain.com/`

Pipedrive requires the endpoint URL to end with `/`, `&`, `?` or `=`. Enter the base domain with a trailing slash and add the path in the automation. No authentication is needed.

**7. Build the automation**

Go to **Automations** and create one for deals, with the trigger and condition for your stage, for example a deal updated with status won.

Add the **webhook** action and fill in:

1. **Webhook:** the automation webhook you created.
2. **Method:** **POST**.
3. **Body:** choose **Key-value** and add:

| Key | Value |
| - | - |
| `cf_click_id` | The **ClickFlare click ID** field (pick it with the field button) |
| `ct` | `won` |
| `payout` | The deal **value** field |
| `txid` (optional) | The deal **ID** field, if one click can lead to several deals |

4. **Path:** `cf/cv`, so the request goes to `https://trk.yourdomain.com/cf/cv`.

ClickFlare reads `cf_click_id`, `ct`, `payout`, `txid` and `param1` to `param20` from a JSON body:

```json theme={null}
{"cf_click_id": "CF_CLICK_ID", "ct": "won", "payout": 1200, "txid": "DEAL_ID"}
```

Pipedrive also has a **Raw** body for writing your own JSON. Use **Key-value** if you need Pipedrive fields in the body, since Pipedrive's article only describes the field picker for the key-value builder.

**8. Turn the automation on and test**

Win a test deal that has a real click ID in the field. Then check the automation's **execution history**: it shows the final body and path Pipedrive sent. Compare them with the example above, then check ClickFlare (see [Verify the setup](#verify-the-setup)).

***

## When you need a relay instead

Pipedrive's automation webhook sends POST, PUT or DELETE only, so it can't call ClickFlare's GET postback. Put a relay in between when:

* The execution history shows a body that isn't plain JSON with your keys.
* Your plan has no automations.

A relay ([Zapier](/docs/en/integrations/zapier-click-flare-integration-guide.md), [Make](/docs/en/integrations/make-click-flare-integration-guide.md) or [n8n](/docs/en/integrations/n8n-click-flare-integration-guide.md)) listens for the Pipedrive deal update, or receives the automation webhook, and calls the postback:

```text theme={null}
https://trk.yourdomain.com/cf/cv?click_id=CF_CLICK_ID&ct=won&payout=1200&txid=DEAL_ID
```

***

## Stages, payout and duplicates

**One stage, one `ct`.** A conversion with a different `ct` on the same click is added as a new conversion. A deal that is created, qualified and won shows once in each of the three columns, so you see cost per lead and cost per won deal side by side.

**Payout from the deal value.** Map `payout` to the deal value on the `won` webhook only. Send `0` on earlier stages so revenue isn't counted twice.

**Repeats.** Without `txid`, a second `won` on the same click counts as the same conversion. That protects you if a deal is reopened and won again. If one click can lead to several separate deals, add the deal ID as `txid` in the body so each counts.

**Choose what the ad platform sees.** Each custom conversion is mapped to the traffic source postback separately, so you can send only `won` to the ad platform.

**Execution limits.** Automation webhooks count toward Pipedrive's automation execution limits. When the limit is reached, Pipedrive pauses webhook requests, and conversions arrive late or not at all. Watch this on busy pipelines.

***

## Verify the setup

**1. Click through the campaign**

Open your ClickFlare campaign URL. The page URL should contain `cf_click_id=` and a real click ID, not the text `{cf_click_id}`.

**2. Submit the form**

Check that the new lead or deal in Pipedrive has the same ID in the custom field.

**3. Win the deal**

Mark the test deal won and open the automation's execution history. The body should hold the click ID and value, and the path should be `cf/cv`.

**4. Check ClickFlare**

In **Logs → Event Logs**, the conversion should appear with `ct` set to `won` and the deal value as payout.

***

## Send ClickFlare conversions to Pipedrive (optional)

To go the other way, for example to add a note to a deal when ClickFlare records a payment from your checkout, use the [Custom Webhook integration](/docs/en/integrations/custom-webhook-integration.md). Go to **Integrations → Conversion API → New integration**, choose **Webhooks**, map the event, choose **POST** and put macros such as `{cf_click_id}` and `{payout}` in the body.

Pipedrive has to find the deal by the click ID first. A relay such as Zapier, Make or n8n can receive the webhook, search deals by the click ID field and update the one it finds.

***

## Troubleshooting

> [accordion] Pipedrive won't save the endpoint URL
>
> The URL must end with `/`, `&`, `?` or `=`. Use `https://trk.yourdomain.com/` and put `cf/cv` in the action's path.

> [accordion] I can't add the webhook action to an automation
>
> Pipedrive only offers the action when an automation webhook already exists, and only global admins can create one. Create it on the **Webhooks** page first.

> [accordion] The automation ran but no conversion shows
>
> * The path is missing, so the request went to the domain root instead of `/cf/cv`.
> * The key is `click_id` instead of `cf_click_id`. JSON bodies use `cf_click_id`.
> * The custom field was empty on that deal.
> * The `ct` value doesn't match a custom conversion's parameter exactly.
>
> See [Troubleshooting S2S postbacks](/docs/en/tracking/troubleshooting-s2s-postback-url-in-clickflare.md).

> [accordion] The automation failed
>
> Pipedrive fails the execution if the webhook stops working or is missing permissions. Check the execution history for the error, and check whether you've hit your automation execution limits.

***

## FAQ

> [accordion] Does ClickFlare integrate with Pipedrive?
>
> Yes. The click ID is saved in a Pipedrive custom field, and an automation webhook posts it to ClickFlare with ct and the deal value when the deal reaches your stage.

> [accordion] Can I track the form fill without Pipedrive?
>
> Yes. Place the [conversion tracking pixel](/docs/en/settings/conversion-tracking-pixel.md) on the thank-you page with `ct=lead`, and use Pipedrive automations only for later stages.

> [accordion] Where do I store the click ID, on the deal or the person?
>
> On the lead/deal, because the automation runs on the deal and reads its fields. Store it on the person too if one person can have several deals from different clicks: each deal should keep its own click ID.

> [accordion] Can I send more data, like the pipeline or owner?
>
> Yes. Add `param1` to `param20` as keys in the body and map them to fields. ClickFlare stores them with the conversion.

> [accordion] No automations on my plan. What else?
>
> Use a relay that watches deals, or export won deals with their click IDs and import them with [Conversion Upload](/docs/en/settings/conversion-upload.md).

***

## Related

> [card] [Custom conversions](/docs/en/settings/custom-conversions.md)
>
> One ct per stage

> [card] [Custom Webhook](/docs/en/integrations/custom-webhook-integration.md)
>
> Send ClickFlare events out

> [card] [Zapier](/docs/en/integrations/zapier-click-flare-integration-guide.md)
>
> Relay without code


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