Function: leadToFacilityContact()
leadToFacilityContact(
lead,companyId,facilityId): {company_id:string;string;facility_id:string;name:string;phone:string|null;role:"admin"; } |null
Defined in: src/lib/crm/pipeline.ts:54
The facility_contacts row to seed from the lead's primary contact, or null when the lead has no
usable contact (name + email are both required for a contact record).
Parameters
lead
companyId
string
facilityId
string
Returns
{ company_id: string; email: string; facility_id: string; name: string; phone: string | null; role: "admin"; } | null