HubSpot Deal Coach Integration
Step-by-step setup guide: install from HubSpot Marketplace, complete OAuth handshake, provision deal properties, and enable real-time AnyJev MEDDPICC qualification.
Zirnay Deal Coach installs natively into your HubSpot Sales Hub portal to provide real-time, AnyJev-calibrated MEDDPICC qualification and stage gating directly inside your deal records. This guide walks through authorization, scope permissions, automated property provisioning, custom card setup, and bi-directional writeback.
Architecture & Data Plane Flow
Deal Coach operates via a zero-latency headless bridge between HubSpot's CRM Extension framework and Zirnay's calibrated AnyJev decision engine:
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ HUBSPOT CRM DEAL RECORD VIEW │
│ [Deal Properties] [Center Record Timeline] [Right Sidebar Cards] │
│ - Amount: $185k - Gong Call #14 (42m) ┌──────────────────────┐ │
│ - Stage: Negotiation - Email: Legal Redline Received │ ⚡ Zirnay Deal Coach │ │
│ - Close Date: 11/30 - Meeting: VP Infra No-Show │ Grade: B [Gate: BC] │ │
└──────────────────────────────────────┬─────────────────────────┴──────────┬───────────┘ │
│ │ │
▼ ▼ │
┌─────────────────────────────────┐ │ │
│ OAuth 2.0 Bearer Credentials │ │ │
│ HubSpot App: zirnay_deal_coach │ │ │
└────────────────┬────────────────┘ │ │
│ │ │
▼ ▼ │
┌───────────────────────────────────────────────────────────────────────────────────────┐ │
│ ZIRNAY ANYJEV DECISION DATA PLANE (coach.zirnay.com) │ │
│ 1. Ingest Multi-Source Sales Evidence (Gong, Gmail, Calendar, Slack Connect) │ │
│ 2. Cross-examine rep assertions against customer evidence (4-round permutation) │ │
│ 3. Calculate Calibrated Probability & Expected Calibration Error (ECE < 0.021) │ │
│ 4. Volatile In-RAM Evaluation: Zero Raw Payload Retention (In-Memory Only) │ │
└──────────────────────────────────────┬────────────────────────────────────────────────┘ │
│ │
▼ (Bi-Directional Property Writeback) │
┌─────────────────────────────────────────────────────────────────────────────────────────┴┐
│ Updates Custom HubSpot Properties: │
│ • hs_deal_stage ➔ Gated from Commit to Best Case │
│ • zirnay_composite_grade ➔ "B" │
│ • zirnay_forecast_category ➔ "Best Case (InfoSec Blocked)" │
│ • zirnay_slippage_risk ➔ "HIGH" │
│ • zirnay_coaching_recommendation ➔ "Fast-track 45-day InfoSec queue with VP Infra" │
└──────────────────────────────────────────────────────────────────────────────────────────┘
1. Prerequisites
- HubSpot Account: HubSpot Sales Hub (Starter, Professional, or Enterprise).
- User Permissions: HubSpot Super Admin permissions or App Marketplace installation rights.
- Zirnay Platform Account: Active organization on Zirnay (or self-hosted Deal Coach instance).
- Domain Access: Outbound HTTPS access to
https://coach.zirnay.com(or your internal VPC proxy).
2. 1-Click Installation & OAuth 2.0 Handshake
Installing Zirnay Deal Coach takes under 60 seconds through HubSpot's standard OAuth 2.0 flow:
- Navigate to the HubSpot App Marketplace and search for "Zirnay Deal Coach", or initiate installation directly using the authorized install link:
- Select your target HubSpot portal from the organization selector.
- Review and accept the required scope permissions (detailed below).
- HubSpot redirects to
https://coach.zirnay.com/oauth/callbackwith the authorization code. The backend exchanges the code for encrypted access and refresh tokens, storing them securely in your dedicated tenant vault.
3. Configured OAuth Scopes & Security Boundaries
Deal Coach operates under the principle of least privilege. The following scopes are configured in app-hsmeta.json:
| HubSpot Scope | Access Level | Purpose in Deal Coach |
|---|---|---|
crm.objects.deals.read |
Read | Reads deal metadata: deal name, amount, close date, pipeline stage, and rep-asserted MEDDPICC attributes. |
crm.objects.deals.write |
Write | Updates custom inspection properties (zirnay_composite_grade, zirnay_slippage_risk) and writes back prescriptive coaching actions. |
crm.schemas.deals.read |
Read | Inspects HubSpot deal property definitions and ensures automatic schema alignment without schema conflicts. |
4. Automatically Provisioned Custom Deal Properties
Upon successful OAuth handshake, Zirnay automatically provisions custom deal properties under the zirnay_deal_coach property group in your HubSpot portal:
| Property Internal Name | Field Type | Allowed Values / Format | Description |
|---|---|---|---|
zirnay_composite_grade |
Single-line text | A+, A, A-, B+, B, C+, D | Objective deal qualification score computed by AnyJev. |
zirnay_forecast_category |
Dropdown select | Commit, Best Case, Pipeline, Omitted | Calibrated gate recommendation (mitigates "happy ears"). |
zirnay_slippage_risk |
Dropdown select | NONE, LOW, HIGH, CRITICAL | Identifies procurement delays, missing EB, or ARB bottlenecks. |
zirnay_calibrated_confidence |
Number | 0.000 to 1.000 | Softmax probability with Platt temperature scaling. |
zirnay_coaching_recommendation |
Multi-line text | Prescriptive coaching action | Specific next steps to mitigate identified deal blockers. |
zirnay_last_inspected_at |
Datetime | ISO 8601 Timestamp | Timestamp of most recent real-time AnyJev evaluation. |
5. Custom Deal Record Card Configuration (app-hsmeta.json)
The custom card is defined in the project manifest at apps/coach/zirnay-deal-coach/src/app/app-hsmeta.json:
{
"uid": "zirnay_deal_coach_app",
"type": "app",
"config": {
"name": "Zirnay Deal Coach",
"description": "AnyJev-calibrated MEDDPICC deal qualification and forecast gating",
"distribution": "marketplace",
"auth": {
"type": "oauth",
"redirectUrls": [
"https://coach.zirnay.com/oauth/callback",
"http://localhost:8002/oauth/callback"
],
"requiredScopes": [
"oauth",
"crm.objects.deals.read",
"crm.objects.deals.write",
"crm.schemas.deals.read"
]
},
"permittedUrls": {
"fetch": [
"https://api.hubapi.com",
"https://coach.zirnay.com"
]
},
"support": {
"supportEmail": "support@zirnay.com",
"documentationUrl": "https://coach.zirnay.com/docs"
}
}
}
6. Local Testing with HubSpot CLI
To test custom card rendering in your developer sandbox before pushing to production:
# 1. Install HubSpot developer CLI
npm install -g @hubspot/cli
# 2. Authenticate CLI with your HubSpot Developer Test Portal
hs init
# 3. Navigate to the project directory
cd apps/coach/zirnay-deal-coach
# 4. Start local hot-reloading development server
hs project dev
7. Live Deal Inspection API Invocation
You can test the AnyJev inspection engine directly from terminal or CI pipelines:
curl -X POST https://coach.zirnay.com/api/v1/inspect \
-H "Content-Type: application/json" \
-d '{
"deal_id": "deal_stripe_001",
"deal_name": "Stripe — Global SOC Deployment",
"amount": 185000.0,
"current_stage": "Negotiation / Validate",
"rep_asserted_meddpicc": {
"metrics": "GREEN",
"economic_buyer": "GREEN",
"paper_process": "GREEN",
"champion": "GREEN"
},
"activities": [
{
"source": "gong",
"title": "InfoSec Security Review Call #14",
"content": "Our vendor infosec questionnaire review takes 45 days minimum once formally queued."
}
]
}'
AnyJev evaluates this in 17.8ms, flags the 45-day paper process bottleneck as RED, and gates the deal to Best Case with prescriptive recommendations.
8. OpenTelemetry (OTel) Metrics & Monitoring
Deal Coach includes native OpenTelemetry metrics collection (/api/v1/telemetry/metrics) and Prometheus exposition (/metrics). Extension launches, inspection latencies, CRM writeback success rates, and exceptions are continuously monitored:
# TYPE zirnay_deal_coach_extension_launch_total counter
zirnay_deal_coach_extension_launch_total{crm="hubspot",status="success"} 1420
zirnay_deal_coach_extension_launch_duration_seconds 0.0178
zirnay_deal_coach_extension_sync_duration_seconds 0.3850
See live MEDDPICC scoring, gap cross-examination, and slippage risk arbitration in action.