mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Website: Update CRM records created in custom hook (#28461)
Changes: - Updated the Historical event crm records created by the website's custom hook to include an `Event_type__c` value and to not set a `Visited_on__c` timestamp.
This commit is contained in:
parent
adfcde7c6f
commit
1df3270545
1 changed files with 1 additions and 3 deletions
4
website/api/hooks/custom/index.js
vendored
4
website/api/hooks/custom/index.js
vendored
|
|
@ -322,8 +322,6 @@ will be disabled and/or hidden in the UI.
|
|||
loginUrl : 'https://fleetdm.my.salesforce.com'
|
||||
});
|
||||
await salesforceConnection.login(sails.config.custom.salesforceIntegrationUsername, sails.config.custom.salesforceIntegrationPasskey);
|
||||
let today = new Date();
|
||||
let nowOn = today.toISOString().replace('Z', '+0000');
|
||||
let websiteVisitReason;
|
||||
if(req.session.adAttributionString && this.req.session.visitedSiteFromAdAt) {
|
||||
let thirtyMinutesAgoAt = Date.now() - (1000 * 60 * 30);
|
||||
|
|
@ -339,7 +337,7 @@ will be disabled and/or hidden in the UI.
|
|||
Contact__c: recordIds.salesforceContactId,// eslint-disable-line camelcase
|
||||
Account__c: recordIds.salesforceAccountId,// eslint-disable-line camelcase
|
||||
Page_URL__c: `https://fleetdm.com${req.url}`,// eslint-disable-line camelcase
|
||||
Visited_on__c: nowOn,// eslint-disable-line camelcase
|
||||
Event_type__c: 'Website page view',// eslint-disable-line camelcase
|
||||
Website_visit_reason__c: websiteVisitReason// eslint-disable-line camelcase
|
||||
});
|
||||
}).intercept((err)=>{
|
||||
|
|
|
|||
Loading…
Reference in a new issue