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.
This commit is contained in:
Eric 2024-04-26 09:13:46 -05:00 committed by GitHub
parent 1b26129465
commit a6c09cb5f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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';