I want to receive a dollar amount in my utterance. So, for example, if I ask Alexa:
Send $100.51 to Kroger.
(pronounced, One hundred dollars and fifty one cents) I want to receive the value 100.51
in a proper slot.
I have tried searching and I defined my utterance slots like this:
"slots": [
{
"name": "Amount",
"type": "AMAZON.NUMBER"
}
]
But on JSON input I only get this result:
"slots": {
"Amount": {
"name": "Amount",
"value": "?"
}
}
How can I make Alexa accepts currency values?
To edit a slot, log in to your account and go to the Created sign ups area. Click the pencil icon next to the sign up you wish to edit. From the Slots tab, locate the slot for which you wish to edit the quantity.
As mentioned before, the SlotMachine component helps us to easily set up a slot machine. The main part to get a SlotMachine to work is to specify its model and delegate properties. The model is responsible for providing the data for filling the reels of the slot machine with items. We already used the SlotMachineModel to configure our symbols.
When you enter the Number Wanted for a slot, you are choosing the number of people you want to sign up for the item. For example, if you want one person to bring 24 napkins, your slot should read "24 pack of napkins" with a Number Wanted of one selected.
You Can Create Your Own Currency. Here’s How You Can Create Your Own Currency. Here’s How Today I made a trillion dollars. Not bad for an investment of about $200. But I own 1 trillion of the clem token and it has a value of 1 USDc token, which is worth $1. QED I am a trillionaire.
I'm a bit confused by what you wrote in your last sentence and the code, but I'll confirm that there is no built-in intent or slot for handling currency.
So, you'll have to do it manually using AMAZON.NUMBER slot type as you seem to be trying.
I would imagine that you will want to create utterences with two AMAZON.NUMBER slots - one for dollars and one for cents.
Easy, make a custom slot and just use $10.11, $.03, and $1003.84 as the sample's. It will work as currency now, accepting users dollars and cents utterances and converting them to a dollar $XX.XX format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With