fleet/website/api/controllers/view-contact.js
Eric 2807bd6b3e
Website: update contact page personalization (#18332)
Related to: #18099
Changes:
- Updated the contact page to show a different message depending on
answers a user provided in the /start questionnaire.
- For users who have Fleet deployed already: "Schedule a personalized
demo for your team and get support or training."
- For users who have tried Fleet and are ready to deploy: "Let us help
you deploy and evaluate Fleet quickly for yourself. We’d love to save
you some time."
  -
2024-04-16 14:55:53 -05:00

41 lines
602 B
JavaScript
Vendored

module.exports = {
friendlyName: 'View contact',
description: 'Display "Contact" page.',
inputs: {
sendMessage: {
type: 'boolean',
description: 'A boolean that determines whether or not to display the talk to us form when the contact page loads.',
defaultsTo: false,
},
},
exits: {
success: {
viewTemplatePath: 'pages/contact'
}
},
fn: async function ({sendMessage}) {
let formToShow = 'talk-to-us';
if(sendMessage) {
formToShow = 'contact';
}
// Respond with view.
return {
formToShow,
};
}
};