question

gregorypierce avatar image
gregorypierce asked

Anyone capturing serial numbers?

I am trying to build a skill where I can capture a series of letters or numbers but its not clear how I would accomplish this with the provided slot types. There was a previous note about LITERAL potentially going away, but I can think of no other way to capture a series of letters or numbers given the way the slots are setup.

alexa skills kitskillhow-toslots
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jenn@amazon avatar image
Jenn@amazon answered

It's been an ongoing challenge to capture a series of Numbers and Letters accurately via any voice technology. The solutions I've seen involve a fairly complex Interaction Model.

You could do something like:

(Assuming the Serial Number is 5 characters long)

Create a Custom Slot with each Letter -> LETTER

a.
b.
c.
<etc>

Intent:

{
  "intents": [
    {
      "intent": "SerialIDIntent",
      "slots": [
        {
          "name": "number1",
          "type": "AMAZON.NUMBER"
        },
	{
          "name": "number2",
          "type": "AMAZON.NUMBER"
        },
	{
          "name": "number3",
          "type": "AMAZON.NUMBER"
        },
        {
          "name": "letter1",
          "type": "LETTER"
        },
	{
          "name": "letter2",
          "type": "LETTER"
        },
	{
          "name": "letter3",
          "type": "LETTER"
        }
      ]
    }

Utterances:

SerialIDIntent {letter1}{letter2}{letter3}{number1}{number2}{number3}
SerialIDIntent {number1}{letter1}{number2}{letter2}{number3}{letter3}
SerialIDIntent {number1}{number2}{number3}{letter1}{letter2}{letter3}
<etc>
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.