You are on page 1of 1

exports.

handler = function(context, event, callback) {


let questions = [
{
"questions": {
"say": "Hello ! How can I help you ? \n What is the cause of
damage?"
},
"name": "damageType",
"type": "damage"
},
{
"questions": {
"say": "Is the leak or water intrusion ongoing?"
},
"name": "waterleak",
"type": "Twilio.String"
}
];

let reponseObject = {
"actions" : [
{
"collect": {
"name": "ask_questions",
"questions": questions,
"on_complete": {
"say": "Thanks for your time"
}
}
}
]
};

callback(null, reponseObject);
};

You might also like