mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Website: Update zapier webhook request in signup action. (#18648)
Closes: #18643 Changes: - Updated the response from the `updateOrCreateAccountAndContact` helper when running the website in a development environment. - Updated the Zapier webhook request in the signup action to send the contact and account IDs returned from the `updateOrCreateAccountAndContact` helper.
This commit is contained in:
parent
47362020ed
commit
a9f79eacd4
2 changed files with 7 additions and 2 deletions
4
website/api/controllers/entrance/signup.js
vendored
4
website/api/controllers/entrance/signup.js
vendored
|
|
@ -139,7 +139,7 @@ the account verification message.)`,
|
|||
.fetch();
|
||||
|
||||
|
||||
await sails.helpers.salesforce.updateOrCreateContactAndAccount.with({
|
||||
let recordIds = await sails.helpers.salesforce.updateOrCreateContactAndAccount.with({
|
||||
emailAddress: newEmailAddress,
|
||||
firstName: firstName,
|
||||
lastName: lastName,
|
||||
|
|
@ -155,6 +155,8 @@ the account verification message.)`,
|
|||
lastName,
|
||||
organization,
|
||||
signupReason,
|
||||
salesforceContactId: recordIds.salesforceContactId,
|
||||
salesforceAccountId: recordIds.salesforceAccountId,
|
||||
webhookSecret: sails.config.custom.zapierSandboxWebhookSecret,
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -47,7 +47,10 @@ module.exports = {
|
|||
fn: async function ({emailAddress, linkedinUrl, firstName, lastName, organization, primaryBuyingSituation, psychologicalStage}) {
|
||||
if(sails.config.environment !== 'production') {
|
||||
sails.log.verbose('Skipping Salesforce integration...');
|
||||
return;
|
||||
return {
|
||||
salesforceAccountId: undefined,
|
||||
salesforceContactId: undefined
|
||||
};
|
||||
}
|
||||
|
||||
require('assert')(sails.config.custom.salesforceIntegrationUsername);
|
||||
|
|
|
|||
Loading…
Reference in a new issue