> For the complete documentation index, see [llms.txt](https://docs.distro.so/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.distro.so/guides/product-qualified-leads.md).

# Product-qualified leads

Route users to sales when product usage shows buying intent, from Segment, PostHog, a warehouse, or your backend.

A product-qualified lead (PQL) is a user whose product usage signals buying intent: signing up, inviting teammates, or reaching a usage threshold. Product-led teams route PQLs while the usage is fresh. In Distro, a product event starts a workflow, which checks the CRM, enriches the person, qualifies them, and gives them to the account owner or the next rep.

## How product events reach Distro

Distro doesn't pull events or cohorts from analytics tools. The tool, or a sync you run, sends each event.

| Source                                                   | Trigger                                                                        |
| -------------------------------------------------------- | ------------------------------------------------------------------------------ |
| Segment, PostHog, Mixpanel, Amplitude, Hightouch, Census | **Webhook received**, one JSON `POST` per event                                |
| Your backend                                             | **API call**                                                                   |
| A sync that writes usage to the CRM                      | **Salesforce object updated** or **Hubspot record updated** on the usage field |

Send one event per request, send running totals (such as `seats_used`) rather than increments, and send numbers as JSON numbers so conditions can compare them.

## Build it with Salesforce

{% stepper %}
{% step %}

### Receive the event

Choose **Webhook received** with **Authentication** set to bearer. Give the endpoint URL and secret to your tool, capture or paste a sample event, and set **Lead email field** to `email`. See [API and webhooks](/workflows/api-and-webhooks.md).
{% endstep %}

{% step %}

### Check the usage signal first

Add **Branch** with a `Product signal` branch: `plan` **Equals** `Free`, `seats_used` **At least** `5`, and `email` **Is a work email or domain**. Leave **Otherwise** empty, so other events end before any enrichment.
{% endstep %}

{% step %}

### Known people keep their owner

Add **Match Salesforce Record** on `Lead` by `Email`. On **Matched**, write your `Product_Signal__c` field with **Update Salesforce Record**.
{% endstep %}

{% step %}

### Enrich and qualify on fit

On **Not matched**, add **Enrich Lead**, then **Branch** `PQL` where the lead company's **Headcount** is **At least** 50.
{% endstep %}

{% step %}

### Account owner or queue

Add **Match Salesforce Record** on `Account` with `Website` mapped to `account_domain` from the event. On **Matched**, **Create Salesforce Record** a `Lead` with `LeadSource` = `Product` and `OwnerId` from the account. On **Not matched**, **Assign from Queue** with `PQL Reps`, create the lead with the assignee as owner, and **Notify in Slack** the **Earlier assignee** with the event, seats, and plan.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
To qualify on free text, such as a signup's use case, use **AI Prompt** after **Enrich Lead** to return a label like `PQL` or `Not yet`, then **Branch** on it. See [AI and web research](/data-and-integrations/ai.md).
{% endhint %}

## Troubleshoot

| What you see                                | What to check                                                                                 |
| ------------------------------------------- | --------------------------------------------------------------------------------------------- |
| Never starts                                | `401` means a missing or wrong secret. A paused endpoint acknowledges but doesn't start runs. |
| A field is missing or compares only as text | Capture a new sample with every field filled and numbers as numbers.                          |
| **Create Salesforce Record** fails          | Map `LastName` and `Company` for a lead.                                                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.distro.so/guides/product-qualified-leads.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
