Skip to content



violet-samples is a list of example voice app/bot scripts (powered-by violet-conversations). This project is configured to create a skill at the einstein end point.

Deploy Script Notes
Deploy scripts/basicCalculator.js Basic Arithmetic Calculator
Deploy scripts/financeCalculator.js Split bills, calculate tips & find out how many payments will need to be made on a mortgage
Deploy scripts/sf-leadsAndOpportunities.js Access your Salesforce Sales Leads and Opportunities
Deploy scripts/sf-cases-employee.js Access your Salesforce Service Cases (for employees)
Deploy scripts/sf-cases-customer.js Access your Salesforce Service Cases (for customers)
Deploy scripts/sf-knowledge-base.js Search a Salesforce Knowledge Base
Deploy apps/todo/script.js Manage your todo list powered by Quip
Deploy scripts/diabetes-stoplight.js Diabetes support at home for patients by implementing Stoplight tool
Deploy apps/restaurants/script.js A sophisticated tool to help you find restaurants close by powered by the Yelp API
apps/dfSessions/script.js An event information kiosk (built for Dreamforce)

Table Of Contents

Getting Started

This project contains a number of Scripts that we have built and can be used as the basis of your Voice Application. To use the Scripts, they need to run in the cloud so that Amazon's voice servers can access it. These can also be run locally via a non-voice (web-only) interface.


  • Install Node v6 or greater - if you need to maintain an older version of node, consider using nvm.

  • Get the code: If you want the latest fixes, we would recommend to get this via git: git clone You can alternatively get the latest release.

  • Download dependencies: npm install

  • Environment variables: If you are using the Salesforce integration plugin (as used by the Leads & Opportunities Script) you will need to set up variables (for more information see the Persistence plugin information).

  • Run locally: node <path_to_script> (the script will print the path to the url for the web interface).

    You can also run the full server by doing: npm start but you will need to setup the SCRIPT_NAME environment variable so that the engine knows which script to run (the default value is ../scripts/sf-leadsAndOpportunities.js).

    Local execution is used to ensure that there are no syntax errors, to view intent schemas (for the interaction model) and supported utterances, as well as for testing the script logic.


The code already has a Procfile so it is easy to deploy to heroku). When deploying make sure to configure the environment variables on the deployed server. Heroku lets you do this by typing something similar to (you will need to use the right values for XXX):

heroku create
git push heroku master

Once deployed you will be able to use the web interface to register the skill on Amazon's or Google's services.


The code here has been setup to run with eslint. It can be be run by doing:

  • npm run lint - lints the scripts folder
  • npm run lint:watch - watches changes in the script folder and runs lint on change
  • npm run lint:watch:changed - similar to lint:watch but only lints on the file changed.


Guidelines on contributing to Violet are available here.


Sample for Voice Apps/Bots using Voilet



Code of conduct

Security policy





No releases published


No packages published