Scheduling infrastructure for absolutely everyone.
fix: Salesforce owner check, handle no contact email (#17834)
Joe Au-Yeungaea8588a212a
diff --git a/packages/app-store/_utils/CRMRoundRobinSkip.ts b/packages/app-store/_utils/CRMRoundRobinSkip.tsindex b0a58e63831..6c44bfef5ba 100644--- a/packages/app-store/_utils/CRMRoundRobinSkip.ts+++ b/packages/app-store/_utils/CRMRoundRobinSkip.ts@@ -23,7 +23,7 @@ export async function getCRMContactOwnerForRRLeadSkip(const contact = await crmManager.getContacts({ emails: bookerEmail, forRoundRobinSkip: true });const endTime = performance.now();logger.info(`Fetching from CRM took ${endTime - startTime}ms`);- if (!contact?.length || !contact[0].email) return nullReturnValue;+ if (!contact?.length || !contact[0].ownerEmail) return nullReturnValue;return { email: contact[0].ownerEmail ?? null, recordType: contact[0].recordType ?? null, crmAppSlug };}