16

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.

Sathish
  • 327
  • 1
  • 3
  • 5

3 Answers3

5

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.)

Quinxy von Besiex
  • 976
  • 11
  • 21
3

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

Raj Nandan Sharma
  • 3,694
  • 3
  • 32
  • 42
2

Update: This is no longer possible as of October 2018.

AMAZON.LITERAL is deprecated as of October 22, 2018. Older skills built with AMAZON.LITERAL do continue to work, but you must migrate away from AMAZON.LITERAL when you update those older skills, and for all new skills.

You can use the AMAZON.LITERAL slot type to capture freeform text. Amazon recommends providing sample phrases, but according to this thread, you may be able to get away with not providing them.

Jack
  • 2,750
  • 2
  • 27
  • 36
  • Thank you Jack. I've tried making changes to ASK to literal, How ever it is only considering the words are approximately matching Utterance. – Sathish Apr 07 '16 at 09:08
  • 2
    The AMAZON.LITERAL is going away November 30, 2016 (https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/migrating-to-the-improved-built-in-and-custom-slot-types#replacing-literal-with-custom-slot-types) – Quinxy von Besiex Sep 29 '16 at 06:33
  • 1
    Slight correction to @QuinxyvonBesiex. AMAZON.LITERAL isn't going away but its use will make it so you can't publish your skill. It's still useable for non-published skills. [more information can be found here](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/alexa-skills-kit-interaction-model-reference#literal-slot-type-reference) – Ryaminal Sep 30 '16 at 22:50
  • 1
    @Ryaminal Is that an important distinction? (I'm not being argumentative, just curious.) – Quinxy von Besiex Oct 01 '16 at 11:21
  • 3
    @QuinxyvonBesiex I think it's important. If you are just going to make a skill for yourself or just your company and never plan to publish the skill on the Alexa "Store" then it might be good to know that you can still get the entire message. An unpublished skill is only available to the dev account associated, but you can either share the account on the Alexa account or make multiple dev accounts and copy the skill. – Ryaminal Oct 03 '16 at 02:46
  • 2
    As of January 2017, `AMAZON.LITERAL` is not deprecated anymore: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/alexa-skills-kit-interaction-model-reference#literal – julien_c May 04 '17 at 11:20
  • 2
    _Based on developer feedback, the `AMAZON.LITERAL` slot is not being removed as previously described. You can continue to submit new and updated English (US) skills with `AMAZON.LITERAL`. However, in many cases, custom slot types provide better accuracy than `AMAZON.LITERAL`, so we recommend that you consider migrating to custom slot types if possible._ – Lars Trieloff Jun 08 '17 at 17:24