GithubHelp home page GithubHelp logo

alexa-samples / skill-sample-nodejs-salesforce Goto Github PK

View Code? Open in Web Editor NEW
31.0 20.0 50.0 101 KB

This project demonstrates how to build an Alexa private skill that integrates with your Salesforce data, utilizing account linking and a personal voice code.

License: MIT No Attribution

JavaScript 100.00%

skill-sample-nodejs-salesforce's Introduction

Private Alexa Skill With Salesforce Integration

Salesforce SetupDeployAccount LinkingTestingDistribute Private Skills

Introduction

This skill demonstrates how to build a private Alexa skill to access Salesforce data. It includes using account linking, via a connected app in Salesforce, along with a voice code confirmation process that stores the code as a custom setting in Salesforce. Then, you can access opportunities and make updates to them using your voice.

Pre-requisites

This is a NodeJS Lambda function and skill defintion to be used by ASK CLI.

You need to initialize ASK CLI with

$ ask init

You need an AWS account and an Amazon developer account to create an Alexa Skill.

In order to use the ASK CLI features to automatically deploy and manage your Lambda skill, ensure that you have AWS credentials set up with the appropriate permissions on the computer to which you are installing ASK CLI, as described in Set Up Credentials for an Amazon Web Services (AWS) Account.

Clone or download this repository. Then you need to download NodeJS dependencies :

$ (cd lambda/custom && npm install)

You need a Salesforce Trailhead Playground.

Objectives

Together, we'll build a skill that is invoked with the name Salesforce Demo.

Alexa, open Salesforce Demo

Let's get started!

  1. Salesforce Setup - Set up a Salesforce org using Trailhead Playground.
  2. Deploy - Customize and deploy the provided skill.
  3. Account Linking - Create a Connected App in Salesforce to use for Account Linking to the Alexa skill.
  4. Testing - Make sure everything works.
  5. Distribute Private Skills - Learn about Alexa for Business and how to distribute private skills.

Get Started

skill-sample-nodejs-salesforce's People

Contributors

akersh-s avatar dependabot[bot] avatar ericchenmou avatar hyandell avatar jbnunn avatar letmypeoplecode avatar podlogar avatar ryanjlowe avatar shrej avatar sleepydeveloper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skill-sample-nodejs-salesforce's Issues

Older version file structure

As ASK has migrated to v2 from v1, there are many changes. This project is created in ASK CLI v1 and follow the v1 file structure. Now a days ASK CLI v2.1.1 is available and by default user download this version. And once they try to deploy project they face missing root directory information.

InvalidSlotTypeName

I am getting the following error while using the ask deploy for my application.

-------------------- Update Skill Project --------------------
Skill Id: <hidden>
Skill deployment finished.
Call update-model error.
Error code: 400
{
  "message": "Interaction model is not valid.",
  "violations": [
    {
      "message": "InvalidSlotTypeName: Slot type name \"AMAZON.SearchQuery\" is invalid. The name of a custom slot type must begin with an alphabetic character and can consist only of alphabetic characters or underscores."
    }
  ]
}

Is this something related to the code in the repo? I have been trying to fix the issue using the JSON editor on my Alexa Skills dashboard but it won't work. I found a similar problem on the Salesforce forum but it has no solution.

"message": "Request to skill endpoint resulted in an error."

When npm install -g ask-cli is run , got below warning and after that not able to stimulate the skillId . Check the version of Lambda function and ask CLI , both of them are having latest version . Is there any work around we need to do .

npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This module has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version of hapi to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).

NodeJS 6.10 runtime deprecation causes stack rollback

Deploying the Serverless App Repo project as-is results in an error during stack creation due to the recent Lambda runtime deprecation:

The runtime parameter of nodejs6.10 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs8.10) while creating or updating functions. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 24019e8b-8f67-11e9-b68f-XXXXXX)

Correcting the Runtime parameter in the Lambda function definition in the stack template to target a newer runtime fixes this, i.e. Runtime: nodejs10.x or Runtime: nodejs8.10 .

Alexa Skill Create issue - Create role error. IncompleteSignature: 'Access' not a valid key=value pair

Hi,

I am getting below error while creating a skill and lambda function using ask CLI.
-------------------- Update Skill Project --------------------
Skill Id: amzn1.ask.skill.1448a776-c5d6-48bf-aa37-04a66e0047d1
Skill deployment finished.
Model deployment finished.
Create role error.
IncompleteSignature: 'Access' not a valid key=value pair (missing equal-sign) in Authorization header: 'AWS4-HMAC-SHA256 Credential=AWS Access Key ID [None]: AKIAJNDTH37XADHXZQ5A/20180813/us-east-1/iam/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=bf7f8f2bd8e3c4640d5ebc606face547c8068f18646e4daa11e7486225c0ce09'

Node Version : 8,11.3
NPM : 5.6.0
Am I missing something?

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.