# Partner „Lead empfehlen“ (manual HubSpot submit)

**Last updated:** 2026-04-10

Partners can submit a prospect’s contact details from **`/partner/leads`** via the **Lead empfehlen** button. The browser calls **`POST /v2/api/affiliate-partner-refer-lead.php`** (session auth). The server submits to HubSpot **Forms API v3** using the dedicated form GUID `HUBSPOT_FORM_GUID_PARTNER_REFER_LEAD` (clone of the main demo form; share link decodes to the same GUID).

## Behaviour

- **Attribution:** `affiliate_partner_id` and `affiliate_referral_date` from the logged-in partner; fixed channel fields: `source__c` = `affiliate`, `utm_medium__c` = `referral`, `utm_campaign__c` = `ordio_loop_partner_referral`, `leadsource` = `referral`.
- **sign_up_type__c:** `Modal Formular` (same enum as demo modal); differentiation is via affiliate id, UTMs, and the `description` note.
- **Rate limit:** `AFFILIATE_PARTNER_REFER_LEAD_MAX_PER_DAY` per partner; counts in `v2/logs/affiliate-partner-refer-counts-YYYY-MM-DD.json` (gitignored).
- **Slack:** Non-blocking `lead_attributed` after HubSpot 200/204 (`channel_label` = Partnerempfehlung).

## Consent text (modal checkbox)

The **„Lead empfehlen“** checkbox is intentionally **short**; substantive rules for manual lead submission (authorization, B2B context, Ordio’s right to contact/process, link to privacy) are spelled out in **§4** of the [Partner-Vereinbarung](/partner/terms) (**„Übermittlung von Leads im Partner-Bereich“**). The checkbox links to the **Partner-Vereinbarung** and **Datenschutzerklärung** so the form stays scannable while remaining tied to binding terms.

Implementation: `v2/pages/partner-leads.php` (inline form). **Legal/Comms** should keep checkbox + terms paragraph aligned; update **Last reviewed** when signed off. **Last reviewed:** _[date]_ (placeholder).

## Troubleshooting

- **400/502 from HubSpot:** Compare field `name` values to the live form in HubSpot (clone must match `html/form-hs.php` payload shape).
- **Lead not in dashboard yet:** Cache sync can take up to ~1 hour; user copy reflects that.

## Related

- [PARTNER_UTM_AND_ATTRIBUTION.md](PARTNER_UTM_AND_ATTRIBUTION.md)
- `v2/api/affiliate-partner-refer-lead.php`
