Having some challenges with collecting monetary amounts in Autopilot. I have a task called GIVE where people are texting "Give" and then autopilot replies with "How much?" using a collect action with type = Twilio.NUMBER. The following is happening:
Person: Give
Autopilot: How much?
Person: .99
Value ends up being 99 (wrong)
Person: Give
Autopilot: How much?
Person: 1.99
Value ends up being 1.99 (correct)
Person: Give
Autopilot: How much?
Person: $1.99
Value ends up being 199 (wrong)
So it seems if the decimal is first it gets dropped, and if a dollar sign is first it and the decimal gets dropped. It only works properly if it starts with a number. I sorta get the logic in that, but it makes it really hard to collect monetary amounts.
Here is the relevant code in the task:
"collect": {
"name": "gift_amount",
"questions": [
{
"question": "How much would you like to give?",
"name": "gift_amount",
"type": "Twilio.Number"
}
],
"on_complete": {
"redirect": {
"method": "POST",
"uri": "https://blah.blah"
}
}
Any thoughts? Ideally there would be a field type of Twilio.CURRENCY or something like that.