Open
Conversation
- 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…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.