Skip to content

Conversation

@rm-camp-17
Copy link

No description provided.

claude and others added 6 commits January 11, 2026 22:15
- HubSpot card UI extension (platformVersion 2025.2)
  - Deal sidebar card for referral management
  - React-based UI with company/program/session selection
  - Referral creation and status updates

- Vercel Next.js API backend
  - HubSpot API integration layer
  - Endpoints for companies, programs, sessions, referrals
  - Association and batch read helpers

- Comprehensive documentation
  - Full README with architecture and setup
  - Quick start guide for 15-min deployment
  - API endpoint documentation
  - Troubleshooting guide

Project structure supports:
- Custom object associations (Program, Session, Referral)
- Deal-to-Company-to-Program-to-Session flow
- Outreach status and client interest tracking
- Configurable via environment variables
Build referral builder module for HubSpot API
Updates the Camp Referral Builder to use the correct 2025.02 HubSpot
property schema with the following improvements:

Backend changes:
- Update property names: referral_status (was referral_outreach_status),
  client_interest (was referral_client_interest)
- Add support for all new properties: previously_sent_to_camp,
  referral_name, copied_from_deal_key, copied_from_year, email tracking
- Implement robust upsert logic: search for existing referrals by key
  to prevent duplicates
- Add dynamic association type ID fetching instead of hardcoded values
- Add helper functions for searching objects by property
- Add GET /api/referrals/properties endpoint to fetch enum definitions
- Auto-populate referral_name, copied_from_deal_key, and
  copied_from_year on create

Frontend changes:
- Load property dropdown options dynamically from API
- Fix property names in Save button (referral_status, client_interest)
- Add Content-Type: application/json header to API requests
- Clear form completely after successful create
- Show create vs update message based on response
- Load property definitions on component mount

Documentation:
- Update README with 2025.02 schema changes section
- Document all new properties and their purposes
- Update API endpoint documentation
- Add new properties endpoint to API docs
- Update environment variable examples
…schema-LNO3X

feat: Update referral builder to 2025.02 HubSpot schema
…downs

This commit addresses three key issues:

1. Fix create referral submit error:
   - Created new /api/deals/[dealId]/context endpoint to fetch deal's associated companyId
   - Updated ReferralBuilderCard.tsx to fetch and use dealCompanyId on load
   - Submit blocked until dealId and companyId are available
   - Show user-facing warning if deal has no associated company

2. Add referral_status and client_interest dropdowns:
   - Added two Select dropdowns to the "Add referral" form
   - Values included in payload to /api/referrals/create
   - Properties written to referral object in HubSpot
   - Leverages existing API support (no changes to route.ts needed)

3. Program/session dropdown labels:
   - Verified APIs already return { id, name } objects
   - UI already displays name as label, uses id as value
   - No code changes needed (APIs were already correct)

Files modified:
- NEW: vercel-api/src/app/api/deals/[dealId]/context/route.ts
- MODIFIED: hubspot-card/src/app/cards/ReferralBuilderCard.tsx
- NEW: referral-builder/TEST_CHECKLIST.md
- NEW: referral-builder/CHANGES.md
…ation-6dCfN

feat: Fix HubSpot referral creation flow and add status/interest drop…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants