> ## Documentation Index
> Fetch the complete documentation index at: https://user-guides.demand-genius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect HubSpot

> Create a HubSpot private app token, connect it in Demand-Genius, then configure deal pipelines, a closed-won stage per pipeline and the funnel stages you report on.

Demand-Genius reads deals and contacts from HubSpot to link content engagement to pipeline. The connection uses a private app access token you create in HubSpot and paste into Demand-Genius. After connecting, you choose which deal pipelines to sync, the deal value property and closed-won stage for each, and which funnel stages to report on.

## Prerequisites

* Super admin rights in HubSpot, needed to create a private app.
* The **Modify / Connect / Disconnect Integrations** permission in Demand-Genius.

## Part 1: create the private app in HubSpot

<Steps>
  <Step title="Open Private Apps">
    In HubSpot, click the settings cog, then **Integrations** in the left menu. HubSpot has moved private apps under **Legacy Apps**; follow the prompt to go there and choose to create a private app.
  </Step>

  <Step title="Name the app">
    Something recognisable, such as "Demand-Genius integration".
  </Step>

  <Step title="Set the scopes">
    On the Scopes tab, grant read access to deals and contacts and to their schemas. Demand-Genius only reads; no write scope is needed.

    | Scope                  | Access |
    | ---------------------- | ------ |
    | `crm.objects.deals`    | Read   |
    | `crm.objects.contacts` | Read   |
    | `crm.schemas.deals`    | Read   |
    | `crm.schemas.contacts` | Read   |
  </Step>

  <Step title="Create the app and copy the token">
    Click create. HubSpot shows the access token once. Copy it somewhere safe.
  </Step>
</Steps>

## Part 2: connect in Demand-Genius

<Steps>
  <Step title="Open Settings > CRM">
    The **CRM Integration** card shows HubSpot and Salesforce tiles when nothing is connected.
  </Step>

  <Step title="Click Connect on the HubSpot tile">
    The **Add Integration** dialog opens.
  </Step>

  <Step title="Paste the token">
    Enter it in **Hubspot API Token** and submit.
  </Step>

  <Step title="Confirm the connection">
    The card now shows **Connected**, the pipelines configured and the number of funnel stages. Click **Configure** to continue.
  </Step>
</Steps>

## Part 3: configure pipelines and stages

The configure screen opens with the connection details at the top: the API key with a pencil to update it, and **Delete Integration**. Below it sit three sections. Pipeline and closed-won choices save as soon as you make them; only the funnel stages have a Save button.

### Deals Pipelines

Each row pairs one HubSpot deals pipeline with the deal property that holds its value.

<Steps>
  <Step title="Choose the primary pipeline">
    The first row is marked **Primary**. Its stages become your funnel stages. Pick it from the **Pipeline** dropdown; each option shows the pipeline name and how many stages it has.
  </Step>

  <Step title="Set its Deal value property">
    The HubSpot deal property Demand-Genius reads as the deal's value. It defaults to **Amount**. Change it if your team records value in a different property, for example an annual contract value field.
  </Step>

  <Step title="Add further pipelines">
    Click **Add pipeline** for each additional pipeline you want synced, choose the pipeline, and set its own deal value property. A pipeline already in use is not offered twice. Every configured pipeline feeds the Performance columns; only the primary drives funnel stages.
  </Step>

  <Step title="Remove a pipeline you no longer want">
    Use the bin icon on a secondary row. The primary row cannot be removed, only switched.
  </Step>
</Steps>

<Warning>
  Switching the primary pipeline archives your current funnel stages and stage configuration and moves deal sync to the new primary. You are asked to confirm with **Yes, switch pipeline**. You can restore the previous setup by switching back. Adding or removing a secondary pipeline never touches funnel-stage data.
</Warning>

### Closed Won Stages

One selector per configured pipeline, each listing that pipeline's own stages. Choose the stage that counts as closed-won. A pipeline showing **Not set** contributes nothing to closed-won figures until you choose one; its deals are still synced.

### Funnel Stages

The stages of the primary pipeline, as checkboxes. Untick test or redundant stages you do not want reported on. **Save** appears once something has changed; **Reset** discards unsaved changes.

## Attribute mapping

The **Attribute Mapping** section maps Demand-Genius attributes to HubSpot contact properties. It belongs to the retired forms feature and can be left alone unless Demand-Genius asks you to set it.

## Update or remove the connection

* **Update the token** with the pencil next to the API key. The dialog warns that existing data will be lost by updating credentials; treat it as a reconnect, not a refresh.
* **Delete Integration** requires typing DELETE to confirm and removes the connection and synced data.

## How the sync runs

Deals and their contacts sync once a day, with the deal stage history needed to place each deal in your funnel. Every configured pipeline is included. A pipeline added today shows up after the next sync. See [Performance tracking](/content-intelligence/performance-tracking) for how the data appears in the Library.

## Troubleshooting

* **Connected but no pipelines listed.** Open Configure and choose a primary pipeline in the first row.
* **Closed-won revenue is zero for one pipeline.** Its Closed Won stage is **Not set**, or its deal value property is not the one your team populates.
* **Performance columns stopped updating.** HubSpot tokens can expire or be revoked. Generate a new token in HubSpot and update it with the pencil next to the API key.
* **A pipeline is missing from the dropdown.** It is already used on another row, or it is archived in HubSpot.
* **Funnel stages changed unexpectedly.** The primary pipeline was switched. Switch back to restore the archived setup.
