XCubes

Connect HubSpot

XCubes reads your HubSpot deals with a service key you create in HubSpot. The key is read-only: XCubes never writes to HubSpot.

Create the service key

In HubSpot, open Development and create a service key (accounts created recently no longer offer private apps; service keys replace them). Give it these three scopes:

Paste the key into the Service key field of a new HubSpot integration and test the connection. A missing scope is reported by name.

What it reads

Each deal arrives as two rows, identical except for three columns:

Column Row 1 Row 2
measure Amount Weighted amount
value the deal amount amount × stage probability
rowKey <deal id>:amount <deal id>:weighted

Both rows also carry the deal's name, amount, currency, close and create dates, pipeline and stage (as their names, not HubSpot's internal ids), stage probability, forecast category, won/closed flags and owner name.

Choose Fields → All deal properties to add every other deal property, custom ones included, as extra columns named by their HubSpot internal name.

Amounts are not converted: a portal with several currencies keeps each deal in its own currency.

Build the forecast cube

Map closeDate to your Time dimension, stage, ownerName and pipeline to dimensions, measure to a Measures dimension with items Amount and Weighted amount, and value as the value field.

Because every deal is two rows, count deals on one measure only — filter to Amount — or each deal counts twice.

Keep it current

Set the key field to rowKey. A keyed HubSpot integration refreshes incrementally: each sync reads only the deals modified since the last one, so a deal that moves stage moves in the cube, and a deal deleted in HubSpot disappears from it. Without a key field every sync re-reads all deals and replaces the cube's data.

Switching Fields between Standard and All deal properties makes the next sync a full re-read.