I think I must be missing something simple here. I am trying to find a way to create conditional collect statements in the task.
I created a simple Autopilot task that is asking for a gift amount (gift_amount). In the training screen, I setup one of the phrases as "Give {gift_amount}". So someone should be able to say "Give" and it will then ask for an amount. Or, they can say "Give 10" and it should skip asking for an amount. It always seems to ask for the amount though, even if I give it in the phase. Here is the task code I created.
{
"actions": [
{
collect": {
"name": "gift_amount",
"questions": [
{
"question": "Thank for your generosity. How much would you like to give?",
"name": "gift_amount",
"type": "Twilio.NUMBER"
}
],
"on_complete": {
"redirect": {
"method": "POST",
"uri": "https://webhook.site"
}
}
}
}
]
}