Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to accept the Free form text as input to Amazon Skill Kit?

I'm required to create a Amazon Skill Kit to open a ticket in our ticketing tool. By looking at the examples for Amazon Skill Kit, I couldn't find a way of accepting the free form text as input. Other option is by creating a custom slot with all probable set of inputs as custom slot inputs.

But in my case, all i have to do is capture the full content of user input to log it somewhere in the ticket which is very unlikely to expect the probable utterances before hand.

like image 561
Sathish Avatar asked Mar 26 '16 18:03

Sathish


People also ask

How do I make a custom Alexa slot?

To add a new custom slot typeFrom the left-hand navigation, click Add next to Slot Types. Select the Create custom slot type option. Enter a name for the slot type and click Create custom slot type.

Are Amazon skills free?

All Alexa Skills are free, though some require a subscription service to unlock their full functionality. Unlike Google Home, which has a limited number of skills that are enabled on all units by default, Alexa Skills don't come preinstalled.

How do you fix there was a problem with the requested skill's response?

One simple way to debug this issue is copying the input JSON from Alexa skill simulator and paste it in the lambda's configure test events. Now run test and it'll generate all the error logs in the lambda itself, for your easy reference.


2 Answers

Correction to my comment... I, and others, may be misunderstanding the deprecation of the AMAZON.LITERAL. I found that custom slots still pass through literal content that did not match the predefined entries. If you have a custom slot with the entries "Bob" and "John" and I say "Samuel" my skill is still sent "Samuel". Which seems identical to previous AMAZON.LITERAL behavior. (AMAZON.LITERAL required you to provide example utterances, just as custom slots require to provide example utterances, so it seems only a difference in definition, not function.)

like image 108
Quinxy von Besiex Avatar answered Sep 23 '22 06:09

Quinxy von Besiex


As you think about what users are likely to ask, consider using a built-in or custom slot type to capture user input that is more predictable, and the AMAZON.SearchQuery slot type to capture less-predictable input that makes up the search query.

You can read more here

To get the value in your application you will have to this

event.request.intent.slots.IntentName.value

like image 27
Raj Nandan Sharma Avatar answered Sep 24 '22 06:09

Raj Nandan Sharma