Built for startups,
scaled for unicorns
Successfully submitted!
Error! Please try again
When your referral program generates leads, you need to track those leads all the way through your sales pipeline to the closed deal. HubSpot deal attribution lets you connect the dots between a GrowSurf referral and the revenue it generates, giving you clear ROI metrics for your referral program.
This guide shows you how to automatically attribute HubSpot deals to their referral source using GrowSurf data. You'll learn how to create referral-attributed deals, track them through your pipeline stages, and build revenue reports that prove the financial impact of your referral program to stakeholders.
Add custom properties to your HubSpot deal records that link each deal back to its referral source.
deal_referral_source (Dropdown: GrowSurf, Partner, Organic)deal_referrer_email (Single-line text)deal_referrer_name (Single-line text)deal_referral_id (Single-line text β GrowSurf referral ID)deal_referral_campaign (Single-line text)When a referred contact converts in GrowSurf, automatically create a deal in HubSpot associated with that contact.
CAMPAIGN_REFERRAL_CONVERTED webhookLink the referrer as an associated contact on the deal so your sales team can see who made the referral and potentially involve them in the sales process.
Create a HubSpot report that shows referral-attributed deals at each pipeline stage, giving you a visual funnel for referral revenue.
deal_referral_source equals "GrowSurf"Build comparison reports that show how referral deals perform against other lead sources.
deal_referral_sourceWhen a referral-attributed deal is marked as "Closed Won" in HubSpot, automatically trigger the referrer's reward in GrowSurf.
deal_referral_source = "GrowSurf"POST /v2/campaign/{id}/participant/{participantId}/convert// Create a referral-attributed deal in HubSpot
async function createReferralDeal(referredContact, referrer, referralData) {
// Create the deal
const deal = await hubspotClient.crm.deals.basicApi.create({
properties: {
dealname: `Referral: ${referredContact.email}`,
pipeline: 'default',
dealstage: 'qualifiedtobuy',
amount: '',
deal_referral_source: 'GrowSurf',
deal_referrer_email: referrer.email,
deal_referrer_name: `${referrer.firstName} ${referrer.lastName}`,
deal_referral_id: referralData.referralId,
deal_referral_campaign: referralData.campaignId
}
});
// Associate deal with the referred contact
await hubspotClient.crm.deals.associationsApi.create(
deal.id, 'contacts', referredContact.hubspotId,
[{ associationCategory: 'HUBSPOT_DEFINED', associationTypeId: 3 }]
);
// Associate deal with the referrer contact
await hubspotClient.crm.deals.associationsApi.create(
deal.id, 'contacts', referrer.hubspotId,
[{ associationCategory: 'USER_DEFINED', associationTypeId: 'referrer' }]
);
return deal;
}
// Webhook from HubSpot when deal closes
app.post('/api/hubspot-deal-closed', async (req, res) => {
const { dealId, properties } = req.body;
if (properties.deal_referral_source === 'GrowSurf') {
// Trigger reward in GrowSurf
const referralId = properties.deal_referral_id;
await fetch(
`https://api.growsurf.com/v2/campaign/${CAMPAIGN_ID}/participant/${referralId}/convert`,
{
method: 'POST',
headers: { 'Authorization': `Bearer ${GROWSURF_API_KEY}` }
}
);
}
res.json({ success: true });
});Nothing proves referral program ROI better than showing actual closed revenue attributed to referrals. Build a monthly executive report that shows total referral pipeline value, closed referral revenue, and referral deal win rates compared to other channels.
For high-value B2B deals, consider looping the referrer into the sales process. They can provide warm introductions, share their experience with the prospect, and help overcome objections. Your sales team can see the referrer's contact info directly on the deal record.
Instead of flat rewards, tie referral rewards to deal value. Use the HubSpot deal amount to calculate percentage-based rewards (e.g., 10% of first-year contract value) and trigger the appropriate reward tier in GrowSurf when the deal closes.
Use HubSpot's multi-touch attribution if available on your plan. Set the referral as the "first touch" or "originating source" while still crediting other marketing touches. The deal_referral_source property preserves the referral attribution regardless of other interactions.
Yes. If a deal was created before the referral data was synced, you can update the deal's referral properties via HubSpot's API or manually in the UI. Just update the custom properties with the referrer's information and GrowSurf referral ID.
That depends on your business rules. You can either attribute all deals from a referred contact to the original referrer, or only attribute the first deal. Implement your chosen rule in the deal creation logic by checking if a referral-attributed deal already exists for that contact.
Trusted by marketing and product teams at fast-growing B2C, fintech, and SaaS companies
