Alexa-skills-kit-sdk-for-nodejs: How to Identify Which Device has requested a Custom Skill

Created on 3 Dec 2017  路  5Comments  路  Source: alexa/alexa-skills-kit-sdk-for-nodejs

Hi Experts,

I am writing a custom Alexa Skill and I need Alexa-Skill API in Lambda to know who has invoked custom skill.

For example:-
I have created one ProductID:- SampleDevice in Amazon Developers account.
Now, I have registered 3 different Devices with Serial Numbers, 0001,0002,003. I have created one custom Skill named "MyCustomSkill". So now each of these devices can invoke my custom skill.

So I need some Alexa-Skill API in Lambda to identify which device has invoked MyCustomSkill.

Regards
Sandy

All 5 comments

Hi, @sandeepajesh ,
In the request your skill received, there is a 'deviceId' (context-> System-> device -> deviceId) that can recognize which device has invoked the skill. See this for more information.

The DeviceId is not the same as the Device Serial no and hence knowing the deviceId will not help. Any Suggestion on mapping the device serial no to the deviceId received in the alexa skill?

Why don't you create 'MappingIntent'?

for example,

slot: serialno - AMAZON.FOUR_DIGIT_NUMBER
Sample Utterance: connect my echo to {serialno}

Using dynamoDB, you can put the mapping data - serial no and device id in the Lambda function.

It is good idea where we can ask Customer to put the Serial No through let's say mappingIntent. However given that serial No is known ahead of time, I am wondering whether there is a way of getting that mapping done without asking the DSN from the customer.

Is there a way of knowing the device type in a skill? Like knowing that the request came from a Bose headphones vs an Echo show?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lostvicking picture lostvicking  路  4Comments

captnCC picture captnCC  路  6Comments

slesem picture slesem  路  4Comments

rmtuckerphx picture rmtuckerphx  路  5Comments

z4o4z picture z4o4z  路  3Comments