0

I have developed a Covid-19 Symptom Whatsapp Chatbot using Twilio. The bot basically asks users questions about key symptoms related to Covid-19.

Based on their answers, the bot has to give the users a summary/conclusion i.e. visit the doctor ASAP or call authorities.

My challenge is how to keep the answers to the questions and use them at the end of the survey in Studio. In normal programming i would keep the answers in variables then at the end check the variables and offer a conclusion. How can i implement this in Twilio Studio?

db100
  • 55
  • 10

2 Answers2

0

Twilio maintains the variable state throughput the flow. You can use the Set Variables Widget to consolidate all the variable in one place when you reference them or reference them from the individual widgets where the variables are collected (not so ideal).

Set Variables

You can use the Studio Execution logs, to see the JSON path and how to access the variable using {{liquid syntax}}.

Alan
  • 10,465
  • 2
  • 8
  • 9
0

you could easily retrieve the variables by referring to them with the syntax {{widgets.name_of_widget.inbound.body}}

you could send them out in a function widget and place them in parameters by inserting the above syntax as the VALUES, and make calculations there.

you call the parameters by event.KEY

Then you can refer back to them by {{widget.function_name.body}}

jack
  • 330
  • 3
  • 12