From a6c09cb5f4626c450f0fcedaaa6510c62638f34f Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 26 Apr 2024 09:13:46 -0500 Subject: [PATCH] Website: Update update-or-create-contact-and-account helper (#18565) Changes: - Updated the `salesforce/update-or-create-contact-and-account` helper to not to try to use `enrichementData.employer.emailDomain` if an `organization` was provided. --- .../helpers/salesforce/update-or-create-contact-and-account.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/api/helpers/salesforce/update-or-create-contact-and-account.js b/website/api/helpers/salesforce/update-or-create-contact-and-account.js index 38cd7d5204..016e1ad32e 100644 --- a/website/api/helpers/salesforce/update-or-create-contact-and-account.js +++ b/website/api/helpers/salesforce/update-or-create-contact-and-account.js @@ -73,7 +73,7 @@ module.exports = { await salesforceConnection.login(sails.config.custom.salesforceIntegrationUsername, sails.config.custom.salesforceIntegrationPasskey); let salesforceAccountId; - if(!organization && !enrichmentData.employer){ + if(!enrichmentData.employer || !enrichmentData.employer.emailDomain) { // Special sacraficial meat cave where the contacts with no organization go. // https://fleetdm.lightning.force.com/lightning/r/Account/0014x000025JC8DAAW/view salesforceAccountId = '0014x000025JC8DAAW';