question

newuser-16e91a62-e950-4db6-8d9e-fe31d67d38d3 avatar image

money or currency type for alexa?

I've been trying to get alexa to recognize dollars and cents with limited success. Amazon has a number slot type and list types for everything from Actors to Weather, but no money type. Is there any plans to add one or an example skill that accomplishes this?

alexa skills kitslotsinteraction model
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

Check out this Dollars and Cents sample. It's using node sdk v1, but it'll give you the general idea.

Interaction Model:

"intents": [
    {
      "intent": "DollarAmount",
      "slots": [
        {
          "name": "dollar",
          "type": "AMAZON.NUMBER"
        },
        {
          "name": "cents",
          "type": "AMAZON.NUMBER"
        }
      ]
    }

Utterances:

DollarAmount {dollar}
DollarAmount {dollar} dollars and {cents} cents
DollarAmount {dollar} dollars and {cents}
DollarAmount {dollar} dollars
DollarAmount {cents} cents
10 |5000

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