From 1fac823fa9496e7f8ad666582149048517342c0b Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 9 Jun 2024 15:00:55 -0500 Subject: [PATCH] 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. --- .../helpers/salesforce/update-or-create-contact-and-account.js | 2 ++ 1 file changed, 2 insertions(+) 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 3388a161fb..891d69154d 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 @@ -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