Skip to main content

GET /deals/attribution-insights

Returns aggregated attribution insights across your closed-won deals. Use this endpoint to understand the engagement scoring patterns associated with pipeline milestones, and to identify which event types are most strongly correlated with closed business.

When to Use This

  • Calibrate scoring thresholds: Compare your current engagement level thresholds against the average scores leads had at each pipeline milestone (MQL, SQL, Opportunity, Close).
  • Validate scoring rule weights: Confirm that the event types driving the most pipeline value carry appropriate weights in your scoring rules.
  • Build custom reporting: Pull attribution insights into your own BI tools or dashboards for executive-level pipeline analysis.

Authentication

Required: Yes. Use a Personal Access Token or a Service Account credential.

Request

Endpoint: GET /deals/attribution-insights

Headers:

Accept: application/json

Example:

curl -u "CLIENT_ID:CLIENT_SECRET" \
-H "Accept: application/json" \
"https://your-instance.com/deals/attribution-insights"

Query Parameters

No query parameters are required. Results are automatically scoped to your active Organizational Unit.

Response

Success Response

Status: 200 OK

FieldTypeDescription
closed_won_dealsintegerTotal number of closed-won deals in the active OU
avg_score_at_mqlnumber or nullAverage engagement score at the Marketing Qualified Lead milestone across closed-won deals. Null if no milestone scores have been recorded yet.
avg_score_at_sqlnumber or nullAverage engagement score at the Sales Qualified Lead milestone. Null if no milestone scores have been recorded yet.
avg_score_at_opportunitynumber or nullAverage engagement score when leads entered an active opportunity. Null if no milestone scores have been recorded yet.
avg_score_at_closenumber or nullAverage engagement score at the point deals closed won. Null if no milestone scores have been recorded yet.
top_event_typesarrayEvent types most associated with closed-won pipeline, ordered by total points (highest first). Up to 10 entries.
top_event_types[].event_typestringThe event type identifier (e.g. demo_request, page_view)
top_event_types[].deal_countintegerNumber of distinct closed-won deals in which this event type appeared
top_event_types[].total_pointsintegerTotal points attributed to this event type across all contacts in closed-won deals

Example Response:

{
"closed_won_deals": 42,
"avg_score_at_mql": 28.5,
"avg_score_at_sql": 51.2,
"avg_score_at_opportunity": 68.0,
"avg_score_at_close": 84.7,
"top_event_types": [
{
"event_type": "demo_request",
"deal_count": 38,
"total_points": 4200
},
{
"event_type": "page_view",
"deal_count": 42,
"total_points": 3150
},
{
"event_type": "email_open",
"deal_count": 31,
"total_points": 1900
}
]
}

Common Errors

StatusMeaningSolution
401UnauthorizedCheck your API credentials
403ForbiddenEnsure your account has access to deal data
500Server ErrorRetry later or contact support if the issue persists

Important Notes

Organizational Unit (OU) Scoping

All results are scoped to your active Organizational Unit. Only closed-won deals associated with leads in that OU are included. Set your active OU via POST /org-units/active before calling this endpoint.

Data Requirements

Milestone scores (avg_score_at_mql, avg_score_at_sql, etc.) are only populated for deals where kenbun recorded the lead's score at those pipeline stages. Deals closed before kenbun was connected, or before score history was available, may not contribute to these averages. When no milestone data exists, these fields return null rather than zero.

Average Score Calculation

Average milestone scores are calculated across all contacts linked to closed-won deals, not per deal. If a single deal has multiple associated contacts, each contact's score contributes independently to the average. This gives a portfolio-level view of engagement patterns rather than a per-deal summary.

See Also