Using Alexa Capabilities within an Alexa skills - alexa

Alexa is able to find service providers and also call them. Is it possible to use this capability from an Alexa skill. For example could an Alexa skill find and call a near-by doctor upon request?

The direct calling and search features of Alexa are not available currently within a custom skill, however you could achieve this your by using 3rd party APIs.
For example you can look up local businesses using the Yelp API and connect and connect a call using a Twilio API. You may want to register the user’s mobile number for this particular example.
It should also be noted that the features available in the Amazon SDK are always being updated. So it may be added in the future.

Related

What is a good way to deploy/reference Alexa Skills on my website

I have built a Alexa Skill, but for now it only works for Alexa Device.
I wonder if that is possible I can deploy/reference the Alexa Skill in my website (only text or voice part)?
One use case:
User can say "i am born in xx/xx/xxxx", and Alexa can capture the intent "CaptureBirthdayIntent", so that my website code (Python) can address the intent.
I found many CMS (e.g. Wordpress, Drupal) can do this: https://medium.com/#OPTASY.com/how-to-integrate-alexa-with-your-drupal-8-website-a-step-by-step-guide-5a76c1d74a88. But I am not using those CMS.
It also seems like Alexa Voice Service can do this.
Can anyone give me some reference?
In most cases, you'll need to use Account Linking, which is an API where the customer links their account at your website and their account with Alexa, and then you'll have a unique ID for the customer that is the same in both your skill and your external app (and is unique to that link between them), so you can sync data between them using a database.
https://developer.amazon.com/en-US/docs/alexa/account-linking/understand-account-linking.html
You can create your own unique OAuth 2 provider at your web app or use Login with Amazon, Login with Google, Facebook, AWS Cognito... Having your own OAuth provider can make it way easier to get a customer linked and not have them give up, because adding in third parties (LwA, Google, FB, AWS) adds extra logins/authorizations to complete the process.
You can use Dialogflow to do this. Make a chatbot with similar intents and map the endpoint to Alexa endpoints and should work. I am sure you can easily work it out if you have made an Alexa skill.

ALexa API to create intents and utterances

Is there any API to create intents and utterances in alexa from a third party system like "Magento".
Any help would be highly appreciated.
Check Voice Apps and Invocable
These are 3rd party online tools to help you build and publish Alexa Skills with drag and drop facility. You can easily create intents, slots and add utterances.
I think you're looking for Alexa Skill Management API (SMAPI). This is official and You'll need to create a Amazon app to use it. All details can be found here
SMAPI provides RESTful HTTP interfaces for programmatically performing Alexa skill management tasks, such as creating a new skill or updating an interaction model.
You'll can first create a Skill using the above API, then create/update intents and slots using Interaction Model Management. To do this you'll need to be comfortable with Interaction Model Schemas and a sample Scheme can be found here

Creation of additional commands for Alexa Smart Home Skills

For my project is ideally suited Smart Home Skill from Amazon. Tell me please, can I add additional commands (eg turn left, close door, show last video etc.) or only commands which are presented on this page (link) is available to me?
I have in the lambda function my commands but Alexa only recognizes standard. I have studied the documentation, but I did not find the information about how to Smart Home Skill, can add additional commands. But also I didn't find the information that it cannot be done.
Through the Smart Home Skill, only the designated actions are available.
To create an expanded feature set, create a custom skill. It will require the user to use the skill name (e.g. Alexa, ask my service to turn left) as part of the activation.
Note, depending on your use case, you could do both to cover all needs.
Update triggered from comment:
With this approach, you are building two skills. A Smart Home skill and traditional Alexa Skill. They will each have their own entry points into your code. The Smart Home Skill is usually a subset of features in your Alexa skill.
The Home Skill requires implementation as an AWS Lambda, so it would probably be easier to build the ASK front end for both skills in AWS. My solution started as an ASK skill prior to the availability of the Home Skill so my architecture is different.
For me, I route all Home skill requests through the AWS Lambda (mostly just the sample shell code) and then to my hosted service that performs the actual function and builds the appropriate ASK response. So, the Lambda logic is mostly just a proxy/wrapper for my code hosted elsewhere.
The number of "directives" available through the Smart Home Skill API is regularly increasing. At this time only Amazon can create new directives, but, as noted this list is growing.
Three weeks ago Amazon completely revamped the developer documentation for the Alexa Smart Home Skill API (and added new directives). You can find the updated landing pages with overview info here:
https://developer.amazon.com/alexa/smart-home/build
Updated reference material is here:
https://developer.amazon.com/docs/smarthome/smart-home-skill-api-message-reference.html

How to amazon alexa api for a web or mobile app?

I want to use amazon alexa api for my website/ mobile application. I would like to know if it is possible to use and how to integrate alexa, given that I develop my custom skill.
You can use the Alexa Voice Service. You will need to collect the user's audio and then submit it to Amazon. The voice snippet does not need to contain the hotword (e.g. Alexa). You should be able to use most features that don't involve the device and aren't asynchronous. For example, you can utilize the alarm or timer features nor the music streams.
It sounds like you are asking how to allow the user to talk to your website or mobile app.
An Alexa custom skill is something you create to extend Alexa's vocabulary, so to speak. It isn't an alternative to using a mouse or keyboard with an existing app.
A website and a mobile app are, or can be, two different ways for a user to access the functionality you provide. Think of an Alexa skill as a 3rd way to access that functionality. A user could ask the Alexa device (Echo, Dot, iPhone Lexi app, etc) to get or perform the same things that your website does.
So for example, if your website explains how your widgets work, then you could create a widget Alexa skill that would allow Alexa user's to ask about your widgets.
The Alexa Voice Service is something entirely different. It is an API to enable adding Alexa voice to a different piece of hardware. For example, my friend Thaddeus created an Alexa Voice Service app called Lexi that runs on an iPhone. This allows a user to talk to Alexa using their iPhone. However, it doesn't add any new capability to Alexa. It only allows me to do things on my iPhone that I can already do on my Echo.

Showing Google Analytics Data in real time

I would like to show number of visitors on a site since beginning of the month, number of users on the current day and currently on site.
I have Google Analytics installed, I tried to solve this issue with Embed API by enabling Google Analytics API from developer console - but I requires user authorization, etc.
What would be the easiest way to show analytics on-site without user authentication and accepting access by Embeded API, etc. Application is written in Angular, so Javascript API is the one I look for.
Thank you for any suggestion.
Authorization has to happen in order to get the data you want. Either you can let visitors to your site authorize themselves, or you'll have to authorize server-side on their behalf.
Once authorized, you can do something similar to what the Third Party Visualization Embed API demo shows. It uses a custom ActiveUsers Embed API component and includes the source code to show how it works.
Whether you use the ActiveUsers component or not, the basic gist is that once the users is authenticated via the Embed API, you have access to the method gapi.client.analytics.data.realtime.get, which you can use to query this data.
Here's where that happens in the source code for the ActiveUsers component:
https://github.com/googleanalytics/ga-dev-tools/blob/master/src/javascript/embed-api/components/active-users.js#L69-L87
Authentication with the Analytics service is mandatory. But the OAuth 2.0 Service Accounts (for Server to Server Applications) can be used to automate it in many cases.
It's unclear to me (from a quick scan) if the Auth options of the Embeed API would work with the automated authentication scheme, you may want to go through the details.
You should be able to use the Analytics Core Reporting API and maybe the Analytics Real Time Reporting API (beta) which work with the automated authentication according to their guides (look for the Authorisation sections on the left frames of the respective guides).
Donno if this qualifies as easy, tho, YMMV :)

Resources