# Pipedrive

Connect Pipedrive so the assistant recognises callers by phone, creates persons and deals, and logs every call as a note

> Full REST + WebSocket API reference: https://api.happ.tools/reference

Pipedrive connects with your personal API token. Once it's linked, the assistant greets known customers by name with their latest deal in hand, creates a person and a deal when someone leaves a request, and writes the outcome of every call to the customer's record.

## What the assistant can do [#what-the-assistant-can-do]

* **Recognise the caller** — at the start of a call it looks the phone number up in Pipedrive and gets the person's name, email, organization and their latest deal (title, stage, value).
* **Create a deal** — finds the person by phone or creates a new one, then creates a deal in the pipeline and stage you choose. The request, delivery address, products and the ad that brought the customer go into the deal as a note.
* **Log calls** — after each call it adds a note to the person and their deal: direction, duration, outcome, summary, the recording link and, if you want, the full transcript.

## Before you start [#before-you-start]

* **Pipedrive user** whose rights cover the deals the assistant should see and create — the token acts as this user.
* **HAPP workspace** with at least one assistant.
* **Pipedrive enabled for your workspace** — the integration is switched on per company. Ask HAPP support to enable it.

## Get the API token [#get-the-api-token]

1. In Pipedrive click your avatar and open **Personal preferences > API**.
2. Copy **Your personal API token**.

## Connect [#connect]

1. In HAPP open **Integrations** and find Pipedrive under **Add a CRM**.
2. Click **Connect**, paste the token and confirm.
3. Pipedrive appears under **My integrations** with your company name.

## Settings [#settings]

Open the card's gear icon on the assistant's **Integrations** tab.

* **Search** — recognise the caller by phone.
* **Create** — deals. Pick the **pipeline**, **stage** and **owner**; without them the deal goes to your default pipeline. Without an owner, deals belong to the token's user.
* **Call notes** — a note after every call. **Full transcript** adds the conversation text.

## Limits [#limits]

* Pipedrive stores phone numbers as typed; the assistant matches on the last 9 digits, so `050 111 22 33` and `+380501112233` are the same customer.
* A number that isn't in Pipedrive gets no call note — there is no record to attach it to.
* The token is personal: if that user is deactivated, the integration stops working.

## Troubleshooting [#troubleshooting]

| Problem                                                                  | Cause                                             | Fix                                                      |
| ------------------------------------------------------------------------ | ------------------------------------------------- | -------------------------------------------------------- |
| "Pipedrive rejected the API token"                                       | The token was regenerated or the user deactivated | Copy the current token and click **Connect** again.      |
| "The Pipedrive user behind this token has no permission for this action" | The user can't see or create these deals          | Use a token of a user with the needed visibility rights. |
| "Pipedrive rate limit reached"                                           | Too many requests at once                         | Nothing to do — the next request goes through.           |

## Disconnect [#disconnect]

Disconnect the card in HAPP. To revoke access completely, regenerate the API token in **Personal preferences > API**. Persons, deals and notes already in Pipedrive stay.

## Next [#next]

* [CRM](/docs/integrations/crm) — all CRM integrations
* [Tools](/docs/agents/tools) — what the assistant calls during conversations
