GithubHelp home page GithubHelp logo

isabella232 / violet-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from salesforce-misc/violet-samples

0.0 0.0 0.0 2.08 MB

Sample for Voice Apps/Bots using Voilet

Home Page: http://HelloViolet.ai/

License: BSD 3-Clause "New" or "Revised" License

JavaScript 97.64% HTML 2.36%

violet-samples's Introduction

violet-samples

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.

Setup

  • 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 [email protected]:salesforce/violet-samples.git. 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.

Deploying

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
heroku config:set SCRIPT_NAME=XXX V_SFDC_USERNAME=XXX V_SFDC_PASSWORD=XXX V_SFDC_CLIENT_ID=XXX V_SFDC_CLIENT_SECRET=XXX

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

Developing

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.

Contribution/Supporting

Guidelines on contributing to Violet are available here.

violet-samples's People

Contributors

dependabot[bot] avatar minerva18 avatar paulroth3d avatar redcoatmedia avatar svc-scm avatar vineet-sinha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.