-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcollect_caller_information
More file actions
56 lines (56 loc) · 1.99 KB
/
Copy pathcollect_caller_information
File metadata and controls
56 lines (56 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
exports.handler = function(context, event, callback) {
const responseObject = {
"actions": [
{
"collect": {
"name": "collect_caller_information",
"questions": [
{
"question": "What is your first name?",
"name": "first_name",
"type": "Twilio.FIRST_NAME"
},
{
"question": "What is your last name?",
"name": "last_name",
"type": "Twilio.LAST_NAME"
},
{
"question": "What is your birthdate?",
"name": "birth_date",
"type": "Twilio.DATE"
},
{
"question": "What is your phone number?",
"name": "phone_number",
"type": "Twilio.NUMBER"
},
{
"question": "What city do you live in?",
"name": "residential_city",
"type": "Twilio.CITY"
},
{
"question": "What is your zip code?",
"name": "zip_code",
"type": "Twilio.NUMBER_SEQUENCE"
},
{
"question": "What is your house/building number?",
"name": "house_number",
"type": "Twilio.NUMBER"
},
{
"question": "What street and floor/apt. number do you live on? For example: North Salina St. Apt. B",
"name": "street_name"
}
],
"on_complete": {
"redirect": "https://straw-grouse-6193.twil.io/collect_on_complete"
}
}
}
]
};
callback(null, responseObject);
};