Website: Update Salesforce helepr to set an an Owner ID on all new records. (#19609)

Changes:
- Updated the update-or-create-contact-and-account helper to always set
the integrations admin user as the owner of new accounts and contact
records created.
This commit is contained in:
Eric 2024-06-09 15:00:55 -05:00 committed by GitHub
parent 518e5f4087
commit 1fac823fa9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,6 +103,7 @@ module.exports = {
} else {
// If no existing account record was found, create a new one.
// Create a timestamp to use for the new account's assigned date.
salesforceAccountOwnerId = '0054x00000735wDAAQ';// « "Integrations admin" user.
let today = new Date();
let nowOn = today.toISOString().replace('Z', '+0000');
@ -117,6 +118,7 @@ module.exports = {
Website: enrichmentData.employer.emailDomain,
LinkedIn_company_URL__c: enrichmentData.employer.linkedinCompanyPageUrl,// eslint-disable-line camelcase
NumberOfEmployees: enrichmentData.employer.numberOfEmployees,
OwnerId: salesforceAccountOwnerId
});
salesforceAccountId = newAccountRecord.id;
}//fi