Add referral properties, import ambassadors, and validate click + conversion attribution end-to-end.
Create custom properties so HubSpot can store each ambassador’s unique affiliate data.
Recommended properties
referral_code, referral_link, discount_code
Import the ambassador CSV and use personalization tokens in email templates/buttons.
Example token usage
Button URL:
{{ contact.referral_link }}
Text:
Share your link: {{ contact.referral_link }}Token syntax can vary by editor. The important part is inserting the referral_link property.
If you have HubSpot workflows that represent a conversion (e.g. deal stage changes, payments, bookings), use a webhook action (available on certain HubSpot plans) to report the conversion to Refer Labs.
Webhook format
POST https://referlabs.com.au/api/discount-codes/redeem
Headers:
Content-Type: application/json
x-pepf-discount-secret: <YOUR_SECRET>
Body:
{
"discountCode": "{{ contact.discount_code }}",
"orderReference": "HubSpot-{{ contact.hs_object_id }}",
"amount": "199.00",
"metadata": { "platform": "hubspot" }
}If you can’t send the secret from HubSpot securely, post from your own server instead.
Use /status to verify configuration + connectivity.
referral_link as your CTA.