Get Started with Violet
In this project, you’ll:
- Learn how voice applications can enhance the Salesforce experience.
- Set up your computer to run your voice application locally.
- Build a voice application using the Violet project.
So you’ve decided to host a game night. You just got off a call with a good friend who’s going to help, and you’ve got a rough idea of how the night can go. But you want to take note of the details.
You decide to turn to a virtual assistant/smart speaker and ask it to help you organize your game night. After answering a few questions and within a few short minutes, your game night is organized. This is just one example of a voice application and is what we will build today.
A voice application is an application built for a voice interaction, such as an Alexa Skill or a Google Action. In our case, Violet is designed to let you create voice applications for any voice platform that also links back to your Salesforce instance. Violet provides a conversational engine that abstracts away the complexity of implementation and enables developers to focus on the business logic and conversational flow.
Violet works by helping you split your business logic while managing your conversational flows. There are two main concepts.
- The first concept builds out the idea of menus, where users can make a series of potentially nested decisions.
- The second concept is the idea of a form, where users need to provide a number of inputs as a dialog.
Our application today is a basic voice script, but you can see just how simple it is to get started making voice applications.
Violet is a node app on Heroku. To complete this project, you need to have Node v6.x installed.
Now you need to create a new folder on your Desktop called
Once you have node and npm installed and your Violet-App folder, you need to initialize a node project and install Violet. You can do this by opening Terminal (Mac) or Command Prompt (Windows) and typing:
npm init -y
npm install violet --save
It takes a moment to install, but once it’s done you see
+ email@example.com. This means the npm violet package was successfully installed. The x.x.x refers to your version.
Please leave your terminal/command prompt open for the future steps of this project. Now that you’ve successfully set up your environment, you’re ready to get started on building your app.