├── .gitignore ├── index.js ├── Actions ├── say │ ├── say_goodbye.json │ ├── say_greeting.json │ ├── say_didnt_understand.json │ ├── say_task_switch.json │ ├── say_question.json │ └── templates.json ├── readme.md ├── show │ ├── show_text.json │ ├── templates.json │ ├── show_image_and_text.json │ └── show_text_and_say.json ├── redirect │ ├── redirect_to_task.json │ ├── redirect_to_url.json │ └── templates.json ├── remember │ ├── remember_user_first_name.json │ ├── remember_completion_status.json │ └── templates.json ├── listen │ ├── listen_everything.json │ ├── listen_selective.json │ └── templates.json ├── handoff │ ├── handoff_voice_task_router.json │ ├── handoff_voice_twiml_url.json │ ├── handoff_voice_twiml_url_status_callback.json │ ├── handoff_voice_task_router_all_parameters.json │ └── templates.json ├── collect │ ├── collect_yes_no_question.json │ ├── templates.json │ ├── collect_multi_question.json │ └── collect_single_question_validate.json └── index.js ├── Assistants ├── readme.md ├── insurance │ ├── Functions │ │ ├── insurance_auto_check_claim_status.js │ │ ├── insurance_auto_talk_to_representative.js │ │ ├── insurance_greeting.js │ │ ├── insurance_auto_file_claim.js │ │ ├── insurance_auto_get_insurance_quote.js │ │ └── insurance_auto_nps_survey.js │ ├── readme.md │ └── schema.json ├── templates.json ├── HelloWorld │ └── schema.json ├── RestaurantReservations │ └── schema.json ├── LeadQualification │ └── schema.json ├── DisneylandVacation │ └── schema.json ├── CustomerSatisfactionSurvey │ └── schema.json ├── EventBot │ └── schema.json ├── IntentBasedRouting │ └── schema.json ├── AirlineReservations │ └── schema.json ├── ApptScheduling │ └── schema.json └── RealEstate │ └── schema.json ├── Functions ├── readme.md ├── simple_response.js └── external_api_call.js ├── StyleSheets ├── readme.md ├── matthew.json ├── amy.json └── skater.json ├── package.json └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | export default { 2 | actions: require('./Actions') 3 | } 4 | -------------------------------------------------------------------------------- /Actions/say/say_goodbye.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "Goodbye!" 5 | } 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /Actions/readme.md: -------------------------------------------------------------------------------- 1 | Twilio Autopilot Actions Templates 2 | =========================== 3 | Templates for the different Autopilot Actions -------------------------------------------------------------------------------- /Actions/show/show_text.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "show": { 5 | "body": "Hello World!" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /Assistants/readme.md: -------------------------------------------------------------------------------- 1 | Twilio Autopilot Bot Templates 2 | =========================== 3 | Templates for creating Twilio Autopilot Bots 4 | -------------------------------------------------------------------------------- /Actions/redirect/redirect_to_task.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "redirect": "task://customer-satisfaction-survey" 5 | } 6 | ] 7 | } -------------------------------------------------------------------------------- /Functions/readme.md: -------------------------------------------------------------------------------- 1 | Twilio Autopilot Function Templates 2 | =========================== 3 | Templates for creating Twilio Autopilot Functions. -------------------------------------------------------------------------------- /Actions/remember/remember_user_first_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "remember": { 5 | "first_name":"Valentina" 6 | } 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /Actions/say/say_greeting.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "Hi, how can I help you today?" 5 | },{ 6 | "listen":true 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /Actions/listen/listen_everything.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "Hello! How can I help you?" 5 | }, 6 | { 7 | "listen": true 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /Actions/say/say_didnt_understand.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "Didn't catch that. Please repeat." 5 | },{ 6 | "listen":true 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /Actions/say/say_task_switch.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "Ok, I can help you with that instead." 5 | },{ 6 | "redirect": "task://task-name" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /Actions/say/say_question.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "You can get a refund or exchange for another item. What would you like to do?" 5 | },{ 6 | "listen":true 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /StyleSheets/readme.md: -------------------------------------------------------------------------------- 1 | Twilio Autopilot StyleSheets 2 | =========================== 3 | Autopilot StyleSheets define your virtual assistat's style including the tone and voice, error and success messages, and collect validation behavior. 4 | -------------------------------------------------------------------------------- /Actions/show/templates.json: -------------------------------------------------------------------------------- 1 | { 2 | "Show Image": { 3 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 4 | "shortDescription":"Display an image", 5 | "fileName" : "Actions/show/show_image.json" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Actions/redirect/redirect_to_url.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "redirect": { 5 | "uri": "https://example.com/actions", 6 | "method": "POST" 7 | } 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /Actions/remember/remember_completion_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "remember": { 5 | "open_account_step_1":"complete", 6 | "open_account_step_2":"complete", 7 | "open_account_step_3":"in_progress" 8 | } 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /Actions/show/show_image_and_text.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "show": { 5 | "body": "Twilio Owls", 6 | "images": [ { 7 | "label": "Original Owl", 8 | "url": "https://demo.twilio.com/owl.png" 9 | 10 | }] 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /Actions/show/show_text_and_say.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "show": { 5 | "body": "Booked: Table for 2 at 7pm." 6 | } 7 | },{ 8 | "say": { 9 | "speech": "You're all set. Please have your party of 2 arrive at 7pm." 10 | } 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Actions/handoff/handoff_voice_task_router.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "I'll connect you with an agent now." 5 | }, 6 | { 7 | "handoff": { 8 | "channel": "voice", 9 | "uri": "taskrouter://INSERT TASK ROUTER WORKFLOW SID" 10 | } 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Actions/handoff/handoff_voice_twiml_url.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "I'll connect you with an agent now." 5 | }, 6 | { 7 | "handoff": { 8 | "channel": "voice", 9 | "uri": "INSERT YOUR TWIML_URL HERE", 10 | "method": "POST" 11 | } 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /Actions/listen/listen_selective.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "Which would you like to do: continue shopping or check out?" 5 | }, 6 | { 7 | "listen": { 8 | "tasks": [ 9 | "search-for-product", 10 | "checkout" 11 | ] 12 | } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /Actions/handoff/handoff_voice_twiml_url_status_callback.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "I'll connect you with an agent now." 5 | }, 6 | { 7 | "handoff": { 8 | "channel": "voice", 9 | "uri": "INSERT YOUR TWIML_URL HERE", 10 | "method": "POST", 11 | "voice_status_callback_url": "INSERT STATUS_CALLBACK_URL HERE", 12 | "voice_status_callback_method": "POST" 13 | } 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /Actions/handoff/handoff_voice_task_router_all_parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "I'll connect you with an agent now." 5 | }, 6 | { 7 | "handoff": { 8 | "channel": "voice", 9 | "uri": "taskrouter://INSERT TASK ROUTER WORKFLOW SID", 10 | "wait_url": "INSERT TASK ROUTER WAIT URL", 11 | "wait_url_method": "GET", 12 | "action": "INSERT TASK ROUTER ACTION URL", 13 | "priority": "5", 14 | "timeout": "200" 15 | } 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /Actions/redirect/templates.json: -------------------------------------------------------------------------------- 1 | { 2 | "Redirect to a task": { 3 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 4 | "shortDescription":"Redirect to a task", 5 | "fileName" : "Actions/redirect/redirect_to_task.json" 6 | }, 7 | "Redirect to a URL": { 8 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 9 | "shortDescription":"Fetch JSON from a URL", 10 | "fileName" : "Actions/redirect/redirect_to_url.json" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Actions/collect/collect_yes_no_question.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "collect": { 5 | "name": "collect_comments", 6 | "questions": [ 7 | { 8 | "question": "Did you have any issues with your delivery today?", 9 | "name": "comments", 10 | "type":"Twilio.YES_NO" 11 | } 12 | ], 13 | "on_complete": { 14 | "redirect": { 15 | "uri":"https://example.com/collect", 16 | "method":"POST" 17 | } 18 | } 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /Actions/remember/templates.json: -------------------------------------------------------------------------------- 1 | { 2 | "Simple Remember": { 3 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 4 | "shortDescription":"Save any answer", 5 | "fileName" : "Actions/remember/remember_user_first_name.json" 6 | }, 7 | "Remember completion status": { 8 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 9 | "shortDescription":"Save completed steps", 10 | "fileName" : "Actions/remember/remember_completion_status.json" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Functions/simple_response.js: -------------------------------------------------------------------------------- 1 | exports.handler = function(context, event, callback) { 2 | 3 | let memory = JSON.parse(event.Memory); 4 | console.log("User Identifier: "+ event.UserIdentifier); 5 | console.log("Task: "+ event.CurrentTask); 6 | console.log(event); 7 | let message = "Hello from the Function!"; 8 | let responseObject = { 9 | "actions": [ 10 | { 11 | "say": message 12 | }] 13 | }; 14 | callback(null, responseObject); 15 | }; 16 | -------------------------------------------------------------------------------- /Actions/listen/templates.json: -------------------------------------------------------------------------------- 1 | { 2 | "Listen everything": { 3 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 4 | "shortDescription":"Listen and redirect to any task", 5 | "fileName" : "Actions/listen/listen_everything.json" 6 | }, 7 | "Listen selective": { 8 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 9 | "shortDescription":"Listen selectively and redirect to subset of tasks", 10 | "fileName" : "Actions/listen/listen_selective.json" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /StyleSheets/matthew.json: -------------------------------------------------------------------------------- 1 | { 2 | "style_sheet": { 3 | "name":"Matthew", 4 | "voice": { 5 | "say_voice": "Polly.Matthew" 6 | }, 7 | "collect": { 8 | "validate": { 9 | "on_failure": { 10 | "messages": [ 11 | { 12 | "say": "I didn't get that. What did you say?" 13 | }, 14 | { 15 | "say": "I still didn't catch that. Please repeat." 16 | }, 17 | { 18 | "say": "Let's try one last time. Say it again please." 19 | } 20 | ], 21 | "repeat_question": false 22 | }, 23 | "on_success": { 24 | "say": "" 25 | }, 26 | "max_attempts": 4 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@twilio/autopilot-templates", 3 | "version": "1.0.7", 4 | "description": "Autopilot templates", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/twilio/autopilot-templates.git" 12 | }, 13 | "keywords": [ 14 | "Twilio", 15 | "Autopilot", 16 | "templates" 17 | ], 18 | "author": "Twilio", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/twilio/autopilot-templates/issues" 22 | }, 23 | "homepage": "https://github.com/twilio/autopilot-templates#readme" 24 | } 25 | -------------------------------------------------------------------------------- /StyleSheets/amy.json: -------------------------------------------------------------------------------- 1 | { 2 | "style_sheet": { 3 | "name":"Amy", 4 | "voice": { 5 | "say_voice": "Polly.Amy" 6 | }, 7 | "collect": { 8 | "validate": { 9 | "on_failure": { 10 | "messages": [ 11 | { 12 | "say": "Pardon me, I did not understand you. No biggie. can you please say that again." 13 | }, 14 | { 15 | "say": "I'm sorry to ask, but, can you please repeat that" 16 | }, 17 | { 18 | "say": "Do you think it might be possible to say it one more time" 19 | } 20 | ], 21 | "repeat_question": false 22 | }, 23 | "on_success": { 24 | "say": "Lovely" 25 | }, 26 | "max_attempts": 4 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /StyleSheets/skater.json: -------------------------------------------------------------------------------- 1 | { 2 | "style_sheet": { 3 | "name":"Skater", 4 | "voice": { 5 | "say_voice": "Polly.Justin" 6 | }, 7 | "collect": { 8 | "validate": { 9 | "on_failure": { 10 | "messages": [ 11 | { 12 | "say": "Yo, that's not right, say that again" 13 | }, 14 | { 15 | "say": "you're bananas, that doesn't sound right to me. I'll give you one more chance" 16 | }, 17 | { 18 | "say": "I'm done with you this is your last chance, go ahead and say that again" 19 | } 20 | ], 21 | "repeat_question": false 22 | }, 23 | "on_success": { 24 | "say": "" 25 | }, 26 | "max_attempts": 4 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Actions/collect/templates.json: -------------------------------------------------------------------------------- 1 | { 2 | "Collect Yes No Question": { 3 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 4 | "shortDescription":"Yes / No question", 5 | "fileName" : "Actions/collect/collect_yes_no_question.json" 6 | }, 7 | "Collect multi-question": { 8 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 9 | "shortDescription":"Multiple questions", 10 | "fileName" : "Actions/collect/collect_multi_question.json" 11 | }, 12 | "Collect single question with validate": { 13 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 14 | "shortDescription":"Ask and validate answer", 15 | "fileName" : "Actions/collect/collect_single_question_validate.json" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Assistants/insurance/Functions/insurance_auto_check_claim_status.js: -------------------------------------------------------------------------------- 1 | exports.handler = function(context, event, callback) { 2 | let memory = JSON.parse(event.Memory); 3 | console.log("User Identifier: "+ event.UserIdentifier); 4 | console.log("Task: "+ event.CurrentTask); 5 | let claim_number = "2 3 4 2 3 7"; 6 | let car_make = "Lamborghini"; 7 | let car_model = "Diablp"; 8 | let car_year = "2007"; 9 | 10 | let message = "You have one active claim number "+claim_number+" for your "+car_year+" "+car_make+" "+car_model+". It has been accepted and is pending payment. Is there anything else I can help you with? "; 11 | let responseObject = { 12 | "actions": [ 13 | { 14 | "say": message 15 | },{ 16 | "listen":true 17 | }] 18 | }; 19 | callback(null, responseObject); 20 | }; -------------------------------------------------------------------------------- /Functions/external_api_call.js: -------------------------------------------------------------------------------- 1 | var got = require('got'); 2 | 3 | exports.handler = function(context, event, callback) { 4 | 5 | let memory = JSON.parse(event.Memory); 6 | console.log("User Identifier: "+ event.UserIdentifier); 7 | console.log("Task: "+ event.CurrentTask); 8 | console.log(event); 9 | 10 | 11 | got.get('https://icanhazdadjoke.com/', 12 | { 13 | headers: { 14 | 'accept': 'application/json' 15 | } 16 | }).then(function(response) { 17 | let apResponse = JSON.parse(response.body); 18 | console.log(apResponse); 19 | 20 | let message = apResponse.joke; 21 | let responseObject = { 22 | "actions": [ 23 | { 24 | "say": message 25 | }] 26 | }; 27 | callback(null, responseObject); 28 | }).catch(function(error) { 29 | callback(error) 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /Assistants/insurance/Functions/insurance_auto_talk_to_representative.js: -------------------------------------------------------------------------------- 1 | exports.handler = function(context, event, callback) { 2 | let memory = JSON.parse(event.Memory); 3 | console.log("User Identifier: "+ event.UserIdentifier); 4 | console.log("Task: "+ event.CurrentTask); 5 | console.log("Step: "+ memory.auto_file_claim_step); 6 | let message = ""; 7 | let responseObject = {}; 8 | let step = ""; 9 | 10 | memory.hasOwnProperty("auto_file_claim_step") ? step = memory.auto_file_claim_step : step = "0"; 11 | console.log("Auto Insurance Step: "+ step); 12 | 13 | message = "I'll connect you with an agent now. Please hold on"; 14 | responseObject = { 15 | "actions": [ 16 | { 17 | "say": message 18 | },{ 19 | "remember": { 20 | "escalation": "talk_to_agent" 21 | } 22 | },{ 23 | "handoff": { 24 | "channel": "voice", 25 | "uri": "taskrouter://"+memory.task_router_workflow_sid 26 | } 27 | } 28 | ]}; 29 | callback(null, responseObject); 30 | }; -------------------------------------------------------------------------------- /Assistants/insurance/Functions/insurance_greeting.js: -------------------------------------------------------------------------------- 1 | exports.handler = function(context, event, callback) { 2 | let memory = JSON.parse(event.Memory); 3 | console.log("User Identifier: "+ event.UserIdentifier); 4 | console.log("Task: "+ event.CurrentTask); 5 | 6 | let message = "Welcome to the Conversational Insurance Company. I'm your virtual assistant. How can I help you today?"; 7 | let responseObject = { 8 | "actions": [ 9 | { 10 | "remember": { 11 | "auto_get_insurance_step": "0", 12 | "auto_file_claim_step": "0", 13 | "auto_check_claim_status_step": "0", 14 | "auto_talk_to_representative_step": "0", 15 | "auto_nps_survey": "0", 16 | "task_router_workflow_sid": "XXXXXXXXXX" 17 | } 18 | }, 19 | { 20 | "say": message 21 | },{ 22 | "listen":true 23 | }] 24 | }; 25 | callback(null, responseObject); 26 | }; -------------------------------------------------------------------------------- /Assistants/insurance/Functions/insurance_auto_file_claim.js: -------------------------------------------------------------------------------- 1 | exports.handler = function(context, event, callback) { 2 | let memory = JSON.parse(event.Memory); 3 | console.log("User Identifier: "+ event.UserIdentifier); 4 | console.log("Task: "+ event.CurrentTask); 5 | console.log("Step: "+ memory.auto_file_claim_step); 6 | let message = ""; 7 | let responseObject = {}; 8 | let step = ""; 9 | 10 | memory.hasOwnProperty("auto_file_claim_step") ? step = memory.auto_file_claim_step : step = "0"; 11 | console.log("Auto Insurance Step: "+ step); 12 | 13 | message = "I will put you in touch with a claims specialist as soon as possible, please hold on"; 14 | responseObject = { 15 | "actions": [ 16 | { 17 | "say": message 18 | },{ 19 | "remember": { 20 | "escalation": "file_claim" 21 | } 22 | },{ 23 | "handoff": { 24 | "channel": "voice", 25 | "uri": "taskrouter://"+memory.task_router_workflow_sid 26 | } 27 | } 28 | ]}; 29 | callback(null, responseObject); 30 | }; -------------------------------------------------------------------------------- /Actions/say/templates.json: -------------------------------------------------------------------------------- 1 | { 2 | "Greeting": { 3 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 4 | "shortDescription":"Hello", 5 | "fileName" : "Actions/say/say_greeting.json" 6 | }, 7 | "Task Question": { 8 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 9 | "shortDescription":"Ask users what they want to do", 10 | "fileName" : "Actions/say/say_question.json" 11 | }, 12 | "Switch Task": { 13 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 14 | "shortDescription":"Switch task", 15 | "fileName" : "Actions/say/say_task_switch.json" 16 | }, 17 | "Goodbye": { 18 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 19 | "shortDescription":"Goodbye", 20 | "fileName" : "Actions/say/say_goodbye.json" 21 | }, 22 | "Didn't understand": { 23 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 24 | "shortDescription":"Fallback – Didn't understand", 25 | "fileName" : "Actions/say/say_didnt_understand.json" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Actions/collect/collect_multi_question.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "say": "Great! I can help you make a reservation. " 5 | }, 6 | { 7 | "collect": { 8 | "name": "make_reservation", 9 | "questions": [ 10 | { 11 | "question": "What's your first name?", 12 | "name": "first_name", 13 | "type": "Twilio.FIRST_NAME" 14 | }, 15 | { 16 | "question": "Which date would you like?", 17 | "name": "reservation_date", 18 | "type": "Twilio.DATE" 19 | }, 20 | { 21 | "question": "And, for what time?", 22 | "name": "reservation_time", 23 | "type": "Twilio.TIME" 24 | }, 25 | { 26 | "question": "How many people are in your party?", 27 | "name": "party_size", 28 | "type": "Twilio.NUMBER" 29 | }, 30 | { 31 | "question": "Got it. Any special requests?", 32 | "name": "special_requests" 33 | } 34 | ], 35 | "on_complete": { 36 | "redirect": { 37 | "method": "POST", 38 | "uri": "https://debt-great-5089.twil.io/deep_table" 39 | } 40 | } 41 | } 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /Actions/handoff/templates.json: -------------------------------------------------------------------------------- 1 | { 2 | "Handoff to Voice TwiML URL": { 3 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 4 | "shortDescription":"Pass to Voice TwiML URL", 5 | "fileName" : "Actions/handoff/handoff_voice_twiml_url.json" 6 | }, 7 | "Handoff to Voice TwiML URL with status callback": { 8 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 9 | "shortDescription":"Pass to Voice TwiML URL with status callback", 10 | "fileName" : "Actions/handoff/handoff_voice_twiml_url_status_callback.json" 11 | }, 12 | "Handoff to Voice Task Router Workflow": { 13 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 14 | "shortDescription":"Pass to Voice Task Router Workflow", 15 | "fileName" : "Actions/handoff/handoff_voice_task_router.json" 16 | }, 17 | "Handoff to Voice Task Router Workflow with all parameters": { 18 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 19 | "shortDescription":"Pass to Voice Task Router Workflow with all parameters", 20 | "fileName" : "Actions/handoff/handoff_voice_task_router_all_parameters.json" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Actions/collect/collect_single_question_validate.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "collect": { 5 | "name": "travel_questions", 6 | "questions": [ 7 | { 8 | "question": "Which city do you want to leave from: New York or San Francisco?", 9 | "name": "trip_start", 10 | "type": "Twilio.CITY", 11 | "validate": { 12 | "allowed_values": { 13 | "list": [ 14 | "New York", 15 | "NYC", 16 | "JFK", 17 | "San Francisco", 18 | "SF", 19 | "SFO" 20 | ] 21 | }, 22 | "on_failure": { 23 | "messages": [ 24 | { 25 | "say": "That isn't a city I recognize." 26 | }, 27 | { 28 | "say": "I didn't get that. SF and New York are the options." 29 | } 30 | ], 31 | "repeat_question": true 32 | }, 33 | "on_success": { 34 | "say": "Got it. I'll get started on an itinerary." 35 | }, 36 | "max_attempts": { 37 | "redirect": "task://having-trouble", 38 | "num_attempts": 3 39 | } 40 | } 41 | } 42 | ], 43 | "on_complete": { 44 | "redirect": "https://example.com/collect" 45 | } 46 | } 47 | } 48 | ] 49 | } 50 | -------------------------------------------------------------------------------- /Assistants/insurance/readme.md: -------------------------------------------------------------------------------- 1 | Twilio Autopilot Insurance Template 2 | =========================== 3 | Templates for creating Twilio Autopilot Assistants 4 | 5 | A command line interface for managing Twilio Autopilot. After installing you'll be able to: 6 | 7 | * Greet customers calling or texting in 8 | * Get an auto insurance quote 9 | * File a claim transfering to live agent on Flex 10 | * Get claim status 11 | * Talk to an human agent on Flex 12 | * Take NPS survey 13 | 14 | ## Installation 15 | First, make sure you have the Autopilot ClI installed: 16 | 17 | `sudo npm install -g @twilio/autopilot-cli` 18 | 19 | Then create an Assistant 20 | 21 | `ta create` 22 | 23 | Select `Conversational Insurance Company` template 24 | 25 | At this point, you should have the Assistant created in your account in the [Autopilot sectiion](https://www.twilio.com/console/autopilot/list). Lastly, you need to deploy the functions and connect them to your Autopilot tasks. 26 | 27 | #### Deploy the functions 28 | 29 | 1. Go to the Conversational Insurance Company templates functions directory 30 | 2. On a different tab, go to [Manage Functions](https://www.twilio.com/console/runtime/functions/manage). 31 | 3. Create a function for every funtion in the template. 32 | 33 | #### Configure the Autopilot Tasks to point to the functions 34 | 35 | 1. Go to the [Autopilot sectiion](https://www.twilio.com/console/autopilot/list) 36 | 2. Click on the InsuranceCo assistant and click on tasks 37 | 3. For each task, click 'program' and then select 'Actions URL' on the left. 38 | 4. Copy the function URL to the task Action URL field 39 | 5. Update the 'insurance_greeting.js' function to include the Flex Task Router workflow Sid, so that this Assistant can handpff to Flex 40 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | Twilio Autopilot Templates 2 | =========================== 3 | Templates for creating Twilio Autopilot Bots, Actions, StyleSheets, and Functions. 4 | 5 | ## About Twilio Autopilot 6 | Twilio Autopilot is a conversational AI platform to build AI-powered bots that can be deployed across Phone IVRs, messaging channels such as SMS, Whatsapp, FB Messeger or Slack, or Smart assistants such as Alexa and Google Assistant. 7 | 8 | You can find out more about Twilio Autopilot here: 9 | 10 | [Twilio Autopilot documentation](https://www.twilio.com/docs/autopilot) 11 | 12 | [Twilio Autopilot website](https://www.twilio.com/autopilot) 13 | 14 | [Twilio Autopilot Quest mission (Hands on learning)](https://www.twilio.com/quest/mission/30) 15 | 16 | 17 | ## Templates 18 | Templates provide samples for creating Twilio Autopilot Bots, Actions, StyleSheets, and Functions. 19 | 20 | #### Bots 21 | A bot is a conversational application designed to simulate conversation with human user using machine learning and natural language understanding. 22 | 23 | [Autopilot Assistants](https://www.twilio.com/docs/autopilot/api/assistant) 24 | 25 | #### Actions 26 | Autopilot Actions instruct an Autopilot virtual assistant how to perform a given Task. The templates provide examples of different ways to use actions to implement tasks and craft different conversational experiences. 27 | 28 | [Twilio Autopilot Actions](https://www.twilio.com/docs/autopilot/actions) 29 | 30 | #### StyleSheets 31 | StyleSheets enable you to give your Assistant a style by specifying its voice, error messages, success messages, and data collection validation behavior. 32 | 33 | The templates are the different personalities you can use for your virtual assistant or bot. 34 | 35 | [Autopilot StyleSheets](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) 36 | 37 | #### Functions 38 | The Function Templates provide examples of backend implementations for Autopilot Tasks using Twilio Serverless Functions. 39 | 40 | [Autopilot Function Library](https://www.twilio.com/docs/autopilot/function-library) 41 | 42 | NOTE: Templates are sample code that is provided as is. 43 | -------------------------------------------------------------------------------- /Assistants/insurance/Functions/insurance_auto_get_insurance_quote.js: -------------------------------------------------------------------------------- 1 | exports.handler = function(context, event, callback) { 2 | let memory = JSON.parse(event.Memory); 3 | console.log("User Identifier: "+ event.UserIdentifier); 4 | console.log("Task: "+ event.CurrentTask); 5 | console.log("Step: "+ memory.auto_get_insurance_step); 6 | let message = ""; 7 | let responseObject = {}; 8 | let step = ""; 9 | 10 | memory.hasOwnProperty("auto_get_insurance_step") ? step = memory.auto_get_insurance_step : step = "0"; 11 | console.log("Auto Insurance Step: "+ step); 12 | 13 | 14 | // implement the task by step 15 | if (step == "0") { 16 | message = "Great, I can help you get your Auto Insurance. I'll need to ask you a couple of questions about the car to get started."; 17 | responseObject = { 18 | "actions": [{ 19 | "remember": { 20 | "auto_get_insurance_step": "1" 21 | } 22 | },{ 23 | "say": message 24 | }, { 25 | "collect":{ 26 | "name":"get_insurance", 27 | "questions":[{ 28 | "question":"What make is your car?", 29 | "name":"car_make" 30 | }, { 31 | "question":"great, what model?", 32 | "name":"car_model" 33 | }, { 34 | "question":"what year?", 35 | "name":"car_year", 36 | "type":"Twilio.NUMBER" 37 | }, { 38 | "question":"ok that's all I need. What is the best email to send you the quote?", 39 | "name":"email", 40 | "type":"Twilio.EMAIL" 41 | }], 42 | "on_complete":{ 43 | "redirect":{ 44 | "uri":"https://"+context.DOMAIN_NAME+"/insurance_auto_get_insurance_quote", 45 | "method":"POST" 46 | } 47 | } 48 | } 49 | }] 50 | }; 51 | callback(null, responseObject); 52 | 53 | } else { 54 | console.log("step 1") 55 | // Confirm Auto insurance quote 56 | message = "We've sent your auto insurace quote for your 2007 Lamborghini Diablo to your email. Is there anything else I can help you with?"; 57 | responseObject = { 58 | "actions": [{ 59 | "remember": { 60 | "auto_get_insurance_step": "2" 61 | } 62 | },{ 63 | "say": message 64 | },{ 65 | "listen": true 66 | }] 67 | }; 68 | callback(null, responseObject); 69 | } 70 | }; 71 | -------------------------------------------------------------------------------- /Assistants/insurance/Functions/insurance_auto_nps_survey.js: -------------------------------------------------------------------------------- 1 | exports.handler = function(context, event, callback) { 2 | let memory = JSON.parse(event.Memory); 3 | console.log("User Identifier: "+ event.UserIdentifier); 4 | console.log("Task: "+ event.CurrentTask); 5 | console.log("Step: "+ memory.auto_nps_survey); 6 | let message = ""; 7 | let responseObject = {}; 8 | let step = ""; 9 | 10 | memory.hasOwnProperty("auto_nps_survey") ? step = memory.auto_nps_survey : step = "0"; 11 | console.log("Auto Insurance Step: "+ step); 12 | 13 | 14 | // implement the task by step 15 | if (step == "0") { 16 | responseObject = { 17 | "actions": [ 18 | { 19 | "remember": { 20 | "auto_nps_survey": "1" 21 | } 22 | }, 23 | { 24 | "say": "Before you leave, we would love to hear your feedback." 25 | }, 26 | { 27 | "collect": { 28 | "name": "take_survey", 29 | "questions": [ 30 | { 31 | "question": "Would you like to take a one minute survey?", 32 | "name": "survey", 33 | "type": "Twilio.YES_NO" 34 | }], 35 | "on_complete": { 36 | "redirect": { 37 | "method": "POST", 38 | "uri": "https://"+context.DOMAIN_NAME+"/insurance_auto_nps_survey" 39 | } 40 | } 41 | } 42 | }] 43 | }; 44 | callback(null, responseObject); 45 | 46 | } else if (step == "1") { 47 | console.log("step 1") 48 | // Confirm Auto insurance quote 49 | responseObject = { 50 | "actions": [ 51 | { 52 | "say": "Great!" 53 | }, 54 | { 55 | "remember": { 56 | "took_survey": "yes", 57 | "auto_nps_survey":"2" 58 | } 59 | }, 60 | { 61 | "collect": { 62 | "name": "nps_survey", 63 | "questions": [ 64 | { 65 | "question": "From 0 to 10, how likely would you recommend the Conversational Insurance Company Virtual Assistant to a friend?", 66 | "name": "nps", 67 | "type": "Twilio.NUMBER", 68 | "validate": { 69 | "on_failure": { 70 | "messages": [ 71 | { 72 | "say": "That didn't sound like a number from zero to ten. Please say that again." 73 | 74 | }, 75 | { 76 | "say": "I still didn't understand. Please say a number from 0 to 10." 77 | }], 78 | "repeat_question": true 79 | }, 80 | "on_success": { 81 | "say": "Great, thank you. We appreciate your feedback." 82 | }, 83 | "max_attempts": { 84 | "redirect": "task://having_trouble", 85 | "num_attempts": 3 86 | } 87 | } 88 | }, 89 | { 90 | "question": "What worked well for you and what can we do better?", 91 | "name": "feedback" 92 | }, 93 | { 94 | "question": "Where you able to do what you needed to do?", 95 | "name": "job_done", 96 | "type": "Twilio.YES_NO" 97 | }], 98 | "on_complete": { 99 | "redirect": { 100 | "method": "POST", 101 | "uri": "https://"+context.DOMAIN_NAME+"/insurance_auto_nps_survey" 102 | } 103 | } 104 | } 105 | }] 106 | }; 107 | callback(null, responseObject); 108 | } else { 109 | // Confirm Auto insurance quote 110 | responseObject = { 111 | "actions": [ 112 | { 113 | "say": "Thanks for your feedback. Call or text me when you need help. Bye!" 114 | }] 115 | }; 116 | callback(null, responseObject); 117 | } 118 | }; -------------------------------------------------------------------------------- /Actions/index.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | name: 'Say', 4 | description: 'Speak or text a message to users.', 5 | docUrl: 'https://www.twilio.com/docs/autopilot/actions/say', 6 | templates: [{ 7 | name: 'Greeting', 8 | description: 'Hello', 9 | example: require('./say/say_greeting') 10 | }, { 11 | name: 'Task Question', 12 | description: 'Ask users what they want to do', 13 | example: require('./say/say_question') 14 | }, { 15 | name: 'Switch Task', 16 | description: 'Switch task', 17 | example: require('./say/say_task_switch') 18 | }, { 19 | name: 'Didn\'t understand', 20 | description: 'Fallback – Didn\'t understand', 21 | example: require('./say/say_didnt_understand') 22 | }, { 23 | name: 'Goodbye', 24 | description: 'Goodbye', 25 | example: require('./say/say_goodbye') 26 | } 27 | ] 28 | }, 29 | { 30 | name: 'Collect', 31 | description: 'Ask questions and save answers from users.', 32 | docUrl: 'https://www.twilio.com/docs/autopilot/actions/collect', 33 | additionalDoc: { 34 | text: 'Field types', 35 | url: 'https://www.twilio.com/docs/autopilot/built-in-field-types' 36 | }, 37 | templates: [{ 38 | name: 'Collect Yes No Question', 39 | description: 'Yes / No question', 40 | example : require('./collect/collect_yes_no_question') 41 | }, { 42 | name: 'Collect multi-question', 43 | description: 'Multiple questions', 44 | example : require('./collect/collect_multi_question') 45 | }, { 46 | name: 'Collect single question with validate', 47 | description: 'Ask and validate answer', 48 | example: require('./collect/collect_single_question_validate') 49 | } 50 | ] 51 | }, 52 | { 53 | name: 'Listen', 54 | description: 'Wait for input from users.', 55 | docUrl: 'https://www.twilio.com/docs/autopilot/actions/listen', 56 | templates: [{ 57 | name: 'Listen everything', 58 | description: 'Listen and redirect to any task', 59 | example: require('./listen/listen_everything') 60 | }, { 61 | name: 'Listen selective', 62 | description: 'Listen selectively and redirect to subset of tasks', 63 | example: require('./listen/listen_selective') 64 | } 65 | ] 66 | }, 67 | { 68 | name: 'Redirect', 69 | description: 'Direct to a URL or another Task.', 70 | docUrl: 'https://www.twilio.com/docs/autopilot/actions/redirect', 71 | templates: [{ 72 | name: 'Redirect to a task', 73 | description: 'Redirect to a task', 74 | example: require('./redirect/redirect_to_task') 75 | }, { 76 | name: 'Redirect to a URL', 77 | description: 'Fetch JSON from a URL', 78 | example: require('./redirect/redirect_to_url') 79 | } 80 | ] 81 | }, 82 | { 83 | name: 'Handoff', 84 | description: 'Connect users to human agents.', 85 | docUrl: 'https://www.twilio.com/docs/autopilot/actions/hand-off', 86 | templates: [{ 87 | name: 'Handoff to Voice Task Router Workflow', 88 | description: 'Pass to Voice Task Router Workflow', 89 | example: require('./handoff/handoff_voice_task_router') 90 | }, { 91 | name: 'Handoff to Voice Task Router Workflow with all parameters', 92 | description: 'Pass to Voice Task Router Workflow with all parameters', 93 | example: require('./handoff/handoff_voice_task_router_all_parameters') 94 | }, { 95 | name: 'Handoff to Voice TwiML URL', 96 | description: 'Pass to Voice TwiML URL', 97 | example: require('./handoff/handoff_voice_twiml_url') 98 | }, { 99 | name: 'Handoff to Voice TwiML URL with status callback', 100 | description: 'Pass to Voice TwiML URL with status callback', 101 | example: require('./handoff/handoff_voice_twiml_url_status_callback') 102 | } 103 | ] 104 | }, 105 | { 106 | name: 'Remember', 107 | description: 'Store users’ info that will be reused.', 108 | docUrl: 'https://www.twilio.com/docs/autopilot/actions/remember', 109 | templates: [{ 110 | name: 'Simple Remember', 111 | description: 'Save any answer', 112 | example: require('./remember/remember_completion_status') 113 | }, { 114 | name: 'Remember completion status', 115 | description: 'Save completed steps', 116 | example: require('./remember/remember_user_first_name') 117 | } 118 | ] 119 | }, 120 | { 121 | name: 'Show', 122 | description: 'Display images and text on users’ screens.', 123 | docUrl: 'https://www.twilio.com/docs/autopilot/actions/show', 124 | templates: [{ 125 | name: 'Show Image and Text', 126 | description: 'Display an image and text', 127 | example: require('./show/show_image_and_text') 128 | }, { 129 | name: 'Show Text', 130 | description: 'Display text', 131 | example: require('./show/show_text') 132 | }, { 133 | name: 'Show Text and Say', 134 | description: 'Display text and speak', 135 | example: require('./show/show_text_and_say') 136 | } 137 | ] 138 | } 139 | ] 140 | -------------------------------------------------------------------------------- /Assistants/templates.json: -------------------------------------------------------------------------------- 1 | { 2 | "Hello World": { 3 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 4 | "folderName" : "HelloWorld", 5 | "conversationExample" : [{ 6 | "author": "user", 7 | "message" : "Hi" 8 | }, { 9 | "author": "bot", 10 | "message" : "Hello, what can I help you with today?" 11 | }, { 12 | "author": "user", 13 | "message" : "nothing" 14 | }, { 15 | "author": "bot", 16 | "message" : "Reach out anytime you need anything. Goodbye." 17 | }], 18 | "includeAsTemplate":false 19 | }, 20 | "Conversational Insurance Company": { 21 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 22 | "folderName" : "insurance", 23 | "conversationExample" : [], 24 | "includeAsTemplate":false 25 | }, 26 | "Deep Table Restaurant": { 27 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 28 | "folderName" : "RestaurantReservations", 29 | "conversationExample" : [], 30 | "includeAsTemplate":false 31 | }, 32 | "Airline Reservations": { 33 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 34 | "folderName" : "AirlineReservations", 35 | "conversationExample" : [], 36 | "includeAsTemplate":false 37 | }, 38 | "Appointment Scheduling": { 39 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 40 | "folderName" : "ApptScheduling", 41 | "conversationExample" : [{ 42 | "author": "user", 43 | "message" : "I want to make an appointment" 44 | }, { 45 | "author": "bot", 46 | "message" : "What date do you want to come in?" 47 | }, { 48 | "author": "user", 49 | "message" : "tomorrow" 50 | }, { 51 | "author": "bot", 52 | "message" : "Thanks, what time would you like to come in?" 53 | }], 54 | "includeAsTemplate":true 55 | }, 56 | "Customer Satisfaction Survey": { 57 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 58 | "folderName" : "CustomerSatisfactionSurvey", 59 | "conversationExample" : [{ 60 | "author": "bot", 61 | "message" : "How likely are you to recommend our service on a scale of 1 to 10?" 62 | }, { 63 | "author": "user", 64 | "message" : "9" 65 | }, { 66 | "author": "bot", 67 | "message" : "Thanks! And what is the primary reason for your score?" 68 | }, { 69 | "author": "user", 70 | "message" : "Answered my questions and offered a solution." 71 | }], 72 | "includeAsTemplate":true 73 | }, 74 | "Disneyland Vacation": { 75 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 76 | "folderName" : "DisneylandVacation", 77 | "conversationExample" : [], 78 | "includeAsTemplate":false 79 | }, 80 | "EventBot": { 81 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 82 | "folderName" : "EventBot", 83 | "conversationExample" : [], 84 | "includeAsTemplate":false 85 | }, 86 | "FAQs": { 87 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 88 | "folderName" : "FAQsInternetPlan", 89 | "conversationExample" : [{ 90 | "author": "user", 91 | "message" : "Hi" 92 | }, { 93 | "author": "bot", 94 | "message" : "Hello! I can answer questions about your internet plan." 95 | }, { 96 | "author": "user", 97 | "message" : "How do I cancel my plan?" 98 | }, { 99 | "author": "bot", 100 | "message" : "If you have an annual contract, you need to pay the remainder of your contract to cancel." 101 | }], 102 | "includeAsTemplate":true 103 | }, 104 | "Hospitality": { 105 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 106 | "folderName" : "Hospitality", 107 | "conversationExample" : [{ 108 | "author": "user", 109 | "message" : "I need towels" 110 | }, { 111 | "author": "bot", 112 | "message" : "How many would you like?" 113 | }, { 114 | "author": "user", 115 | "message" : "3 large towels" 116 | }, { 117 | "author": "bot", 118 | "message" : "Your items will be dropped off within 10 minutes. What else can I help you with?" 119 | }], 120 | "includeAsTemplate":true 121 | }, 122 | "Intent Based Routing": { 123 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 124 | "folderName" : "IntentBasedRouting", 125 | "conversationExample" : [{ 126 | "author": "user", 127 | "message" : "my product isn't working" 128 | }, { 129 | "author": "bot", 130 | "message" : "Thanks for contacting support. I'll connect you with a customer support representative." 131 | }], 132 | "includeAsTemplate":true 133 | }, 134 | "Lead Qualification": { 135 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 136 | "folderName" : "LeadQualification", 137 | "conversationExample" : [{ 138 | "author": "bot", 139 | "message" : "How many employees do you have?" 140 | }, { 141 | "author": "user", 142 | "message" : "45" 143 | }, { 144 | "author": "bot", 145 | "message" : "Last question. What's the best number to reach you to continue the conversation?" 146 | }, { 147 | "author": "user", 148 | "message" : "510-555-5555" 149 | }], 150 | "includeAsTemplate":true 151 | }, 152 | "Real Estate": { 153 | "gitUrl": "https://github.com/twilio/autopilot-templates.git", 154 | "folderName" : "RealEstate", 155 | "conversationExample" : [{ 156 | "author": "user", 157 | "message" : "Are pets allowed?" 158 | }, { 159 | "author": "bot", 160 | "message" : "Only cats are allowed." 161 | }], 162 | "includeAsTemplate":true 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /Assistants/HelloWorld/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "friendlyName" : "Basic starter template", 3 | "logQueries" : true, 4 | "uniqueName" : "HelloWorld", 5 | "defaults" : { 6 | "defaults" : { 7 | "assistant_initiation" : "task://greeting", 8 | "fallback" : "task://fallback", 9 | "collect" : { 10 | "validate_on_failure" : "task://collect_fallback" 11 | } 12 | } 13 | }, 14 | "styleSheet" : { 15 | "style_sheet" : { 16 | "collect" : { 17 | "validate" : { 18 | "on_failure" : { 19 | "repeat_question" : false, 20 | "messages" : [ 21 | { 22 | "say" : "I didn't get that. What did you say?" 23 | }, 24 | { 25 | "say" : "I still didn't catch that. Please repeat." 26 | }, 27 | { 28 | "say" : "Let's try one last time. Say it again please." 29 | } 30 | ] 31 | }, 32 | "on_success" : { "say" : "" }, 33 | "max_attempts" : 4 34 | } 35 | }, 36 | "voice" : { 37 | "say_voice" : "Polly.Matthew" 38 | } 39 | } 40 | }, 41 | "fieldTypes" : [], 42 | "tasks" : [ 43 | { 44 | "uniqueName" : "collect_fallback", 45 | "actions" : { 46 | "actions" : [ 47 | { 48 | "say" : "Looks like I'm having trouble. Apologies for that. Let's start again, how can I help you today?" 49 | }, 50 | { "listen" : true } 51 | ] 52 | }, 53 | "fields" : [], 54 | "samples" : [] 55 | }, 56 | { 57 | "uniqueName" : "fallback", 58 | "actions" : { 59 | "actions" : [ 60 | { 61 | "say" : "I'm sorry didn't quite get that. Please say that again." 62 | }, 63 | { "listen" : true } 64 | ] 65 | }, 66 | "fields" : [], 67 | "samples" : [] 68 | }, 69 | { 70 | "uniqueName" : "goodbye", 71 | "actions" : { 72 | "actions" : [ 73 | { 74 | "say" : "Thank you! Please reach out again if you need anything. Goodbye." 75 | } 76 | ] 77 | }, 78 | "fields" : [], 79 | "samples" : [ 80 | { 81 | "language" : "en-US", 82 | "taggedText" : "that's all for today" 83 | }, 84 | { 85 | "language" : "en-US", 86 | "taggedText" : "that is all thank you" 87 | }, 88 | { 89 | "language" : "en-US", 90 | "taggedText" : "no thanks" 91 | }, 92 | { 93 | "language" : "en-US", 94 | "taggedText" : "that would be all" 95 | }, 96 | { 97 | "language" : "en-US", 98 | "taggedText" : "that would be all thanks" 99 | }, 100 | { 101 | "language" : "en-US", 102 | "taggedText" : "no" 103 | }, 104 | { 105 | "language" : "en-US", 106 | "taggedText" : "no thanks" 107 | }, 108 | { 109 | "language" : "en-US", 110 | "taggedText" : "go away" 111 | }, 112 | { 113 | "language" : "en-US", 114 | "taggedText" : "cancel" 115 | }, 116 | { 117 | "language" : "en-US", 118 | "taggedText" : "goodbye" 119 | }, 120 | { 121 | "language" : "en-US", 122 | "taggedText" : "goodnight" 123 | }, 124 | { 125 | "language" : "en-US", 126 | "taggedText" : "stop talking" 127 | }, 128 | { 129 | "language" : "en-US", 130 | "taggedText" : "stop" 131 | }, 132 | { 133 | "language" : "en-US", 134 | "taggedText" : "see ya" 135 | }, 136 | { 137 | "language" : "en-US", 138 | "taggedText" : "bye bye" 139 | }, 140 | { 141 | "language" : "en-US", 142 | "taggedText" : "that's all" 143 | }, 144 | { 145 | "language" : "en-US", 146 | "taggedText" : "good bye" 147 | } 148 | ] 149 | }, 150 | { 151 | "uniqueName" : "greeting", 152 | "actions" : { 153 | "actions" : [ 154 | { 155 | "say" : "Hello, what can I help you with today?" 156 | }, 157 | { "listen" : true } 158 | ] 159 | }, 160 | "fields" : [], 161 | "samples" : [ 162 | { 163 | "language" : "en-US", 164 | "taggedText" : "Hi" 165 | }, 166 | { 167 | "language" : "en-US", 168 | "taggedText" : "good morning" 169 | }, 170 | { 171 | "language" : "en-US", 172 | "taggedText" : "good afternoon" 173 | }, 174 | { 175 | "language" : "en-US", 176 | "taggedText" : "hello" 177 | }, 178 | { 179 | "language" : "en-US", 180 | "taggedText" : "heya" 181 | }, 182 | { 183 | "language" : "en-US", 184 | "taggedText" : "hi there" 185 | }, 186 | { 187 | "language" : "en-US", 188 | "taggedText" : "hi!" 189 | }, 190 | { 191 | "language" : "en-US", 192 | "taggedText" : "Hello." 193 | }, 194 | { 195 | "language" : "en-US", 196 | "taggedText" : "hi there." 197 | }, 198 | { 199 | "language" : "en-US", 200 | "taggedText" : "what'us up" 201 | }, 202 | { 203 | "language" : "en-US", 204 | "taggedText" : "yo" 205 | }, 206 | { 207 | "language" : "en-US", 208 | "taggedText" : "hey" 209 | }, 210 | { 211 | "language" : "en-US", 212 | "taggedText" : "what can you do" 213 | }, 214 | { 215 | "language" : "en-US", 216 | "taggedText" : "what do you do" 217 | }, 218 | { 219 | "language" : "en-US", 220 | "taggedText" : "whatsup" 221 | }, 222 | { 223 | "language" : "en-US", 224 | "taggedText" : "sup" 225 | } 226 | ] 227 | } 228 | ], 229 | "modelBuild" : { "uniqueName" : "v0.1" } 230 | } 231 | -------------------------------------------------------------------------------- /Assistants/RestaurantReservations/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "friendlyName" : "deep-table-restaurant", 3 | "logQueries" : true, 4 | "uniqueName" : "deep-table-restaurant", 5 | "defaults" : { 6 | "defaults" : { 7 | "assistant_initiation" : "task://welcome", 8 | "fallback" : "task://fallback", 9 | "collect" : { 10 | "validate_on_failure" : "task://fallback" 11 | } 12 | } 13 | }, 14 | "styleSheet" : { 15 | "style_sheet" : { 16 | "voice" : { 17 | "say_voice" : "Polly.Salli" 18 | } 19 | } 20 | }, 21 | "fieldTypes" : [], 22 | "tasks" : [ 23 | { 24 | "uniqueName" : "welcome", 25 | "actions" : { 26 | "actions": [ 27 | { 28 | "say": 29 | { 30 | "speech" : "Welcome to Deep Table, the worlds smartest restaurant, I'm Deep Table's Virtual Assistant, I can tell you about todays special or help you make a reservation, What would you like to do today?" 31 | } 32 | }, 33 | { 34 | "listen": true 35 | } 36 | ] 37 | }, 38 | "fields" : [], 39 | "samples" : [] 40 | }, 41 | { 42 | "uniqueName" : "get-specials", 43 | "actions" : { 44 | "actions" : [ 45 | { 46 | "say": 47 | { 48 | "speech" : "Today's special is duck confit with roasted Brussels sprouts, super recommended, is there anything else I can help you with?" 49 | } 50 | }, 51 | { 52 | "listen": true 53 | } 54 | ] 55 | }, 56 | "fields" : [], 57 | "samples" : [ 58 | { 59 | "language" : "en-US", 60 | "taggedText" : "What's today's specials?" 61 | }, 62 | { 63 | "language" : "en-US", 64 | "taggedText" : "what is the special today" 65 | }, 66 | { 67 | "language" : "en-US", 68 | "taggedText" : "do you have a special today" 69 | }, 70 | { 71 | "language" : "en-US", 72 | "taggedText" : "what do you have for special today" 73 | }, 74 | { 75 | "language" : "en-US", 76 | "taggedText" : "I want today's special" 77 | }, 78 | { 79 | "language" : "en-US", 80 | "taggedText" : "dinner special" 81 | }, 82 | { 83 | "language" : "en-US", 84 | "taggedText" : "today's special" 85 | }, 86 | { 87 | "language" : "en-US", 88 | "taggedText" : "get today's special" 89 | }, 90 | { 91 | "language" : "en-US", 92 | "taggedText" : "Can you tell me what's the special today" 93 | }, 94 | { 95 | "language" : "en-US", 96 | "taggedText" : "are there any specials" 97 | }, 98 | { 99 | "language" : "en-US", 100 | "taggedText" : "specials" 101 | } 102 | ] 103 | }, 104 | { 105 | "uniqueName" : "make-reservation", 106 | "actions" : { 107 | "actions": [ 108 | { 109 | "collect": { 110 | "name": "make_reservation", 111 | "questions": [ 112 | { 113 | "question": { 114 | "say": "Great, I can help you with that. What's your first name?" 115 | }, 116 | "name": "first_name", 117 | "type": "Twilio.FIRST_NAME" 118 | }, 119 | { 120 | "question": { 121 | "say": "When day would you like your reservation for?" 122 | }, 123 | "name": "date", 124 | "type": "Twilio.DATE" 125 | }, 126 | { 127 | "question": { 128 | "say": "Great at what time?" 129 | }, 130 | "name": "time", 131 | "type": "Twilio.TIME" 132 | }, 133 | { 134 | "question": { 135 | "say": "For how many people" 136 | }, 137 | "name": "party_size", 138 | "type": "Twilio.NUMBER" 139 | } 140 | ], 141 | "on_complete": { 142 | "redirect": "task://confirm-reservation" 143 | } 144 | } 145 | } 146 | ] 147 | }, 148 | "fields" : [], 149 | "samples" : [ 150 | { 151 | "language" : "en-US", 152 | "taggedText" : "book a table" 153 | }, 154 | { 155 | "language" : "en-US", 156 | "taggedText" : "make a reservation" 157 | }, 158 | { 159 | "language" : "en-US", 160 | "taggedText" : "I want to make a reservation" 161 | }, 162 | { 163 | "language" : "en-US", 164 | "taggedText" : "I need a table" 165 | }, 166 | { 167 | "language" : "en-US", 168 | "taggedText" : "I want to book a table" 169 | }, 170 | { 171 | "language" : "en-US", 172 | "taggedText" : "I'd like to make a reservation please" 173 | }, 174 | { 175 | "language" : "en-US", 176 | "taggedText" : "I would like to make a reservation" 177 | },{ 178 | "language" : "en-US", 179 | "taggedText" : "I'm looking for a table for dinner" 180 | },{ 181 | "language" : "en-US", 182 | "taggedText" : "make reservation" 183 | },{ 184 | "language" : "en-US", 185 | "taggedText" : "make reservation please" 186 | } 187 | ] 188 | }, 189 | { 190 | "uniqueName" : "confirm-reservation", 191 | "actions" : { 192 | "actions" : [ 193 | { 194 | "say": 195 | { 196 | "speech" : "Ok 'x' name. Your reservation for 'x' date at 'x' time for 'x' people is now confirmed. thank you for booking with us" 197 | } 198 | } 199 | ] 200 | }, 201 | "fields" : [], 202 | "samples" : [] 203 | }, 204 | { 205 | "uniqueName" : "fallback", 206 | "actions" : { 207 | "actions" : [ 208 | { 209 | "say": 210 | { 211 | "speech" : "Welcome to Deep Table, the worlds smartest restaurant, I'm Deep Table's Virtual Assistant, I can tell you about todays special or help you make a reservation, What would you like to do today?" 212 | } 213 | }, 214 | { 215 | "listen": true 216 | } 217 | ] 218 | }, 219 | "fields" : [], 220 | "samples" : [] 221 | } 222 | ] 223 | } -------------------------------------------------------------------------------- /Assistants/LeadQualification/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "friendlyName" : "Qualify leads", 3 | "logQueries" : true, 4 | "uniqueName" : "LeadQualification", 5 | "defaults" : { 6 | "defaults" : { 7 | "assistant_initiation" : "task://greeting", 8 | "fallback" : "task://fallback", 9 | "collect" : { 10 | "validate_on_failure" : "task://collect_fallback" 11 | } 12 | } 13 | }, 14 | "styleSheet" : { 15 | "style_sheet" : { 16 | "collect" : { 17 | "validate" : { 18 | "on_failure" : { 19 | "repeat_question" : false, 20 | "messages" : [ 21 | { 22 | "say" : "I didn't get that. What did you say?" 23 | }, 24 | { 25 | "say" : "I still didn't catch that. Please repeat." 26 | }, 27 | { 28 | "say" : "Let's try one last time. Say it again please." 29 | } 30 | ] 31 | }, 32 | "on_success" : { "say" : "" }, 33 | "max_attempts" : 4 34 | } 35 | }, 36 | "voice" : { 37 | "say_voice" : "Polly.Matthew" 38 | } 39 | } 40 | }, 41 | "fieldTypes" : [], 42 | "tasks" : [ 43 | { 44 | "uniqueName" : "complete_lead_qualification", 45 | "actions" : { 46 | "actions" : [ 47 | { 48 | "say" : "Thank you. Someone from our sales team will reach out shortly! Have a great day. Goodbye." 49 | } 50 | ] 51 | }, 52 | "fields" : [], 53 | "samples" : [] 54 | }, 55 | { 56 | "uniqueName" : "start_lead_qualification", 57 | "actions" : { 58 | "actions" : [ 59 | { 60 | "collect" : { 61 | "on_complete" : { 62 | "redirect" : { 63 | "method" : "POST", 64 | "uri" : "task://complete_lead_qualification" 65 | } 66 | }, 67 | "name" : "lead_qual", 68 | "questions" : [ 69 | { 70 | "type" : "Twilio.NUMBER", 71 | "question" : "Great! How many employees do you have?", 72 | "name" : "lead_qual_employees" 73 | }, 74 | { 75 | "type" : "Twilio.COUNTRY", 76 | "question" : "Thanks. Which country are you located in?", 77 | "name" : "lead_qual_country" 78 | }, 79 | { 80 | "type" : "Twilio.YES_NO", 81 | "question" : "Do you have an existing vendor for this?", 82 | "name" : "lead_qual_yes_no" 83 | }, 84 | { 85 | "type" : "Twilio.PHONE_NUMBER", 86 | "question" : "Thanks!Last question. What number should we call to continue the conversation?", 87 | "name" : "lead_qual_number" 88 | } 89 | ] 90 | } 91 | } 92 | ] 93 | }, 94 | "fields" : [], 95 | "samples" : [ 96 | { 97 | "language" : "en-US", 98 | "taggedText" : "lets begin" 99 | }, 100 | { 101 | "language" : "en-US", 102 | "taggedText" : "okay lets start" 103 | }, 104 | { 105 | "language" : "en-US", 106 | "taggedText" : "sure" 107 | }, 108 | { 109 | "language" : "en-US", 110 | "taggedText" : "okay" 111 | }, 112 | { 113 | "language" : "en-US", 114 | "taggedText" : "yeah yeah" 115 | }, 116 | { 117 | "language" : "en-US", 118 | "taggedText" : "yee" 119 | }, 120 | { 121 | "language" : "en-US", 122 | "taggedText" : "start" 123 | }, 124 | { 125 | "language" : "en-US", 126 | "taggedText" : "lets begin" 127 | }, 128 | { 129 | "language" : "en-US", 130 | "taggedText" : "yep" 131 | }, 132 | { 133 | "language" : "en-US", 134 | "taggedText" : "yeah" 135 | }, 136 | { 137 | "language" : "en-US", 138 | "taggedText" : "yes" 139 | } 140 | ] 141 | }, 142 | { 143 | "uniqueName" : "greeting", 144 | "actions" : { 145 | "actions" : [ 146 | { 147 | "say" : "Hi there! Thanks for your interest in our service. May I ask you a few questions to help me connect you to the best person on our sales team?" 148 | }, 149 | { 150 | "listen" : { 151 | "tasks" : [ 152 | "goodbye", 153 | "start_lead_qualification" 154 | ] 155 | } 156 | } 157 | ] 158 | }, 159 | "fields" : [], 160 | "samples" : [ 161 | { 162 | "language" : "en-US", 163 | "taggedText" : "Hi" 164 | }, 165 | { 166 | "language" : "en-US", 167 | "taggedText" : "good morning" 168 | }, 169 | { 170 | "language" : "en-US", 171 | "taggedText" : "good afternoon" 172 | }, 173 | { 174 | "language" : "en-US", 175 | "taggedText" : "hello" 176 | }, 177 | { 178 | "language" : "en-US", 179 | "taggedText" : "heya" 180 | }, 181 | { 182 | "language" : "en-US", 183 | "taggedText" : "hi there" 184 | }, 185 | { 186 | "language" : "en-US", 187 | "taggedText" : "hi!" 188 | }, 189 | { 190 | "language" : "en-US", 191 | "taggedText" : "Hello." 192 | }, 193 | { 194 | "language" : "en-US", 195 | "taggedText" : "hi there." 196 | }, 197 | { 198 | "language" : "en-US", 199 | "taggedText" : "what'us up" 200 | }, 201 | { 202 | "language" : "en-US", 203 | "taggedText" : "yo" 204 | }, 205 | { 206 | "language" : "en-US", 207 | "taggedText" : "hey" 208 | }, 209 | { 210 | "language" : "en-US", 211 | "taggedText" : "what can you do" 212 | }, 213 | { 214 | "language" : "en-US", 215 | "taggedText" : "what do you do" 216 | }, 217 | { 218 | "language" : "en-US", 219 | "taggedText" : "whatsup" 220 | }, 221 | { 222 | "language" : "en-US", 223 | "taggedText" : "sup" 224 | } 225 | ] 226 | }, 227 | { 228 | "uniqueName" : "goodbye", 229 | "actions" : { 230 | "actions" : [ 231 | { 232 | "say" : "No worries. Please reach out if you want to chat again in the future. Goodbye!" 233 | } 234 | ] 235 | }, 236 | "fields" : [], 237 | "samples" : [ 238 | { 239 | "language" : "en-US", 240 | "taggedText" : "that's all for today" 241 | }, 242 | { 243 | "language" : "en-US", 244 | "taggedText" : "that is all thank you" 245 | }, 246 | { 247 | "language" : "en-US", 248 | "taggedText" : "no thanks" 249 | }, 250 | { 251 | "language" : "en-US", 252 | "taggedText" : "that would be all" 253 | }, 254 | { 255 | "language" : "en-US", 256 | "taggedText" : "that would be all thanks" 257 | }, 258 | { 259 | "language" : "en-US", 260 | "taggedText" : "no" 261 | }, 262 | { 263 | "language" : "en-US", 264 | "taggedText" : "no thanks" 265 | }, 266 | { 267 | "language" : "en-US", 268 | "taggedText" : "go away" 269 | }, 270 | { 271 | "language" : "en-US", 272 | "taggedText" : "cancel" 273 | }, 274 | { 275 | "language" : "en-US", 276 | "taggedText" : "goodbye" 277 | }, 278 | { 279 | "language" : "en-US", 280 | "taggedText" : "goodnight" 281 | }, 282 | { 283 | "language" : "en-US", 284 | "taggedText" : "stop talking" 285 | }, 286 | { 287 | "language" : "en-US", 288 | "taggedText" : "stop" 289 | }, 290 | { 291 | "language" : "en-US", 292 | "taggedText" : "see ya" 293 | }, 294 | { 295 | "language" : "en-US", 296 | "taggedText" : "bye bye" 297 | }, 298 | { 299 | "language" : "en-US", 300 | "taggedText" : "that's all" 301 | }, 302 | { 303 | "language" : "en-US", 304 | "taggedText" : "good bye" 305 | } 306 | ] 307 | }, 308 | { 309 | "uniqueName" : "fallback", 310 | "actions" : { 311 | "actions" : [ 312 | { 313 | "say" : "I'm sorry didn't quite get that. Please say that again." 314 | }, 315 | { "listen" : true } 316 | ] 317 | }, 318 | "fields" : [], 319 | "samples" : [] 320 | }, 321 | { 322 | "uniqueName" : "collect_fallback", 323 | "actions" : { 324 | "actions" : [ 325 | { 326 | "say" : "Looks like you having trouble. Apologies for that. Let's start again, how can I help you today?" 327 | }, 328 | { "listen" : true } 329 | ] 330 | }, 331 | "fields" : [], 332 | "samples" : [] 333 | } 334 | ], 335 | "modelBuild" : { "uniqueName" : "2" } 336 | } 337 | -------------------------------------------------------------------------------- /Assistants/DisneylandVacation/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "friendlyName": "DisneylandVacation", 3 | "logQueries": true, 4 | "uniqueName": "DisneylandVacation", 5 | "defaults": { 6 | "defaults": { 7 | "assistant_initiation": "task://vacation_greeting", 8 | "fallback": "task://connect_human", 9 | "collect": { 10 | "validate_on_failure": "task://vacation_greeting" 11 | } 12 | } 13 | }, 14 | "styleSheet": { 15 | "style_sheet": { 16 | "collect": { 17 | "validate": { 18 | "on_failure": { 19 | "repeat_question": false, 20 | "messages": [ 21 | { 22 | "say": "I'm sorry, I didn't catch that. What did you say?" 23 | }, 24 | { 25 | "say": "Hmm, could you please repeat." 26 | }, 27 | { 28 | "say": "Let's give it one more try. Please say it again." 29 | } 30 | ] 31 | }, 32 | "on_success": { 33 | "say": "Got it!" 34 | }, 35 | "max_attempts": 4 36 | } 37 | }, 38 | "voice": { 39 | "say_voice": "Polly.Joanna" 40 | }, 41 | "name": "Joanna" 42 | } 43 | }, 44 | "tasks": [ 45 | { 46 | "uniqueName": "vacation_greeting", 47 | "actions": { 48 | "actions": [ 49 | { 50 | "say": "Welcome to Disneyland's Twilio number. I can tell you today's park schedule, help you make a reservation, or connect you with a travel agent." 51 | }, 52 | { 53 | "listen": true 54 | } 55 | ] 56 | }, 57 | "fields": [], 58 | "samples": [ 59 | { 60 | "language": "en-US", 61 | "taggedText": "hello" 62 | }, 63 | { 64 | "language": "en-US", 65 | "taggedText": "hi" 66 | }, 67 | { 68 | "language": "en-US", 69 | "taggedText": "how are you" 70 | }, 71 | { 72 | "language": "en-US", 73 | "taggedText": "sup" 74 | }, 75 | { 76 | "language": "en-US", 77 | "taggedText": "hey" 78 | }, 79 | { 80 | "language": "en-US", 81 | "taggedText": "how's it going" 82 | }, 83 | { 84 | "language": "en-US", 85 | "taggedText": "hey there" 86 | }, 87 | { 88 | "language": "en-US", 89 | "taggedText": "what's up" 90 | }, 91 | { 92 | "language": "en-US", 93 | "taggedText": "hi there" 94 | }, 95 | { 96 | "language": "en-US", 97 | "taggedText": "salutations" 98 | }, 99 | { 100 | "language": "en-US", 101 | "taggedText": "greetings" 102 | } 103 | ] 104 | }, 105 | { 106 | "uniqueName": "todays_schedule", 107 | "actions": { 108 | "actions": [ 109 | { 110 | "say": "Today's schedule includes Frozen the Musical every hour and a half at the Hyperion Theatre, meet-and-greet with Pixar characters from 1pm-3pm, Fantasmic at 8pm, and fireworks at 9pm." 111 | }, 112 | { 113 | "listen": true 114 | } 115 | ] 116 | }, 117 | "fields": [], 118 | "samples": [ 119 | { 120 | "language": "en-US", 121 | "taggedText": "what is todays schedule" 122 | }, 123 | { 124 | "language": "en-US", 125 | "taggedText": "schedule" 126 | }, 127 | { 128 | "language": "en-US", 129 | "taggedText": "what is happening today" 130 | }, 131 | { 132 | "language": "en-US", 133 | "taggedText": "what events are today" 134 | }, 135 | { 136 | "language": "en-US", 137 | "taggedText": "what time is fantasmic today?" 138 | }, 139 | { 140 | "language": "en-US", 141 | "taggedText": "what shows are playing today" 142 | }, 143 | { 144 | "language": "en-US", 145 | "taggedText": "when is fantasmic today?" 146 | }, 147 | { 148 | "language": "en-US", 149 | "taggedText": "is fantasmic taking place today" 150 | }, 151 | { 152 | "language": "en-US", 153 | "taggedText": "what shows are taking place today" 154 | }, 155 | { 156 | "language": "en-US", 157 | "taggedText": "today's showtimes" 158 | }, 159 | { 160 | "language": "en-US", 161 | "taggedText": "today's shows" 162 | }, 163 | { 164 | "language": "en-US", 165 | "taggedText": "today's performances" 166 | }, 167 | { 168 | "language": "en-US", 169 | "taggedText": "today's activities" 170 | }, 171 | { 172 | "language": "en-US", 173 | "taggedText": "activities and times for the day" 174 | } 175 | ] 176 | }, 177 | { 178 | "uniqueName": "buy_tickets", 179 | "actions": { 180 | "actions": [ 181 | { 182 | "collect": { 183 | "name": "trip_details", 184 | "questions": [ 185 | { 186 | "question": { 187 | "say": "Great, I can help you with that. What's your first name?" 188 | }, 189 | "name": "first_name", 190 | "type": "Twilio.FIRST_NAME" 191 | }, 192 | { 193 | "question": { 194 | "say": "What day would you like your first day in the park to be?" 195 | }, 196 | "name": "date", 197 | "type": "Twilio.DATE" 198 | }, 199 | { 200 | "question": { 201 | "say": "Great, what time will you get here do you think?" 202 | }, 203 | "name": "time", 204 | "type": "Twilio.TIME" 205 | }, 206 | { 207 | "question": { 208 | "say": "Nice, and for how many days would you like to visit the park?" 209 | }, 210 | "name": "num_days", 211 | "type": "Twilio.NUMBER" 212 | }, 213 | { 214 | "question": { 215 | "say": "And for how many people" 216 | }, 217 | "name": "party_size", 218 | "type": "Twilio.NUMBER" 219 | } 220 | ], 221 | "on_complete": { 222 | "redirect": { 223 | "method": "POST", 224 | "uri": "" 225 | } 226 | } 227 | } 228 | } 229 | ] 230 | }, 231 | "fields": [], 232 | "samples": [ 233 | { 234 | "language": "en-US", 235 | "taggedText": "buy tickets" 236 | }, 237 | { 238 | "language": "en-US", 239 | "taggedText": "order tickets" 240 | }, 241 | { 242 | "language": "en-US", 243 | "taggedText": "reserve tickets" 244 | }, 245 | { 246 | "language": "en-US", 247 | "taggedText": "tickets" 248 | }, 249 | { 250 | "language": "en-US", 251 | "taggedText": "i want to buy tickets" 252 | }, 253 | { 254 | "language": "en-US", 255 | "taggedText": "i wish to order tickets" 256 | }, 257 | { 258 | "language": "en-US", 259 | "taggedText": "i want to buy park tickets" 260 | }, 261 | { 262 | "language": "en-US", 263 | "taggedText": "can i buy park tickets" 264 | }, 265 | { 266 | "language": "en-US", 267 | "taggedText": "plan a trip" 268 | } 269 | ] 270 | }, 271 | { 272 | "uniqueName": "connect_human", 273 | "actions": { 274 | "actions": [ 275 | { 276 | "say": " Hold on, we are connecting you with a human." 277 | }, 278 | { 279 | "handoff": { 280 | "method": "POST", 281 | "channel": "voice", 282 | "uri": "" 283 | } 284 | } 285 | ] 286 | }, 287 | "fields": [], 288 | "samples": [ 289 | { 290 | "language": "en-US", 291 | "taggedText": "I'd like to speak with a human" 292 | }, 293 | { 294 | "language": "en-US", 295 | "taggedText": "Can I speak to a person please" 296 | }, 297 | { 298 | "language": "en-US", 299 | "taggedText": "Connect me with a person" 300 | }, 301 | { 302 | "language": "en-US", 303 | "taggedText": "I want to speak to a human" 304 | }, 305 | { 306 | "language": "en-US", 307 | "taggedText": "human" 308 | }, 309 | { 310 | "language": "en-US", 311 | "taggedText": "real person" 312 | }, 313 | { 314 | "language": "en-US", 315 | "taggedText": "just connect me with a person" 316 | }, 317 | { 318 | "language": "en-US", 319 | "taggedText": "i want to talk to someone else" 320 | }, 321 | { 322 | "language": "en-US", 323 | "taggedText": "someone else" 324 | } 325 | ] 326 | } 327 | ], 328 | "modelBuild": { 329 | "uniqueName": "v0.01" 330 | } 331 | } 332 | -------------------------------------------------------------------------------- /Assistants/CustomerSatisfactionSurvey/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "friendlyName" : "Run a CSAT survey", 3 | "logQueries" : true, 4 | "uniqueName" : "CustomerSatisfactionSurvey", 5 | "defaults" : { 6 | "defaults" : { 7 | "assistant_initiation" : "task://greeting", 8 | "fallback" : "task://fallback", 9 | "collect" : { 10 | "validate_on_failure" : "task://collect_fallback" 11 | } 12 | } 13 | }, 14 | "styleSheet" : { 15 | "style_sheet" : { 16 | "collect" : { 17 | "validate" : { 18 | "on_failure" : { 19 | "repeat_question" : false, 20 | "messages" : [ 21 | { 22 | "say" : "I didn't get that. What did you say?" 23 | }, 24 | { 25 | "say" : "I still didn't catch that. Please repeat." 26 | }, 27 | { 28 | "say" : "Let's try one last time. Say it again please." 29 | } 30 | ] 31 | }, 32 | "on_success" : { "say" : "" }, 33 | "max_attempts" : 4 34 | } 35 | }, 36 | "voice" : { 37 | "say_voice" : "Polly.Matthew" 38 | } 39 | } 40 | }, 41 | "fieldTypes" : [], 42 | "tasks" : [ 43 | { 44 | "uniqueName" : "complete_survey", 45 | "actions" : { 46 | "actions" : [ 47 | { 48 | "say" : "Thank you so much for your time. If you answered yes to the last question, we'll reach out to schedule a customer research session with you. Goodbye!" 49 | } 50 | ] 51 | }, 52 | "fields" : [], 53 | "samples" : [] 54 | }, 55 | { 56 | "uniqueName" : "start_survey", 57 | "actions" : { 58 | "actions" : [ 59 | { 60 | "say" : "Thank you for making the time for this survey. Your answers help us improve the service!" 61 | }, 62 | { 63 | "collect" : { 64 | "on_complete" : { 65 | "redirect" : { 66 | "method" : "POST", 67 | "uri" : "task://complete_survey" 68 | } 69 | }, 70 | "name" : "csat_answers", 71 | "questions" : [ 72 | { 73 | "type" : "Twilio.NUMBER", 74 | "question" : "How likely are you to recommend our service on a scale of 1 to 10?", 75 | "name" : "nps_score" 76 | }, 77 | { 78 | "question" : "Thanks! And what is the primary reason for your score?", 79 | "name" : "nps_reason" 80 | }, 81 | { 82 | "type" : "Twilio.YES_NO", 83 | "question" : "Do you want to participate in customer research sessions in the future?", 84 | "name" : "research_yes_no" 85 | } 86 | ] 87 | } 88 | } 89 | ] 90 | }, 91 | "fields" : [], 92 | "samples" : [ 93 | { 94 | "language" : "en-US", 95 | "taggedText" : "Begin" 96 | }, 97 | { 98 | "language" : "en-US", 99 | "taggedText" : "Yea" 100 | }, 101 | { 102 | "language" : "en-US", 103 | "taggedText" : "Yup" 104 | }, 105 | { 106 | "language" : "en-US", 107 | "taggedText" : "Yes yes" 108 | }, 109 | { 110 | "language" : "en-US", 111 | "taggedText" : "Yeah" 112 | }, 113 | { 114 | "language" : "en-US", 115 | "taggedText" : "Start" 116 | }, 117 | { 118 | "language" : "en-US", 119 | "taggedText" : "Lets do this" 120 | }, 121 | { 122 | "language" : "en-US", 123 | "taggedText" : "Yep" 124 | }, 125 | { 126 | "language" : "en-US", 127 | "taggedText" : "Sure" 128 | }, 129 | { 130 | "language" : "en-US", 131 | "taggedText" : "Yes" 132 | } 133 | ] 134 | }, 135 | { 136 | "uniqueName" : "greeting", 137 | "actions" : { 138 | "actions" : [ 139 | { 140 | "say" : "Hi! Can you spare a few minutes to answer a few questions about your experience?" 141 | }, 142 | { 143 | "listen" : { 144 | "tasks" : [ 145 | "start_survey", 146 | "goodbye" 147 | ] 148 | } 149 | } 150 | ] 151 | }, 152 | "fields" : [], 153 | "samples" : [ 154 | { 155 | "language" : "en-US", 156 | "taggedText" : "Let's start the customer satisfaction survey" 157 | }, 158 | { 159 | "language" : "en-US", 160 | "taggedText" : "CSAT" 161 | }, 162 | { 163 | "language" : "en-US", 164 | "taggedText" : "Start the CSAT survey please" 165 | }, 166 | { 167 | "language" : "en-US", 168 | "taggedText" : "I want to take the survey" 169 | }, 170 | { 171 | "language" : "en-US", 172 | "taggedText" : "customer satisfaction survey" 173 | }, 174 | { 175 | "language" : "en-US", 176 | "taggedText" : "start survey" 177 | }, 178 | { 179 | "language" : "en-US", 180 | "taggedText" : "Hi" 181 | }, 182 | { 183 | "language" : "en-US", 184 | "taggedText" : "good morning" 185 | }, 186 | { 187 | "language" : "en-US", 188 | "taggedText" : "good afternoon" 189 | }, 190 | { 191 | "language" : "en-US", 192 | "taggedText" : "hello" 193 | }, 194 | { 195 | "language" : "en-US", 196 | "taggedText" : "heya" 197 | }, 198 | { 199 | "language" : "en-US", 200 | "taggedText" : "hi there" 201 | }, 202 | { 203 | "language" : "en-US", 204 | "taggedText" : "hi!" 205 | }, 206 | { 207 | "language" : "en-US", 208 | "taggedText" : "Hello." 209 | }, 210 | { 211 | "language" : "en-US", 212 | "taggedText" : "hi there." 213 | }, 214 | { 215 | "language" : "en-US", 216 | "taggedText" : "what'us up" 217 | }, 218 | { 219 | "language" : "en-US", 220 | "taggedText" : "yo" 221 | }, 222 | { 223 | "language" : "en-US", 224 | "taggedText" : "hey" 225 | }, 226 | { 227 | "language" : "en-US", 228 | "taggedText" : "what can you do" 229 | }, 230 | { 231 | "language" : "en-US", 232 | "taggedText" : "what do you do" 233 | }, 234 | { 235 | "language" : "en-US", 236 | "taggedText" : "whatsup" 237 | }, 238 | { 239 | "language" : "en-US", 240 | "taggedText" : "sup" 241 | } 242 | ] 243 | }, 244 | { 245 | "uniqueName" : "goodbye", 246 | "actions" : { 247 | "actions" : [ 248 | { 249 | "say" : "No worries. Please reach out if you want to take the survey in the future. Goodbye!" 250 | } 251 | ] 252 | }, 253 | "fields" : [], 254 | "samples" : [ 255 | { 256 | "language" : "en-US", 257 | "taggedText" : "that's all for today" 258 | }, 259 | { 260 | "language" : "en-US", 261 | "taggedText" : "that is all thank you" 262 | }, 263 | { 264 | "language" : "en-US", 265 | "taggedText" : "no thanks" 266 | }, 267 | { 268 | "language" : "en-US", 269 | "taggedText" : "that would be all" 270 | }, 271 | { 272 | "language" : "en-US", 273 | "taggedText" : "that would be all thanks" 274 | }, 275 | { 276 | "language" : "en-US", 277 | "taggedText" : "no" 278 | }, 279 | { 280 | "language" : "en-US", 281 | "taggedText" : "no thanks" 282 | }, 283 | { 284 | "language" : "en-US", 285 | "taggedText" : "go away" 286 | }, 287 | { 288 | "language" : "en-US", 289 | "taggedText" : "cancel" 290 | }, 291 | { 292 | "language" : "en-US", 293 | "taggedText" : "goodbye" 294 | }, 295 | { 296 | "language" : "en-US", 297 | "taggedText" : "goodnight" 298 | }, 299 | { 300 | "language" : "en-US", 301 | "taggedText" : "stop talking" 302 | }, 303 | { 304 | "language" : "en-US", 305 | "taggedText" : "stop" 306 | }, 307 | { 308 | "language" : "en-US", 309 | "taggedText" : "see ya" 310 | }, 311 | { 312 | "language" : "en-US", 313 | "taggedText" : "bye bye" 314 | }, 315 | { 316 | "language" : "en-US", 317 | "taggedText" : "that's all" 318 | }, 319 | { 320 | "language" : "en-US", 321 | "taggedText" : "good bye" 322 | } 323 | ] 324 | }, 325 | { 326 | "uniqueName" : "fallback", 327 | "actions" : { 328 | "actions" : [ 329 | { 330 | "say" : "I'm sorry didn't quite get that. Please say that again." 331 | }, 332 | { "listen" : true } 333 | ] 334 | }, 335 | "fields" : [], 336 | "samples" : [] 337 | }, 338 | { 339 | "uniqueName" : "collect_fallback", 340 | "actions" : { 341 | "actions" : [ 342 | { 343 | "say" : "Looks like you having trouble. Apologies for that. Let's start again, how can I help you today?" 344 | }, 345 | { "listen" : true } 346 | ] 347 | }, 348 | "fields" : [], 349 | "samples" : [] 350 | } 351 | ], 352 | "modelBuild" : { "uniqueName" : "2" } 353 | } 354 | -------------------------------------------------------------------------------- /Assistants/EventBot/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "friendlyName": "EventBot", 3 | "logQueries": true, 4 | "uniqueName": "EventBot", 5 | "defaults": { 6 | "defaults": { 7 | "assistant_initiation": "task://event_greeting", 8 | "fallback": "task://connect_human", 9 | "collect": { 10 | "validate_on_failure": "task://event_greeting" 11 | } 12 | } 13 | }, 14 | "styleSheet": { 15 | "style_sheet": { 16 | "collect": { 17 | "validate": { 18 | "on_failure": { 19 | "repeat_question": false, 20 | "messages": [ 21 | { 22 | "say": "I'm sorry, I didn't catch that. What did you say?" 23 | }, 24 | { 25 | "say": "Hmm, could you please repeat." 26 | }, 27 | { 28 | "say": "Let's give it one more try. Please say it again." 29 | } 30 | ] 31 | }, 32 | "on_success": { 33 | "say": "Got it!" 34 | }, 35 | "max_attempts": 4 36 | } 37 | }, 38 | "voice": { 39 | "say_voice": "Polly.Joanna" 40 | }, 41 | "name": "Joanna" 42 | } 43 | }, 44 | "tasks": [ 45 | { 46 | "uniqueName": "event_greeting", 47 | "actions": { 48 | "actions": [ 49 | { 50 | "say": "Welcome to this event! I am the event bot. You can ask me for help, directions, the schedule, and more!" 51 | }, 52 | { 53 | "listen": true 54 | } 55 | ] 56 | }, 57 | "fields": [], 58 | "samples": [ 59 | { 60 | "language": "en-US", 61 | "taggedText": "hello" 62 | }, 63 | { 64 | "language": "en-US", 65 | "taggedText": "hi" 66 | }, 67 | { 68 | "language": "en-US", 69 | "taggedText": "how are you" 70 | }, 71 | { 72 | "language": "en-US", 73 | "taggedText": "sup" 74 | }, 75 | { 76 | "language": "en-US", 77 | "taggedText": "hey" 78 | }, 79 | { 80 | "language": "en-US", 81 | "taggedText": "how's it going" 82 | }, 83 | { 84 | "language": "en-US", 85 | "taggedText": "hey there" 86 | }, 87 | { 88 | "language": "en-US", 89 | "taggedText": "what's up" 90 | }, 91 | { 92 | "language": "en-US", 93 | "taggedText": "hi there" 94 | }, 95 | { 96 | "language": "en-US", 97 | "taggedText": "salutations" 98 | }, 99 | { 100 | "language": "en-US", 101 | "taggedText": "greetings" 102 | }, 103 | { 104 | "language": "en-US", 105 | "taggedText": "who is this" 106 | } 107 | ] 108 | }, 109 | { 110 | "uniqueName": "schedule", 111 | "actions": { 112 | "actions": [ 113 | { 114 | "say": "The event schedule is shown at {insert event schedule URL}" 115 | }, 116 | { 117 | "listen": true 118 | } 119 | ] 120 | }, 121 | "fields": [], 122 | "samples": [ 123 | { 124 | "language": "en-US", 125 | "taggedText": "what is todays schedule" 126 | }, 127 | { 128 | "language": "en-US", 129 | "taggedText": "schedule" 130 | }, 131 | { 132 | "language": "en-US", 133 | "taggedText": "what is happening today" 134 | }, 135 | { 136 | "language": "en-US", 137 | "taggedText": "what events are today" 138 | }, 139 | { 140 | "language": "en-US", 141 | "taggedText": "when is lunch" 142 | }, 143 | { 144 | "language": "en-US", 145 | "taggedText": "time" 146 | }, 147 | { 148 | "language": "en-US", 149 | "taggedText": "when can i see" 150 | }, 151 | { 152 | "language": "en-US", 153 | "taggedText": "what time" 154 | }, 155 | { 156 | "language": "en-US", 157 | "taggedText": "when" 158 | }, 159 | { 160 | "language": "en-US", 161 | "taggedText": "conference schedule" 162 | }, 163 | { 164 | "language": "en-US", 165 | "taggedText": "event schedule" 166 | }, 167 | { 168 | "language": "en-US", 169 | "taggedText": "today's activities" 170 | }, 171 | { 172 | "language": "en-US", 173 | "taggedText": "activities and times for the day" 174 | } 175 | ] 176 | }, 177 | { 178 | "uniqueName": "code_of_conduct", 179 | "actions": { 180 | "actions": [ 181 | { 182 | "collect": { 183 | "name": "code_of_conduct", 184 | "questions": [ 185 | { 186 | "question": { 187 | "say": "We're sorry you have a code of conduct complaint or issue. You can view our code of conduct here: https://2019.cascadiajs.com/code-of-conduct. What exactly happened?" 188 | }, 189 | "name": "conduct_issue" 190 | } 191 | ], 192 | "on_complete": { 193 | "redirect": "https://REPLACE-WITH-YOUR-TWILIO-FUNCTION-URL.twil.io/REPLACE-WITH-EVENT-NAME-MAYBE" 194 | } 195 | } 196 | } 197 | ] 198 | }, 199 | "fields": [], 200 | "samples": [ 201 | { 202 | "language": "en-US", 203 | "taggedText": "event organizers" 204 | }, 205 | { 206 | "language": "en-US", 207 | "taggedText": "code of conduct" 208 | }, 209 | { 210 | "language": "en-US", 211 | "taggedText": "code of conduct issue" 212 | }, 213 | { 214 | "language": "en-US", 215 | "taggedText": "complaint" 216 | }, 217 | { 218 | "language": "en-US", 219 | "taggedText": "i have an issue" 220 | }, 221 | { 222 | "language": "en-US", 223 | "taggedText": "i'd like to speak to an organizer" 224 | }, 225 | { 226 | "language": "en-US", 227 | "taggedText": "contact organizer" 228 | }, 229 | { 230 | "language": "en-US", 231 | "taggedText": "raise a code of conduct issue" 232 | }, 233 | { 234 | "language": "en-US", 235 | "taggedText": "i need help" 236 | } 237 | ] 238 | }, 239 | { 240 | "uniqueName": "wifi", 241 | "actions": { 242 | "actions": [ 243 | { 244 | "say": "The WiFi password is {replace-with-wifi-password}" 245 | }, 246 | { 247 | "listen": true 248 | } 249 | ] 250 | }, 251 | "fields": [], 252 | "samples": [ 253 | { 254 | "language": "en-US", 255 | "taggedText": "wifi" 256 | }, 257 | { 258 | "language": "en-US", 259 | "taggedText": "internet" 260 | }, 261 | { 262 | "language": "en-US", 263 | "taggedText": "event wifi" 264 | }, 265 | { 266 | "language": "en-US", 267 | "taggedText": "conference wifi" 268 | }, 269 | { 270 | "language": "en-US", 271 | "taggedText": "how do i connect to the wifi" 272 | }, 273 | { 274 | "language": "en-US", 275 | "taggedText": "how do i get on the wifi" 276 | }, 277 | { 278 | "language": "en-US", 279 | "taggedText": "get on the internet" 280 | }, 281 | { 282 | "language": "en-US", 283 | "taggedText": "wifi password" 284 | }, 285 | { 286 | "language": "en-US", 287 | "taggedText": "internet" 288 | } 289 | ] 290 | }, 291 | { 292 | "uniqueName": "venue_map", 293 | "actions": { 294 | "actions": [ 295 | { 296 | "say": "Below and at this link are a map of the venue: {INSERT-MAP-OF-VENUE-IMG-URL}" 297 | }, 298 | { 299 | "show": { 300 | "images": [ 301 | { 302 | "label": "{INSERT-LABEL-1}", 303 | "url": "{INSERT-MAP-URL-TO-PNG-IE-HOSTED-ON-AWS}" 304 | } 305 | ], 306 | "body": "venue" 307 | } 308 | } 309 | ] 310 | }, 311 | "fields": [], 312 | "samples": [ 313 | { 314 | "language": "en-US", 315 | "taggedText": "venue" 316 | }, 317 | { 318 | "language": "en-US", 319 | "taggedText": "map" 320 | }, 321 | { 322 | "language": "en-US", 323 | "taggedText": "map of venue" 324 | }, 325 | { 326 | "language": "en-US", 327 | "taggedText": "where is lunch" 328 | }, 329 | { 330 | "language": "en-US", 331 | "taggedText": "bathrooms" 332 | }, 333 | { 334 | "language": "en-US", 335 | "taggedText": "where are the bathrooms" 336 | }, 337 | { 338 | "language": "en-US", 339 | "taggedText": "i can't find the bathroom" 340 | }, 341 | { 342 | "language": "en-US", 343 | "taggedText": "i'm lost" 344 | }, 345 | { 346 | "language": "en-US", 347 | "taggedText": "where do i go" 348 | }, 349 | { 350 | "language": "en-US", 351 | "taggedText": "where can i find" 352 | }, 353 | { 354 | "language": "en-US", 355 | "taggedText": "how do i get there" 356 | } 357 | ] 358 | } 359 | 360 | ], 361 | "modelBuild": { 362 | "uniqueName": "v0.01" 363 | } 364 | } 365 | -------------------------------------------------------------------------------- /Assistants/insurance/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "friendlyName" : "InsuranceCo", 3 | "logQueries" : true, 4 | "uniqueName" : "InsuranceCo", 5 | "defaults" : { 6 | "defaults" : { 7 | "assistant_initiation" : "task://insurance_greeting", 8 | "fallback" : "task://insurance_fallback", 9 | "collect" : { 10 | "validate_on_failure" : "task://hello_world" 11 | } 12 | } 13 | }, 14 | "styleSheet" : { 15 | "style_sheet" : { 16 | "collect" : { 17 | "validate" : { 18 | "on_failure" : { 19 | "repeat_question" : false, 20 | "messages" : [ 21 | { 22 | "say" : "I'm sorry, can you please say that again" 23 | }, 24 | { 25 | "say" : "hmm I still did'nt catch that, can you please repeat" 26 | }, 27 | { 28 | "say" : "Let's give it one more try. Please say it one more time" 29 | } 30 | ] 31 | }, 32 | "on_success" : { "say" : "" }, 33 | "max_attempts" : 4 34 | } 35 | }, 36 | "voice" : { 37 | "say_voice" : "Polly.Matthew" 38 | } 39 | } 40 | }, 41 | "fieldTypes" : [], 42 | "tasks" : [ 43 | { 44 | "uniqueName" : "insurance_auto_nps_survey", 45 | "actions" : { 46 | "actions" : [ 47 | { 48 | "redirect" : "" 49 | } 50 | ] 51 | }, 52 | "fields" : [], 53 | "samples" : [ 54 | { 55 | "language" : "en-US", 56 | "taggedText" : "no nothing more today thank you" 57 | }, 58 | { 59 | "language" : "en-US", 60 | "taggedText" : "no that would be all" 61 | }, 62 | { 63 | "language" : "en-US", 64 | "taggedText" : "no thanks" 65 | }, 66 | { 67 | "language" : "en-US", 68 | "taggedText" : "that would be all" 69 | }, 70 | { 71 | "language" : "en-US", 72 | "taggedText" : "no" 73 | }, 74 | { 75 | "language" : "en-US", 76 | "taggedText" : "that's it thank you." 77 | }, 78 | { 79 | "language" : "en-US", 80 | "taggedText" : "No, that would be all" 81 | }, 82 | { 83 | "language" : "en-US", 84 | "taggedText" : "that's all for today" 85 | }, 86 | { 87 | "language" : "en-US", 88 | "taggedText" : "No, that would be ohh" 89 | }, 90 | { 91 | "language" : "en-US", 92 | "taggedText" : "nada" 93 | }, 94 | { 95 | "language" : "en-US", 96 | "taggedText" : "that's all thank you" 97 | }, 98 | { 99 | "language" : "en-US", 100 | "taggedText" : "no that's all" 101 | }, 102 | { 103 | "language" : "en-US", 104 | "taggedText" : "by" 105 | }, 106 | { 107 | "language" : "en-US", 108 | "taggedText" : "good bye" 109 | }, 110 | { 111 | "language" : "en-US", 112 | "taggedText" : "googbye" 113 | }, 114 | { 115 | "language" : "en-US", 116 | "taggedText" : "end" 117 | }, 118 | { 119 | "language" : "en-US", 120 | "taggedText" : "bye" 121 | }, 122 | { 123 | "language" : "en-US", 124 | "taggedText" : "buy" 125 | } 126 | ] 127 | }, 128 | { 129 | "uniqueName" : "insurance_auto_get_insurance_quote", 130 | "actions" : { 131 | "actions" : [ 132 | { 133 | "redirect" : "" 134 | } 135 | ] 136 | }, 137 | "fields" : [], 138 | "samples" : [ 139 | { 140 | "language" : "en-US", 141 | "taggedText" : "Hi I'm calling because I need car insurance" 142 | }, 143 | { 144 | "language" : "en-US", 145 | "taggedText" : "hi, I need car insurance" 146 | }, 147 | { 148 | "language" : "en-US", 149 | "taggedText" : "insure my car" 150 | }, 151 | { 152 | "language" : "en-US", 153 | "taggedText" : "auto insurance" 154 | }, 155 | { 156 | "language" : "en-US", 157 | "taggedText" : "insurance for my car" 158 | }, 159 | { 160 | "language" : "en-US", 161 | "taggedText" : "car insurance" 162 | }, 163 | { 164 | "language" : "en-US", 165 | "taggedText" : "need to insure my new car" 166 | }, 167 | { 168 | "language" : "en-US", 169 | "taggedText" : "new auto insurance" 170 | }, 171 | { 172 | "language" : "en-US", 173 | "taggedText" : "I need to get my car insured" 174 | }, 175 | { 176 | "language" : "en-US", 177 | "taggedText" : "need insurance for my car" 178 | }, 179 | { 180 | "language" : "en-US", 181 | "taggedText" : "I want to buy car insurance" 182 | } 183 | ] 184 | }, 185 | { 186 | "uniqueName" : "insurance_auto_talk_to_representative", 187 | "actions" : { 188 | "actions" : [ 189 | { 190 | "redirect" : "" 191 | } 192 | ] 193 | }, 194 | "fields" : [], 195 | "samples" : [ 196 | { 197 | "language" : "en-US", 198 | "taggedText" : "need to talk to someone" 199 | }, 200 | { 201 | "language" : "en-US", 202 | "taggedText" : "need advise" 203 | }, 204 | { 205 | "language" : "en-US", 206 | "taggedText" : "need insurance advise" 207 | }, 208 | { 209 | "language" : "en-US", 210 | "taggedText" : "need advise" 211 | }, 212 | { 213 | "language" : "en-US", 214 | "taggedText" : "need help talk with someone" 215 | }, 216 | { 217 | "language" : "en-US", 218 | "taggedText" : "talk to an agent" 219 | }, 220 | { 221 | "language" : "en-US", 222 | "taggedText" : "talk to someone" 223 | }, 224 | { 225 | "language" : "en-US", 226 | "taggedText" : "talk to an advisor" 227 | }, 228 | { 229 | "language" : "en-US", 230 | "taggedText" : "representative" 231 | }, 232 | { 233 | "language" : "en-US", 234 | "taggedText" : "agent" 235 | } 236 | ] 237 | }, 238 | { 239 | "uniqueName" : "insurance_fallback", 240 | "actions" : { 241 | "actions" : [ 242 | { 243 | "say" : "Sorry I didn't understand, can you please say that again" 244 | }, 245 | { "listen" : true } 246 | ] 247 | }, 248 | "fields" : [], 249 | "samples" : [] 250 | }, 251 | { 252 | "uniqueName" : "insurance_auto_file_claim", 253 | "actions" : { 254 | "actions" : [ 255 | { 256 | "redirect" : "" 257 | } 258 | ] 259 | }, 260 | "fields" : [], 261 | "samples" : [ 262 | { 263 | "language" : "en-US", 264 | "taggedText" : "I got into an accident and need to file a claim" 265 | }, 266 | { 267 | "language" : "en-US", 268 | "taggedText" : "car crash" 269 | }, 270 | { 271 | "language" : "en-US", 272 | "taggedText" : "I crashed my car" 273 | }, 274 | { 275 | "language" : "en-US", 276 | "taggedText" : "I got into a car crash" 277 | }, 278 | { 279 | "language" : "en-US", 280 | "taggedText" : "report an accident" 281 | }, 282 | { 283 | "language" : "en-US", 284 | "taggedText" : "insurance claim please" 285 | }, 286 | { 287 | "language" : "en-US", 288 | "taggedText" : "file insurance claim please" 289 | }, 290 | { 291 | "language" : "en-US", 292 | "taggedText" : "can I file a claim please" 293 | }, 294 | { 295 | "language" : "en-US", 296 | "taggedText" : "what do I need to do to file a claim" 297 | }, 298 | { 299 | "language" : "en-US", 300 | "taggedText" : "need to file an claim" 301 | }, 302 | { 303 | "language" : "en-US", 304 | "taggedText" : "file claim please" 305 | }, 306 | { 307 | "language" : "en-US", 308 | "taggedText" : "I want to file an insurance claim" 309 | }, 310 | { 311 | "language" : "en-US", 312 | "taggedText" : "need file a claim" 313 | }, 314 | { 315 | "language" : "en-US", 316 | "taggedText" : "can you help me file a claim" 317 | }, 318 | { 319 | "language" : "en-US", 320 | "taggedText" : "need to file an insurance claim" 321 | } 322 | ] 323 | }, 324 | { 325 | "uniqueName" : "insurance_auto_check_claim_status", 326 | "actions" : { 327 | "actions" : [ 328 | { 329 | "redirect" : "" 330 | } 331 | ] 332 | }, 333 | "fields" : [], 334 | "samples" : [ 335 | { 336 | "language" : "en-US", 337 | "taggedText" : "I need to check my claim status." 338 | }, 339 | { 340 | "language" : "en-US", 341 | "taggedText" : "sup with my claim" 342 | }, 343 | { 344 | "language" : "en-US", 345 | "taggedText" : "what's up with my claim" 346 | }, 347 | { 348 | "language" : "en-US", 349 | "taggedText" : "can you please tell me the status of my claim" 350 | }, 351 | { 352 | "language" : "en-US", 353 | "taggedText" : "can I please check my claim status" 354 | }, 355 | { 356 | "language" : "en-US", 357 | "taggedText" : "status of my claim" 358 | }, 359 | { 360 | "language" : "en-US", 361 | "taggedText" : "need help finding out what is the status of my claim" 362 | }, 363 | { 364 | "language" : "en-US", 365 | "taggedText" : "can you please let me know what the status of my claim" 366 | }, 367 | { 368 | "language" : "en-US", 369 | "taggedText" : "what's the status of my claim" 370 | }, 371 | { 372 | "language" : "en-US", 373 | "taggedText" : "what is the status of my claim" 374 | }, 375 | { 376 | "language" : "en-US", 377 | "taggedText" : "claim status" 378 | }, 379 | { 380 | "language" : "en-US", 381 | "taggedText" : "claim status please" 382 | }, 383 | { 384 | "language" : "en-US", 385 | "taggedText" : "check claim status" 386 | } 387 | ] 388 | }, 389 | { 390 | "uniqueName" : "insurance_greeting", 391 | "actions" : { 392 | "actions" : [ 393 | { 394 | "redirect" : "" 395 | } 396 | ] 397 | }, 398 | "fields" : [], 399 | "samples" : [ 400 | { 401 | "language" : "en-US", 402 | "taggedText" : "hi" 403 | }, 404 | { 405 | "language" : "en-US", 406 | "taggedText" : "hello" 407 | }, 408 | { 409 | "language" : "en-US", 410 | "taggedText" : "hi there" 411 | } 412 | ] 413 | } 414 | ], 415 | "modelBuild" : { "uniqueName" : "v0.05" } 416 | } 417 | -------------------------------------------------------------------------------- /Assistants/IntentBasedRouting/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "friendlyName" : "Connect people to different departments in a company", 3 | "logQueries" : true, 4 | "uniqueName" : "IntentBasedRouting", 5 | "defaults" : { 6 | "defaults" : { 7 | "assistant_initiation" : "task://greeting", 8 | "fallback" : "task://fallback", 9 | "collect" : { 10 | "validate_on_failure" : "task://collect_fallback" 11 | } 12 | } 13 | }, 14 | "styleSheet" : { 15 | "style_sheet" : { 16 | "collect" : { 17 | "validate" : { 18 | "on_failure" : { 19 | "repeat_question" : false, 20 | "messages" : [ 21 | { 22 | "say" : "I didn't get that. What did you say?" 23 | }, 24 | { 25 | "say" : "I still didn't catch that. Please repeat." 26 | }, 27 | { 28 | "say" : "Let's try one last time. Say it again please." 29 | } 30 | ] 31 | }, 32 | "on_success" : { "say" : "" }, 33 | "max_attempts" : 4 34 | } 35 | }, 36 | "voice" : { 37 | "say_voice" : "Polly.Matthew" 38 | } 39 | } 40 | }, 41 | "fieldTypes" : [], 42 | "tasks" : [ 43 | { 44 | "uniqueName" : "talk_to_front_desk", 45 | "actions" : { 46 | "actions" : [ 47 | { 48 | "say" : "Perfect, I'll connect you with the front desk." 49 | }, 50 | { 51 | "handoff" : { 52 | "method" : "POST", 53 | "channel" : "voice", 54 | "uri" : "https://handler.twilio.com/twiml/EHec1bbf48c2000f95f0506e6c1c54af72" 55 | } 56 | } 57 | ] 58 | }, 59 | "fields" : [], 60 | "samples" : [ 61 | { 62 | "language" : "en-US", 63 | "taggedText" : "agent" 64 | }, 65 | { 66 | "language" : "en-US", 67 | "taggedText" : "not sure" 68 | }, 69 | { 70 | "language" : "en-US", 71 | "taggedText" : "someone" 72 | }, 73 | { 74 | "language" : "en-US", 75 | "taggedText" : "help" 76 | }, 77 | { 78 | "language" : "en-US", 79 | "taggedText" : "need help" 80 | }, 81 | { 82 | "language" : "en-US", 83 | "taggedText" : "the receptionist" 84 | }, 85 | { 86 | "language" : "en-US", 87 | "taggedText" : "the front desk" 88 | }, 89 | { 90 | "language" : "en-US", 91 | "taggedText" : "Front Desk." 92 | }, 93 | { 94 | "language" : "en-US", 95 | "taggedText" : "front desk" 96 | }, 97 | { 98 | "language" : "en-US", 99 | "taggedText" : "reception" 100 | } 101 | ] 102 | }, 103 | { 104 | "uniqueName" : "talk_to_investor_relations", 105 | "actions" : { 106 | "actions" : [ 107 | { 108 | "say" : "Thanks for contacting Investor Relations. I'll connect you right away." 109 | }, 110 | { 111 | "handoff" : { 112 | "method" : "POST", 113 | "channel" : "voice", 114 | "uri" : "https://handler.twilio.com/twiml/EHec1bbf48c2000f95f0506e6c1c54af72" 115 | } 116 | } 117 | ] 118 | }, 119 | "fields" : [], 120 | "samples" : [ 121 | { 122 | "language" : "en-US", 123 | "taggedText" : "help investors" 124 | }, 125 | { 126 | "language" : "en-US", 127 | "taggedText" : "investors" 128 | }, 129 | { 130 | "language" : "en-US", 131 | "taggedText" : "Investor relations." 132 | }, 133 | { 134 | "language" : "en-US", 135 | "taggedText" : "relations with investors" 136 | }, 137 | { 138 | "language" : "en-US", 139 | "taggedText" : "investor folks" 140 | }, 141 | { 142 | "language" : "en-US", 143 | "taggedText" : "talk to investor relations" 144 | }, 145 | { 146 | "language" : "en-US", 147 | "taggedText" : "investor information" 148 | }, 149 | { 150 | "language" : "en-US", 151 | "taggedText" : "IR" 152 | }, 153 | { 154 | "language" : "en-US", 155 | "taggedText" : "talk to IR." 156 | }, 157 | { 158 | "language" : "en-US", 159 | "taggedText" : "investor relations" 160 | } 161 | ] 162 | }, 163 | { 164 | "uniqueName" : "talk_to_support", 165 | "actions" : { 166 | "actions" : [ 167 | { 168 | "say" : "Thanks for contacting support. I'll connect you with a customer support representative." 169 | }, 170 | { 171 | "handoff" : { 172 | "method" : "POST", 173 | "channel" : "voice", 174 | "uri" : "https://handler.twilio.com/twiml/EHec1bbf48c2000f95f0506e6c1c54af72" 175 | } 176 | } 177 | ] 178 | }, 179 | "fields" : [], 180 | "samples" : [ 181 | { 182 | "language" : "en-US", 183 | "taggedText" : "someone to help me troubleshoot" 184 | }, 185 | { 186 | "language" : "en-US", 187 | "taggedText" : "talk to customer service." 188 | }, 189 | { 190 | "language" : "en-US", 191 | "taggedText" : "talk to support" 192 | }, 193 | { 194 | "language" : "en-US", 195 | "taggedText" : "customer support please" 196 | }, 197 | { 198 | "language" : "en-US", 199 | "taggedText" : "my product is not working" 200 | }, 201 | { 202 | "language" : "en-US", 203 | "taggedText" : "support please." 204 | }, 205 | { 206 | "language" : "en-US", 207 | "taggedText" : "customer service please" 208 | }, 209 | { 210 | "language" : "en-US", 211 | "taggedText" : "customer service" 212 | }, 213 | { 214 | "language" : "en-US", 215 | "taggedText" : "support" 216 | }, 217 | { 218 | "language" : "en-US", 219 | "taggedText" : "need support" 220 | } 221 | ] 222 | }, 223 | { 224 | "uniqueName" : "talk_to_sales", 225 | "actions" : { 226 | "actions" : [ 227 | { 228 | "say" : "Thanks for contacting sales. I'll connect you with a sales representative shortly." 229 | }, 230 | { 231 | "handoff" : { 232 | "method" : "POST", 233 | "channel" : "voice", 234 | "uri" : "https://handler.twilio.com/twiml/EHec1bbf48c2000f95f0506e6c1c54af72" 235 | } 236 | } 237 | ] 238 | }, 239 | "fields" : [], 240 | "samples" : [ 241 | { 242 | "language" : "en-US", 243 | "taggedText" : "have some questions about the product" 244 | }, 245 | { 246 | "language" : "en-US", 247 | "taggedText" : "learn more about the product" 248 | }, 249 | { 250 | "language" : "en-US", 251 | "taggedText" : "I want to find out pricing" 252 | }, 253 | { 254 | "language" : "en-US", 255 | "taggedText" : "Sales." 256 | }, 257 | { 258 | "language" : "en-US", 259 | "taggedText" : "Talk to sales." 260 | }, 261 | { 262 | "language" : "en-US", 263 | "taggedText" : "talk to a salesperson" 264 | }, 265 | { 266 | "language" : "en-US", 267 | "taggedText" : "talk to someone in sales" 268 | }, 269 | { 270 | "language" : "en-US", 271 | "taggedText" : "talk to sales" 272 | }, 273 | { 274 | "language" : "en-US", 275 | "taggedText" : "sales please" 276 | }, 277 | { 278 | "language" : "en-US", 279 | "taggedText" : "sales" 280 | } 281 | ] 282 | }, 283 | { 284 | "uniqueName" : "greeting", 285 | "actions" : { 286 | "actions" : [ 287 | { 288 | "say" : "Hi, thanks for contacting us. I can put you in touch with sales, support, investor relations, or our front desk. Who do you like to talk to today?" 289 | }, 290 | { "listen" : true } 291 | ] 292 | }, 293 | "fields" : [], 294 | "samples" : [ 295 | { 296 | "language" : "en-US", 297 | "taggedText" : "Hi" 298 | }, 299 | { 300 | "language" : "en-US", 301 | "taggedText" : "good morning" 302 | }, 303 | { 304 | "language" : "en-US", 305 | "taggedText" : "good afternoon" 306 | }, 307 | { 308 | "language" : "en-US", 309 | "taggedText" : "hello" 310 | }, 311 | { 312 | "language" : "en-US", 313 | "taggedText" : "heya" 314 | }, 315 | { 316 | "language" : "en-US", 317 | "taggedText" : "hi there" 318 | }, 319 | { 320 | "language" : "en-US", 321 | "taggedText" : "hi!" 322 | }, 323 | { 324 | "language" : "en-US", 325 | "taggedText" : "Hello." 326 | }, 327 | { 328 | "language" : "en-US", 329 | "taggedText" : "hi there." 330 | }, 331 | { 332 | "language" : "en-US", 333 | "taggedText" : "what'us up" 334 | }, 335 | { 336 | "language" : "en-US", 337 | "taggedText" : "yo" 338 | }, 339 | { 340 | "language" : "en-US", 341 | "taggedText" : "hey" 342 | }, 343 | { 344 | "language" : "en-US", 345 | "taggedText" : "what can you do" 346 | }, 347 | { 348 | "language" : "en-US", 349 | "taggedText" : "what do you do" 350 | }, 351 | { 352 | "language" : "en-US", 353 | "taggedText" : "whatsup" 354 | }, 355 | { 356 | "language" : "en-US", 357 | "taggedText" : "sup" 358 | } 359 | ] 360 | }, 361 | { 362 | "uniqueName" : "goodbye", 363 | "actions" : { 364 | "actions" : [ 365 | { 366 | "say" : "This is your new Task" 367 | } 368 | ] 369 | }, 370 | "fields" : [], 371 | "samples" : [ 372 | { 373 | "language" : "en-US", 374 | "taggedText" : "that's all for today" 375 | }, 376 | { 377 | "language" : "en-US", 378 | "taggedText" : "that is all thank you" 379 | }, 380 | { 381 | "language" : "en-US", 382 | "taggedText" : "no thanks" 383 | }, 384 | { 385 | "language" : "en-US", 386 | "taggedText" : "that would be all" 387 | }, 388 | { 389 | "language" : "en-US", 390 | "taggedText" : "that would be all thanks" 391 | }, 392 | { 393 | "language" : "en-US", 394 | "taggedText" : "no" 395 | }, 396 | { 397 | "language" : "en-US", 398 | "taggedText" : "no thanks" 399 | }, 400 | { 401 | "language" : "en-US", 402 | "taggedText" : "go away" 403 | }, 404 | { 405 | "language" : "en-US", 406 | "taggedText" : "cancel" 407 | }, 408 | { 409 | "language" : "en-US", 410 | "taggedText" : "goodbye" 411 | }, 412 | { 413 | "language" : "en-US", 414 | "taggedText" : "goodnight" 415 | }, 416 | { 417 | "language" : "en-US", 418 | "taggedText" : "stop talking" 419 | }, 420 | { 421 | "language" : "en-US", 422 | "taggedText" : "stop" 423 | }, 424 | { 425 | "language" : "en-US", 426 | "taggedText" : "see ya" 427 | }, 428 | { 429 | "language" : "en-US", 430 | "taggedText" : "bye bye" 431 | }, 432 | { 433 | "language" : "en-US", 434 | "taggedText" : "that's all" 435 | }, 436 | { 437 | "language" : "en-US", 438 | "taggedText" : "good bye" 439 | } 440 | ] 441 | }, 442 | { 443 | "uniqueName" : "fallback", 444 | "actions" : { 445 | "actions" : [ 446 | { 447 | "say" : "I'm sorry didn't quite get that. Please say that again." 448 | }, 449 | { "listen" : true } 450 | ] 451 | }, 452 | "fields" : [], 453 | "samples" : [] 454 | }, 455 | { 456 | "uniqueName" : "collect_fallback", 457 | "actions" : { 458 | "actions" : [ 459 | { 460 | "say" : "Looks like you having trouble. Apologies for that. Let's start again, how can I help you today?" 461 | }, 462 | { "listen" : true } 463 | ] 464 | }, 465 | "fields" : [], 466 | "samples" : [] 467 | } 468 | ], 469 | "modelBuild" : { "uniqueName" : "v0.1" } 470 | } 471 | -------------------------------------------------------------------------------- /Assistants/AirlineReservations/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "friendlyName" : "flight_assistant", 3 | "logQueries" : true, 4 | "uniqueName" : "flight_assistant", 5 | "defaults" : { 6 | "defaults" : { 7 | "assistant_initiation" : "task://welcome_message", 8 | "fallback" : "https://white-binturong-9697.twil.io/fallback-message", 9 | "collect" : { 10 | "validate_on_failure" : "task://hello_world" 11 | } 12 | } 13 | }, 14 | "styleSheet" : { 15 | "style_sheet" : { 16 | "collect" : { 17 | "validate" : { 18 | "on_failure" : { 19 | "repeat_question" : false, 20 | "messages" : [ 21 | { 22 | "say" : "I'm sorry, can you please say that again" 23 | }, 24 | { 25 | "say" : "hmm I still didn't catch that, can you please repeat" 26 | }, 27 | { 28 | "say" : "Let's give it one more try. Please say it one more time" 29 | } 30 | ] 31 | }, 32 | "on_success" : { "say" : "" }, 33 | "max_attempts" : 4 34 | } 35 | }, 36 | "voice" : { 37 | "say_voice" : "Polly.Matthew" 38 | } 39 | } 40 | }, 41 | "fieldTypes" : [], 42 | "tasks" : [ 43 | { 44 | "uniqueName" : "change_flight", 45 | "actions" : { 46 | "actions" : [ 47 | { 48 | "say" : "Got it. I'm going to get you connected to the next available agent to help you reschedule your flight." 49 | }, 50 | { 51 | "redirect" : "https://white-binturong-9697.twil.io/send-to-agent" 52 | } 53 | ] 54 | }, 55 | "fields" : [], 56 | "samples" : [ 57 | { 58 | "language" : "en-US", 59 | "taggedText" : "I need to switch flights" 60 | }, 61 | { 62 | "language" : "en-US", 63 | "taggedText" : "I need a new flight" 64 | }, 65 | { 66 | "language" : "en-US", 67 | "taggedText" : "I didn't catch my flight" 68 | }, 69 | { 70 | "language" : "en-US", 71 | "taggedText" : "Missed my flight" 72 | }, 73 | { 74 | "language" : "en-US", 75 | "taggedText" : "Missed flight" 76 | }, 77 | { 78 | "language" : "en-US", 79 | "taggedText" : "I missed my flight" 80 | }, 81 | { 82 | "language" : "en-US", 83 | "taggedText" : "I must change my flight" 84 | }, 85 | { 86 | "language" : "en-US", 87 | "taggedText" : "change my flight itinerary" 88 | }, 89 | { 90 | "language" : "en-US", 91 | "taggedText" : "I need to change my flight itinerary" 92 | }, 93 | { 94 | "language" : "en-US", 95 | "taggedText" : "I need to modify my flight details" 96 | }, 97 | { 98 | "language" : "en-US", 99 | "taggedText" : "I need to modify my flight information" 100 | }, 101 | { 102 | "language" : "en-US", 103 | "taggedText" : "modify my flight details" 104 | }, 105 | { 106 | "language" : "en-US", 107 | "taggedText" : "modify my flight information" 108 | }, 109 | { 110 | "language" : "en-US", 111 | "taggedText" : "update my flight information" 112 | }, 113 | { 114 | "language" : "en-US", 115 | "taggedText" : "pick a different time for my flight" 116 | }, 117 | { 118 | "language" : "en-US", 119 | "taggedText" : "change my flight times" 120 | }, 121 | { 122 | "language" : "en-US", 123 | "taggedText" : "change my itinerary" 124 | }, 125 | { 126 | "language" : "en-US", 127 | "taggedText" : "modify my itinerary" 128 | }, 129 | { 130 | "language" : "en-US", 131 | "taggedText" : "re-book flight" 132 | }, 133 | { 134 | "language" : "en-US", 135 | "taggedText" : "rebook flight" 136 | }, 137 | { 138 | "language" : "en-US", 139 | "taggedText" : "change flight" 140 | }, 141 | { 142 | "language" : "en-US", 143 | "taggedText" : "miss flight" 144 | }, 145 | { 146 | "language" : "en-US", 147 | "taggedText" : "I'm going to miss my flight" 148 | }, 149 | { 150 | "language" : "en-US", 151 | "taggedText" : "I need to change my flight" 152 | } 153 | ] 154 | }, 155 | { 156 | "uniqueName" : "book_flight", 157 | "actions" : { 158 | "actions" : [ 159 | { 160 | "say" : "I'd like to get a few details before connecting you to one of our amazing agents." 161 | }, 162 | { 163 | "collect" : { 164 | "on_complete" : { 165 | "redirect" : { 166 | "method" : "POST", 167 | "uri" : "https://white-binturong-9697.twil.io/book-confirmation" 168 | } 169 | }, 170 | "name" : "flight_details", 171 | "questions" : [ 172 | { 173 | "type" : "Twilio.CITY", 174 | "question" : "Where are you flying from?", 175 | "name" : "departure_city" 176 | }, 177 | { 178 | "type" : "Twilio.CITY", 179 | "question" : "Where are you flying to?", 180 | "name" : "destination_city" 181 | }, 182 | { 183 | "type" : "Twilio.DATE", 184 | "question" : "What day are you planning to travel?", 185 | "name" : "date" 186 | }, 187 | { 188 | "type" : "Twilio.YES_NO", 189 | "question" : "Is this a round trip?", 190 | "name" : "roundtrip" 191 | } 192 | ] 193 | } 194 | } 195 | ] 196 | }, 197 | "fields" : [], 198 | "samples" : [ 199 | { 200 | "language" : "en-US", 201 | "taggedText" : "I'd like to book a flight." 202 | }, 203 | { 204 | "language" : "en-US", 205 | "taggedText" : "I'd like to book an itinerary" 206 | }, 207 | { 208 | "language" : "en-US", 209 | "taggedText" : "Create itinerary" 210 | }, 211 | { 212 | "language" : "en-US", 213 | "taggedText" : "Help me find a flight please" 214 | }, 215 | { 216 | "language" : "en-US", 217 | "taggedText" : "Book me a flight, please" 218 | }, 219 | { 220 | "language" : "en-US", 221 | "taggedText" : "Please help me book a flight" 222 | }, 223 | { 224 | "language" : "en-US", 225 | "taggedText" : "Please help me find a flight" 226 | }, 227 | { 228 | "language" : "en-US", 229 | "taggedText" : "I need to find a flight" 230 | }, 231 | { 232 | "language" : "en-US", 233 | "taggedText" : "Sign up for a flight" 234 | }, 235 | { 236 | "language" : "en-US", 237 | "taggedText" : "Find a flight" 238 | }, 239 | { 240 | "language" : "en-US", 241 | "taggedText" : "Please create a new flight" 242 | }, 243 | { 244 | "language" : "en-US", 245 | "taggedText" : "book travel" 246 | }, 247 | { 248 | "language" : "en-US", 249 | "taggedText" : "Book flight" 250 | }, 251 | { 252 | "language" : "en-US", 253 | "taggedText" : "I want to book a flight" 254 | }, 255 | { 256 | "language" : "en-US", 257 | "taggedText" : "I need to book travel" 258 | } 259 | ] 260 | }, 261 | { 262 | "uniqueName" : "get_flight_time", 263 | "actions" : { 264 | "actions" : [ 265 | { 266 | "say" : "Sure, I can help you find your flight details." 267 | }, 268 | { 269 | "collect" : { 270 | "on_complete" : { 271 | "redirect" : { 272 | "method" : "POST", 273 | "uri" : "https://white-binturong-9697.twil.io/flight-details" 274 | } 275 | }, 276 | "name" : "get_details", 277 | "questions" : [ 278 | { 279 | "type" : "Twilio.FIRST_NAME", 280 | "question" : "What is your legal first name?", 281 | "name" : "first_name" 282 | }, 283 | { 284 | "type" : "Twilio.LAST_NAME", 285 | "question" : "What is your legal last name?", 286 | "name" : "last_name" 287 | }, 288 | { 289 | "type" : "Twilio.CITY", 290 | "question" : "What city are you departing from?", 291 | "name" : "departure_city" 292 | } 293 | ] 294 | } 295 | } 296 | ] 297 | }, 298 | "fields" : [], 299 | "samples" : [ 300 | { 301 | "language" : "en-US", 302 | "taggedText" : "What are my flight details?" 303 | }, 304 | { 305 | "language" : "en-US", 306 | "taggedText" : "What details are for my flight?" 307 | }, 308 | { 309 | "language" : "en-US", 310 | "taggedText" : "I need my flight details" 311 | }, 312 | { 313 | "language" : "en-US", 314 | "taggedText" : "What are my flight details" 315 | }, 316 | { 317 | "language" : "en-US", 318 | "taggedText" : "Get flight details" 319 | }, 320 | { 321 | "language" : "en-US", 322 | "taggedText" : "What time does my flight land" 323 | }, 324 | { 325 | "language" : "en-US", 326 | "taggedText" : "What time does my flight take off" 327 | }, 328 | { 329 | "language" : "en-US", 330 | "taggedText" : "What time does my flight leave" 331 | }, 332 | { 333 | "language" : "en-US", 334 | "taggedText" : "What time is my flight" 335 | }, 336 | { 337 | "language" : "en-US", 338 | "taggedText" : "When does my flight take off" 339 | }, 340 | { 341 | "language" : "en-US", 342 | "taggedText" : "Is my flight late" 343 | }, 344 | { 345 | "language" : "en-US", 346 | "taggedText" : "Is my flight on time" 347 | }, 348 | { 349 | "language" : "en-US", 350 | "taggedText" : "When does my flight check in" 351 | }, 352 | { 353 | "language" : "en-US", 354 | "taggedText" : "When is my flight landing" 355 | }, 356 | { 357 | "language" : "en-US", 358 | "taggedText" : "When is my flight" 359 | }, 360 | { 361 | "language" : "en-US", 362 | "taggedText" : "I need my flight times" 363 | }, 364 | { 365 | "language" : "en-US", 366 | "taggedText" : "What are my flight times" 367 | } 368 | ] 369 | }, 370 | { 371 | "uniqueName" : "send_to_agent", 372 | "actions" : { 373 | "actions" : [ 374 | { 375 | "redirect" : "https://white-binturong-9697.twil.io/send-to-agent" 376 | } 377 | ] 378 | }, 379 | "fields" : [], 380 | "samples" : [ 381 | { 382 | "language" : "en-US", 383 | "taggedText" : "I'd like an agent" 384 | }, 385 | { 386 | "language" : "en-US", 387 | "taggedText" : "Speak to an agent please" 388 | }, 389 | { 390 | "language" : "en-US", 391 | "taggedText" : "Speak to an agent" 392 | }, 393 | { 394 | "language" : "en-US", 395 | "taggedText" : "Speak to agent" 396 | }, 397 | { 398 | "language" : "en-US", 399 | "taggedText" : "Agent please" 400 | }, 401 | { 402 | "language" : "en-US", 403 | "taggedText" : "agent" 404 | }, 405 | { 406 | "language" : "en-US", 407 | "taggedText" : "Agent please" 408 | }, 409 | { 410 | "language" : "en-US", 411 | "taggedText" : "This isn't working" 412 | }, 413 | { 414 | "language" : "en-US", 415 | "taggedText" : "I need an agent" 416 | }, 417 | { 418 | "language" : "en-US", 419 | "taggedText" : "Talk to an agent" 420 | }, 421 | { 422 | "language" : "en-US", 423 | "taggedText" : "Switch to agent" 424 | } 425 | ] 426 | }, 427 | { 428 | "uniqueName" : "welcome_message", 429 | "actions" : { 430 | "actions" : [ 431 | { 432 | "say" : "Welcome to Owl Airlines. How can we help you today?" 433 | }, 434 | { "listen" : true } 435 | ] 436 | }, 437 | "fields" : [], 438 | "samples" : [ 439 | { 440 | "language" : "en-US", 441 | "taggedText" : "Hello there" 442 | }, 443 | { 444 | "language" : "en-US", 445 | "taggedText" : "Whats up" 446 | }, 447 | { 448 | "language" : "en-US", 449 | "taggedText" : "Heyo" 450 | }, 451 | { 452 | "language" : "en-US", 453 | "taggedText" : "Hi there" 454 | }, 455 | { 456 | "language" : "en-US", 457 | "taggedText" : "Yo" 458 | }, 459 | { 460 | "language" : "en-US", 461 | "taggedText" : "Hey" 462 | }, 463 | { 464 | "language" : "en-US", 465 | "taggedText" : "How's it going" 466 | }, 467 | { 468 | "language" : "en-US", 469 | "taggedText" : "Hi" 470 | }, 471 | { 472 | "language" : "en-US", 473 | "taggedText" : "Hello" 474 | }, 475 | { 476 | "language" : "en-US", 477 | "taggedText" : "Lets start" 478 | }, 479 | { 480 | "language" : "en-US", 481 | "taggedText" : "Begin" 482 | }, 483 | { 484 | "language" : "en-US", 485 | "taggedText" : "BEGIN" 486 | }, 487 | { 488 | "language" : "en-US", 489 | "taggedText" : "begin" 490 | }, 491 | { 492 | "language" : "en-US", 493 | "taggedText" : "INITIATE" 494 | }, 495 | { 496 | "language" : "en-US", 497 | "taggedText" : "START" 498 | }, 499 | { 500 | "language" : "en-US", 501 | "taggedText" : "initiate" 502 | }, 503 | { 504 | "language" : "en-US", 505 | "taggedText" : "Initiate" 506 | }, 507 | { 508 | "language" : "en-US", 509 | "taggedText" : "start" 510 | }, 511 | { 512 | "language" : "en-US", 513 | "taggedText" : "Start" 514 | } 515 | ] 516 | } 517 | ], 518 | "modelBuild" : { "uniqueName" : "V2" } 519 | } -------------------------------------------------------------------------------- /Assistants/ApptScheduling/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "friendlyName" : "Manage appointment scheduling", 3 | "logQueries" : true, 4 | "uniqueName" : "ApptScheduling", 5 | "defaults" : { 6 | "defaults" : { 7 | "assistant_initiation" : "task://greeting", 8 | "fallback" : "task://fallback", 9 | "collect" : { 10 | "validate_on_failure" : "task://collect_fallback" 11 | } 12 | } 13 | }, 14 | "styleSheet" : { 15 | "style_sheet" : { 16 | "collect" : { 17 | "validate" : { 18 | "on_failure" : { 19 | "repeat_question" : false, 20 | "messages" : [ 21 | { 22 | "say" : "I didn't get that. What did you say?" 23 | }, 24 | { 25 | "say" : "I still didn't catch that. Please repeat." 26 | }, 27 | { 28 | "say" : "Let's try one last time. Say it again please." 29 | } 30 | ] 31 | }, 32 | "on_success" : { "say" : "" }, 33 | "max_attempts" : 4 34 | } 35 | }, 36 | "voice" : { 37 | "say_voice" : "Polly.Matthew" 38 | } 39 | } 40 | }, 41 | "fieldTypes" : [], 42 | "tasks" : [ 43 | { 44 | "uniqueName" : "collect_fallback", 45 | "actions" : { 46 | "actions" : [ 47 | { 48 | "say" : "Looks like you having trouble. Apologies for that. Let's start again, how can I help you today?" 49 | }, 50 | { "listen" : true } 51 | ] 52 | }, 53 | "fields" : [], 54 | "samples" : [] 55 | }, 56 | { 57 | "uniqueName" : "goodbye", 58 | "actions" : { 59 | "actions" : [ 60 | { 61 | "say" : "Ok, I'll be here when you need me." 62 | } 63 | ] 64 | }, 65 | "fields" : [], 66 | "samples" : [ 67 | { 68 | "language" : "en-US", 69 | "taggedText" : "no thanks" 70 | }, 71 | { 72 | "language" : "en-US", 73 | "taggedText" : "that's all for today" 74 | }, 75 | { 76 | "language" : "en-US", 77 | "taggedText" : "that's all thank you" 78 | }, 79 | { 80 | "language" : "en-US", 81 | "taggedText" : "that would be all" 82 | }, 83 | { 84 | "language" : "en-US", 85 | "taggedText" : "that would be all thanks" 86 | }, 87 | { 88 | "language" : "en-US", 89 | "taggedText" : "no" 90 | }, 91 | { 92 | "language" : "en-US", 93 | "taggedText" : "no thanks" 94 | }, 95 | { 96 | "language" : "en-US", 97 | "taggedText" : "go away" 98 | }, 99 | { 100 | "language" : "en-US", 101 | "taggedText" : "cancel" 102 | }, 103 | { 104 | "language" : "en-US", 105 | "taggedText" : "goodbye" 106 | }, 107 | { 108 | "language" : "en-US", 109 | "taggedText" : "goodnight" 110 | }, 111 | { 112 | "language" : "en-US", 113 | "taggedText" : "stop talking" 114 | }, 115 | { 116 | "language" : "en-US", 117 | "taggedText" : "stop" 118 | }, 119 | { 120 | "language" : "en-US", 121 | "taggedText" : "see ya" 122 | }, 123 | { 124 | "language" : "en-US", 125 | "taggedText" : "bye bye" 126 | }, 127 | { 128 | "language" : "en-US", 129 | "taggedText" : "that's all" 130 | }, 131 | { 132 | "language" : "en-US", 133 | "taggedText" : "good bye" 134 | } 135 | ] 136 | }, 137 | { 138 | "uniqueName" : "fallback", 139 | "actions" : { 140 | "actions" : [ 141 | { 142 | "say" : "I'm sorry didn't quite get that. Please say that again." 143 | }, 144 | { "listen" : true } 145 | ] 146 | }, 147 | "fields" : [], 148 | "samples" : [] 149 | }, 150 | { 151 | "uniqueName" : "greeting", 152 | "actions" : { 153 | "actions" : [ 154 | { 155 | "say" : "Thanks for contacting our store! I can help you book a new appointment, modify an existing one or tell you about upcoming appointments. How can I help you today?" 156 | }, 157 | { "listen" : true } 158 | ] 159 | }, 160 | "fields" : [], 161 | "samples" : [ 162 | { 163 | "language" : "en-US", 164 | "taggedText" : "hi" 165 | }, 166 | { 167 | "language" : "en-US", 168 | "taggedText" : "good morning" 169 | }, 170 | { 171 | "language" : "en-US", 172 | "taggedText" : "good afternoon" 173 | }, 174 | { 175 | "language" : "en-US", 176 | "taggedText" : "hello" 177 | }, 178 | { 179 | "language" : "en-US", 180 | "taggedText" : "heya" 181 | }, 182 | { 183 | "language" : "en-US", 184 | "taggedText" : "hi there" 185 | }, 186 | { 187 | "language" : "en-US", 188 | "taggedText" : "hi" 189 | }, 190 | { 191 | "language" : "en-US", 192 | "taggedText" : "hello" 193 | }, 194 | { 195 | "language" : "en-US", 196 | "taggedText" : "what's up" 197 | }, 198 | { 199 | "language" : "en-US", 200 | "taggedText" : "hi there" 201 | }, 202 | { 203 | "language" : "en-US", 204 | "taggedText" : "yo" 205 | }, 206 | { 207 | "language" : "en-US", 208 | "taggedText" : "hey" 209 | }, 210 | { 211 | "language" : "en-US", 212 | "taggedText" : "what can you do" 213 | }, 214 | { 215 | "language" : "en-US", 216 | "taggedText" : "what do you do" 217 | }, 218 | { 219 | "language" : "en-US", 220 | "taggedText" : "whatsup" 221 | }, 222 | { 223 | "language" : "en-US", 224 | "taggedText" : "sup" 225 | } 226 | ] 227 | }, 228 | { 229 | "uniqueName" : "book_appointments", 230 | "actions" : { 231 | "actions" : [ 232 | { 233 | "say" : "Okay lets get you a new appointment. I just need you to answer a few questions." 234 | }, 235 | { 236 | "collect" : { 237 | "on_complete" : { 238 | "redirect" : "task://complete_booking" 239 | }, 240 | "name" : "schedule_appt", 241 | "questions" : [ 242 | { 243 | "type" : "Twilio.DATE", 244 | "question" : "Please tell me the date you want to come in.", 245 | "name" : "appt_date" 246 | }, 247 | { 248 | "type" : "Twilio.TIME", 249 | "question" : "Thanks, and what time?", 250 | "name" : "appt_time" 251 | }, 252 | { 253 | "type" : "Twilio.PHONE_NUMBER", 254 | "question" : "Awesome, last question. What is the best number to reach you on?", 255 | "name" : "appt_phone_number" 256 | } 257 | ] 258 | } 259 | } 260 | ] 261 | }, 262 | "fields" : [ 263 | { 264 | "uniqueName" : "ApptDate", 265 | "fieldType" : "Twilio.DATE" 266 | }, 267 | { 268 | "uniqueName" : "ApptTime", 269 | "fieldType" : "Twilio.TIME" 270 | } 271 | ], 272 | "samples" : [ 273 | { 274 | "language" : "en-US", 275 | "taggedText" : "book appointment for {ApptTime} on {ApptDate}" 276 | }, 277 | { 278 | "language" : "en-US", 279 | "taggedText" : "Can I get a new appointment on {ApptDate}?" 280 | }, 281 | { 282 | "language" : "en-US", 283 | "taggedText" : "book appointment for {ApptDate}" 284 | }, 285 | { 286 | "language" : "en-US", 287 | "taggedText" : "I'd like to book an appointment on {ApptDate} at {ApptTime}" 288 | }, 289 | { 290 | "language" : "en-US", 291 | "taggedText" : "book appointment for {ApptTime}" 292 | }, 293 | { 294 | "language" : "en-US", 295 | "taggedText" : "I want an appointment at {ApptTime} on {ApptDate}" 296 | }, 297 | { 298 | "language" : "en-US", 299 | "taggedText" : "Can I have a new appointment at {ApptTime} on {ApptDate}?" 300 | }, 301 | { 302 | "language" : "en-US", 303 | "taggedText" : "Can I get a new appointment at {ApptTime} on {ApptDate}?" 304 | }, 305 | { 306 | "language" : "en-US", 307 | "taggedText" : "Can I get an appointment" 308 | }, 309 | { 310 | "language" : "en-US", 311 | "taggedText" : "Can I book a new appointment please?" 312 | }, 313 | { 314 | "language" : "en-US", 315 | "taggedText" : "Can I get a new appointment?" 316 | }, 317 | { 318 | "language" : "en-US", 319 | "taggedText" : "I'd like to make a new appointment" 320 | }, 321 | { 322 | "language" : "en-US", 323 | "taggedText" : "I want to make an appointment" 324 | }, 325 | { 326 | "language" : "en-US", 327 | "taggedText" : "New appointment" 328 | }, 329 | { 330 | "language" : "en-US", 331 | "taggedText" : "make appointment" 332 | }, 333 | { 334 | "language" : "en-US", 335 | "taggedText" : "I want a new appointment" 336 | }, 337 | { 338 | "language" : "en-US", 339 | "taggedText" : "Can I make a new appointment" 340 | }, 341 | { 342 | "language" : "en-US", 343 | "taggedText" : "Appointment" 344 | }, 345 | { 346 | "language" : "en-US", 347 | "taggedText" : "New appointment please" 348 | }, 349 | { 350 | "language" : "en-US", 351 | "taggedText" : "Get me a new appointment please." 352 | }, 353 | { 354 | "language" : "en-US", 355 | "taggedText" : "get me a new appointment" 356 | } 357 | ] 358 | }, 359 | { 360 | "uniqueName" : "list_appointments", 361 | "actions" : { 362 | "actions" : [ 363 | { 364 | "say" : "Your next appointment is on July 1st at 4.30 pm. I can always help you reschedule or cancel it." 365 | }, 366 | { 367 | "listen" : { 368 | "tasks" : [ 369 | "cancel_appointments", 370 | "change_appointments", 371 | "goodbye" 372 | ] 373 | } 374 | } 375 | ] 376 | }, 377 | "fields" : [], 378 | "samples" : [ 379 | { 380 | "language" : "en-US", 381 | "taggedText" : "what time is my appointment" 382 | }, 383 | { 384 | "language" : "en-US", 385 | "taggedText" : "when do I come in?" 386 | }, 387 | { 388 | "language" : "en-US", 389 | "taggedText" : "tell me when I'm scheduled for" 390 | }, 391 | { 392 | "language" : "en-US", 393 | "taggedText" : "manage my appointment" 394 | }, 395 | { 396 | "language" : "en-US", 397 | "taggedText" : "what's my upcoming appointment" 398 | }, 399 | { 400 | "language" : "en-US", 401 | "taggedText" : "When is my appointment" 402 | }, 403 | { 404 | "language" : "en-US", 405 | "taggedText" : "When is my next appointment" 406 | }, 407 | { 408 | "language" : "en-US", 409 | "taggedText" : "When am I due to come in next?" 410 | }, 411 | { 412 | "language" : "en-US", 413 | "taggedText" : "When is my next appointment?" 414 | }, 415 | { 416 | "language" : "en-US", 417 | "taggedText" : "Next appointment?" 418 | }, 419 | { 420 | "language" : "en-US", 421 | "taggedText" : "When do I come in next?" 422 | } 423 | ] 424 | }, 425 | { 426 | "uniqueName" : "cancel_appointments", 427 | "actions" : { 428 | "actions" : [ 429 | { 430 | "say" : "Okay I've cancelled your appointment. What else can I help you with?" 431 | }, 432 | { 433 | "listen" : { 434 | "tasks" : [ 435 | "book_appointments", 436 | "list_appointments", 437 | "goodbye" 438 | ] 439 | } 440 | } 441 | ] 442 | }, 443 | "fields" : [], 444 | "samples" : [ 445 | { 446 | "language" : "en-US", 447 | "taggedText" : "cancel appt" 448 | }, 449 | { 450 | "language" : "en-US", 451 | "taggedText" : "can't make my appointment" 452 | }, 453 | { 454 | "language" : "en-US", 455 | "taggedText" : "need to cancel" 456 | }, 457 | { 458 | "language" : "en-US", 459 | "taggedText" : "can't come in" 460 | }, 461 | { 462 | "language" : "en-US", 463 | "taggedText" : "I want to cancel my appointment" 464 | }, 465 | { 466 | "language" : "en-US", 467 | "taggedText" : "Cancel appointment" 468 | }, 469 | { 470 | "language" : "en-US", 471 | "taggedText" : "Please cancel my appointment?" 472 | }, 473 | { 474 | "language" : "en-US", 475 | "taggedText" : "Can you help me cancel my appointment?" 476 | }, 477 | { 478 | "language" : "en-US", 479 | "taggedText" : "I need to cancel my session" 480 | }, 481 | { 482 | "language" : "en-US", 483 | "taggedText" : "I need to cancel my appointment please" 484 | } 485 | ] 486 | }, 487 | { 488 | "uniqueName" : "change_appointments", 489 | "actions" : { 490 | "actions" : [ 491 | { 492 | "say" : "Okay I've changed your appointment to July 3rd at 4.30 pm. What else can I help you with?" 493 | }, 494 | { 495 | "listen" : { 496 | "tasks" : [ 497 | "cancel_appointments", 498 | "list_appointments", 499 | "goodbye" 500 | ] 501 | } 502 | } 503 | ] 504 | }, 505 | "fields" : [], 506 | "samples" : [ 507 | { 508 | "language" : "en-US", 509 | "taggedText" : "move appointment" 510 | }, 511 | { 512 | "language" : "en-US", 513 | "taggedText" : "move my appointment" 514 | }, 515 | { 516 | "language" : "en-US", 517 | "taggedText" : "change appt" 518 | }, 519 | { 520 | "language" : "en-US", 521 | "taggedText" : "modify appointment" 522 | }, 523 | { 524 | "language" : "en-US", 525 | "taggedText" : "modify appt" 526 | }, 527 | { 528 | "language" : "en-US", 529 | "taggedText" : "Please help me change my appointment" 530 | }, 531 | { 532 | "language" : "en-US", 533 | "taggedText" : "I can't make it anymore, can you help me change my appointment?" 534 | }, 535 | { 536 | "language" : "en-US", 537 | "taggedText" : "I need to change my appointment" 538 | }, 539 | { 540 | "language" : "en-US", 541 | "taggedText" : "Change appointment" 542 | }, 543 | { 544 | "language" : "en-US", 545 | "taggedText" : "Change my appointment" 546 | } 547 | ] 548 | }, 549 | { 550 | "uniqueName" : "complete_booking", 551 | "actions" : { 552 | "actions" : [ 553 | { 554 | "say" : "Thanks! I've booked your appointment. See you soon :)" 555 | } 556 | ] 557 | }, 558 | "fields" : [], 559 | "samples" : [] 560 | } 561 | ], 562 | "modelBuild" : { "uniqueName" : "5" } 563 | } 564 | -------------------------------------------------------------------------------- /Assistants/RealEstate/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "friendlyName" : "Answer questions about a real estate listing and schedule an open house", 3 | "logQueries" : true, 4 | "uniqueName" : "RealEstate", 5 | "defaults" : { 6 | "defaults" : { 7 | "assistant_initiation" : "task://greeting", 8 | "fallback" : "task://fallback", 9 | "collect" : { 10 | "validate_on_failure" : "task://collect_fallback" 11 | } 12 | } 13 | }, 14 | "styleSheet" : { 15 | "style_sheet" : { 16 | "collect" : { 17 | "validate" : { 18 | "on_failure" : { 19 | "repeat_question" : false, 20 | "messages" : [ 21 | { 22 | "say" : "I didn't get that. What did you say?" 23 | }, 24 | { 25 | "say" : "I still didn't catch that. Please repeat." 26 | }, 27 | { 28 | "say" : "Let's try one last time. Say it again please." 29 | } 30 | ] 31 | }, 32 | "on_success" : { "say" : "" }, 33 | "max_attempts" : 4 34 | } 35 | }, 36 | "voice" : { 37 | "say_voice" : "Polly.Matthew" 38 | } 39 | } 40 | }, 41 | "fieldTypes" : [ 42 | { 43 | "uniqueName" : "CUSTOM.numBedrooms", 44 | "values" : [ 45 | { 46 | "language" : "en-US", 47 | "value" : "studio", 48 | "synonymOf" : null 49 | }, 50 | { 51 | "language" : "en-US", 52 | "value" : "3", 53 | "synonymOf" : null 54 | }, 55 | { 56 | "language" : "en-US", 57 | "value" : "1", 58 | "synonymOf" : null 59 | }, 60 | { 61 | "language" : "en-US", 62 | "value" : "4", 63 | "synonymOf" : null 64 | }, 65 | { 66 | "language" : "en-US", 67 | "value" : "5", 68 | "synonymOf" : null 69 | }, 70 | { 71 | "language" : "en-US", 72 | "value" : "2", 73 | "synonymOf" : null 74 | }, 75 | { 76 | "language" : "en-US", 77 | "value" : "7", 78 | "synonymOf" : null 79 | }, 80 | { 81 | "language" : "en-US", 82 | "value" : "6", 83 | "synonymOf" : null 84 | }, 85 | { 86 | "language" : "en-US", 87 | "value" : "8", 88 | "synonymOf" : null 89 | }, 90 | { 91 | "language" : "en-US", 92 | "value" : "9", 93 | "synonymOf" : null 94 | }, 95 | { 96 | "language" : "en-US", 97 | "value" : "10", 98 | "synonymOf" : null 99 | }, 100 | { 101 | "language" : "en-US", 102 | "value" : "four", 103 | "synonymOf" : null 104 | }, 105 | { 106 | "language" : "en-US", 107 | "value" : "one", 108 | "synonymOf" : null 109 | }, 110 | { 111 | "language" : "en-US", 112 | "value" : "two", 113 | "synonymOf" : null 114 | }, 115 | { 116 | "language" : "en-US", 117 | "value" : "three", 118 | "synonymOf" : null 119 | }, 120 | { 121 | "language" : "en-US", 122 | "value" : "six", 123 | "synonymOf" : null 124 | }, 125 | { 126 | "language" : "en-US", 127 | "value" : "five", 128 | "synonymOf" : null 129 | } 130 | ] 131 | } 132 | ], 133 | "tasks" : [ 134 | { 135 | "uniqueName" : "get_available_listings", 136 | "actions" : { 137 | "actions" : [ 138 | { 139 | "say" : "We have four studios, two 1 bedroom apartments and three 2 bedroom apartments available for rent right now. Can I help with anything else?" 140 | }, 141 | { "listen" : true } 142 | ] 143 | }, 144 | "fields" : [ 145 | { 146 | "uniqueName" : "rooms_number", 147 | "fieldType" : "CUSTOM.numBedrooms" 148 | } 149 | ], 150 | "samples" : [ 151 | { 152 | "language" : "en-US", 153 | "taggedText" : "How many {rooms_number} apartments are still available?" 154 | }, 155 | { 156 | "language" : "en-US", 157 | "taggedText" : "Do you have {rooms_number} apartments for rent?" 158 | }, 159 | { 160 | "language" : "en-US", 161 | "taggedText" : "What availability do you have of {rooms_number} apartments?" 162 | }, 163 | { 164 | "language" : "en-US", 165 | "taggedText" : "Are any {rooms_number} bedroom apartments available for rent?" 166 | }, 167 | { 168 | "language" : "en-US", 169 | "taggedText" : "How many {rooms_number} bedroom apartments do you have?" 170 | }, 171 | { 172 | "language" : "en-US", 173 | "taggedText" : "Do you have any {rooms_number} apartments?" 174 | }, 175 | { 176 | "language" : "en-US", 177 | "taggedText" : "What do you have available?" 178 | } 179 | ] 180 | }, 181 | { 182 | "uniqueName" : "complete_scheduling", 183 | "actions" : { 184 | "actions" : [ 185 | { 186 | "say" : "Great I've booked a viewing for you. Is there anything else I can help with?" 187 | }, 188 | { "listen" : true } 189 | ] 190 | }, 191 | "fields" : [], 192 | "samples" : [] 193 | }, 194 | { 195 | "uniqueName" : "get_pets_policy", 196 | "actions" : { 197 | "actions" : [ 198 | { 199 | "say" : "We allow cats with an additional rent of $250/month and a one-time $500 deposit. Unfortunately, we do not allow dogs. Can I help with anything else?" 200 | }, 201 | { "listen" : true } 202 | ] 203 | }, 204 | "fields" : [], 205 | "samples" : [ 206 | { 207 | "language" : "en-US", 208 | "taggedText" : "I have a cat. Do you allow cats?" 209 | }, 210 | { 211 | "language" : "en-US", 212 | "taggedText" : "What is your cat policy?" 213 | }, 214 | { 215 | "language" : "en-US", 216 | "taggedText" : "How much extra for a pet?" 217 | }, 218 | { 219 | "language" : "en-US", 220 | "taggedText" : "Which dog breeds do you allow?" 221 | }, 222 | { 223 | "language" : "en-US", 224 | "taggedText" : "What pets do you allow?" 225 | }, 226 | { 227 | "language" : "en-US", 228 | "taggedText" : "Do you allows dogs?" 229 | }, 230 | { 231 | "language" : "en-US", 232 | "taggedText" : "What is your policy on dogs" 233 | }, 234 | { 235 | "language" : "en-US", 236 | "taggedText" : "What is your policy on pets" 237 | }, 238 | { 239 | "language" : "en-US", 240 | "taggedText" : "Pets policy" 241 | }, 242 | { 243 | "language" : "en-US", 244 | "taggedText" : "Do you allow cats?" 245 | } 246 | ] 247 | }, 248 | { 249 | "uniqueName" : "get_rent", 250 | "actions" : { 251 | "actions" : [ 252 | { 253 | "say" : "The rent for our 1 bedrooms starts from $2000/month and $3000/month for our 2 bedrooms. We also require a deposit equal to one month's rent. Is there anything else I can help with?" 254 | }, 255 | { "listen" : true } 256 | ] 257 | }, 258 | "fields" : [], 259 | "samples" : [ 260 | { 261 | "language" : "en-US", 262 | "taggedText" : "Do you have a deposit" 263 | }, 264 | { 265 | "language" : "en-US", 266 | "taggedText" : "Do you have a deposit with the rent?" 267 | }, 268 | { 269 | "language" : "en-US", 270 | "taggedText" : "What is the rent" 271 | }, 272 | { 273 | "language" : "en-US", 274 | "taggedText" : "How much is the rent" 275 | }, 276 | { 277 | "language" : "en-US", 278 | "taggedText" : "Do you require a deposit" 279 | }, 280 | { 281 | "language" : "en-US", 282 | "taggedText" : "Monthly rent?" 283 | }, 284 | { 285 | "language" : "en-US", 286 | "taggedText" : "Rent" 287 | }, 288 | { 289 | "language" : "en-US", 290 | "taggedText" : "Yes can you tell me what the rent is?" 291 | }, 292 | { 293 | "language" : "en-US", 294 | "taggedText" : "How much is the rent for your apartments?" 295 | }, 296 | { 297 | "language" : "en-US", 298 | "taggedText" : "What is your rent?" 299 | } 300 | ] 301 | }, 302 | { 303 | "uniqueName" : "schedule_open_house", 304 | "actions" : { 305 | "actions" : [ 306 | { 307 | "say" : "Okay lets schedule a viewing for you. I just need you to answer a few questions." 308 | }, 309 | { 310 | "collect" : { 311 | "on_complete" : { 312 | "redirect" : "task://complete_scheduling" 313 | }, 314 | "name" : "schedule_open_house", 315 | "questions" : [ 316 | { 317 | "type" : "Twilio.DATE", 318 | "question" : "What date do you want to come visit?", 319 | "name" : "open_house_date" 320 | }, 321 | { 322 | "type" : "Twilio.TIME", 323 | "question" : "Thanks, what time would you like to come in?", 324 | "name" : "open_house_time" 325 | }, 326 | { 327 | "type" : "Twilio.FIRST_NAME", 328 | "question" : "Thanks, what's the name of the person attending?", 329 | "name" : "open_house_name" 330 | }, 331 | { 332 | "type" : "Twilio.PHONE_NUMBER", 333 | "question" : "Awesome, last question. What is the best number to reach you at?", 334 | "name" : "open_house_phone_number" 335 | } 336 | ] 337 | } 338 | } 339 | ] 340 | }, 341 | "fields" : [ 342 | { 343 | "uniqueName" : "prospect_last_name", 344 | "fieldType" : "Twilio.LAST_NAME" 345 | }, 346 | { 347 | "uniqueName" : "prospect_first_name", 348 | "fieldType" : "Twilio.FIRST_NAME" 349 | } 350 | ], 351 | "samples" : [ 352 | { 353 | "language" : "en-US", 354 | "taggedText" : "My name is {prospect_first_name}. I'd like to set up an open house." 355 | }, 356 | { 357 | "language" : "en-US", 358 | "taggedText" : "I want to set up an open house. My name is {prospect_first_name} {prospect_last_name}." 359 | }, 360 | { 361 | "language" : "en-US", 362 | "taggedText" : "Can you help me set up an open house for {prospect_first_name} {prospect_last_name}." 363 | }, 364 | { 365 | "language" : "en-US", 366 | "taggedText" : "Hi, I'd like to set up an open house for {prospect_first_name} {prospect_last_name}." 367 | }, 368 | { 369 | "language" : "en-US", 370 | "taggedText" : "My name is {prospect_first_name} {prospect_last_name}. I'd like to set up an open house." 371 | }, 372 | { 373 | "language" : "en-US", 374 | "taggedText" : "Hi, I'd like to schedule an open house for {prospect_first_name} {prospect_last_name}." 375 | }, 376 | { 377 | "language" : "en-US", 378 | "taggedText" : "Hi, I'm {prospect_first_name} {prospect_last_name} calling. I'd like to schedule an open house." 379 | }, 380 | { 381 | "language" : "en-US", 382 | "taggedText" : "When can I come in for a viewing?" 383 | }, 384 | { 385 | "language" : "en-US", 386 | "taggedText" : "When is the next open house?" 387 | }, 388 | { 389 | "language" : "en-US", 390 | "taggedText" : "Come in for a viewing" 391 | }, 392 | { 393 | "language" : "en-US", 394 | "taggedText" : "Book a viewing" 395 | }, 396 | { 397 | "language" : "en-US", 398 | "taggedText" : "Book an open house" 399 | }, 400 | { 401 | "language" : "en-US", 402 | "taggedText" : "I want to schedule an open house" 403 | }, 404 | { 405 | "language" : "en-US", 406 | "taggedText" : "Schedule a viewing" 407 | }, 408 | { 409 | "language" : "en-US", 410 | "taggedText" : "I want to come in for a viewing" 411 | }, 412 | { 413 | "language" : "en-US", 414 | "taggedText" : "when is the next open house" 415 | }, 416 | { 417 | "language" : "en-US", 418 | "taggedText" : "Open house" 419 | } 420 | ] 421 | }, 422 | { 423 | "uniqueName" : "greeting", 424 | "actions" : { 425 | "actions" : [ 426 | { 427 | "say" : "Hello, I can help schedule an open house, tell you about the apartments we have available and answer questions about our policies. What can I help you with today?" 428 | }, 429 | { "listen" : true } 430 | ] 431 | }, 432 | "fields" : [], 433 | "samples" : [ 434 | { 435 | "language" : "en-US", 436 | "taggedText" : "sup" 437 | }, 438 | { 439 | "language" : "en-US", 440 | "taggedText" : "whatsup" 441 | }, 442 | { 443 | "language" : "en-US", 444 | "taggedText" : "what do you do" 445 | }, 446 | { 447 | "language" : "en-US", 448 | "taggedText" : "what can you do" 449 | }, 450 | { 451 | "language" : "en-US", 452 | "taggedText" : "hey" 453 | }, 454 | { 455 | "language" : "en-US", 456 | "taggedText" : "yo" 457 | }, 458 | { 459 | "language" : "en-US", 460 | "taggedText" : "what'us up" 461 | }, 462 | { 463 | "language" : "en-US", 464 | "taggedText" : "hi there." 465 | }, 466 | { 467 | "language" : "en-US", 468 | "taggedText" : "Hello." 469 | }, 470 | { 471 | "language" : "en-US", 472 | "taggedText" : "hi!" 473 | }, 474 | { 475 | "language" : "en-US", 476 | "taggedText" : "hi there" 477 | }, 478 | { 479 | "language" : "en-US", 480 | "taggedText" : "heya" 481 | }, 482 | { 483 | "language" : "en-US", 484 | "taggedText" : "hello" 485 | }, 486 | { 487 | "language" : "en-US", 488 | "taggedText" : "good afternoon" 489 | }, 490 | { 491 | "language" : "en-US", 492 | "taggedText" : "good morning" 493 | }, 494 | { 495 | "language" : "en-US", 496 | "taggedText" : "Hi" 497 | } 498 | ] 499 | }, 500 | { 501 | "uniqueName" : "goodbye", 502 | "actions" : { 503 | "actions" : [ 504 | { 505 | "say" : "Thank you! Please reach out again if you need anything. Goodbye." 506 | } 507 | ] 508 | }, 509 | "fields" : [], 510 | "samples" : [ 511 | { 512 | "language" : "en-US", 513 | "taggedText" : "nope" 514 | }, 515 | { 516 | "language" : "en-US", 517 | "taggedText" : "good bye" 518 | }, 519 | { 520 | "language" : "en-US", 521 | "taggedText" : "that's all" 522 | }, 523 | { 524 | "language" : "en-US", 525 | "taggedText" : "bye bye" 526 | }, 527 | { 528 | "language" : "en-US", 529 | "taggedText" : "see ya" 530 | }, 531 | { 532 | "language" : "en-US", 533 | "taggedText" : "stop" 534 | }, 535 | { 536 | "language" : "en-US", 537 | "taggedText" : "stop talking" 538 | }, 539 | { 540 | "language" : "en-US", 541 | "taggedText" : "goodnight" 542 | }, 543 | { 544 | "language" : "en-US", 545 | "taggedText" : "goodbye" 546 | }, 547 | { 548 | "language" : "en-US", 549 | "taggedText" : "cancel" 550 | }, 551 | { 552 | "language" : "en-US", 553 | "taggedText" : "go away" 554 | }, 555 | { 556 | "language" : "en-US", 557 | "taggedText" : "no thanks" 558 | }, 559 | { 560 | "language" : "en-US", 561 | "taggedText" : "no" 562 | }, 563 | { 564 | "language" : "en-US", 565 | "taggedText" : "that would be all thanks" 566 | }, 567 | { 568 | "language" : "en-US", 569 | "taggedText" : "that would be all" 570 | }, 571 | { 572 | "language" : "en-US", 573 | "taggedText" : "no thanks" 574 | }, 575 | { 576 | "language" : "en-US", 577 | "taggedText" : "that is all thank you" 578 | }, 579 | { 580 | "language" : "en-US", 581 | "taggedText" : "that's all for today" 582 | } 583 | ] 584 | }, 585 | { 586 | "uniqueName" : "fallback", 587 | "actions" : { 588 | "actions" : [ 589 | { 590 | "say" : "I'm sorry didn't quite get that. Please say that again." 591 | }, 592 | { "listen" : true } 593 | ] 594 | }, 595 | "fields" : [], 596 | "samples" : [] 597 | }, 598 | { 599 | "uniqueName" : "collect_fallback", 600 | "actions" : { 601 | "actions" : [ 602 | { 603 | "say" : "Looks like I'm having trouble. Apologies for that. Let's start again, how can I help you today?" 604 | }, 605 | { "listen" : true } 606 | ] 607 | }, 608 | "fields" : [], 609 | "samples" : [] 610 | } 611 | ], 612 | "modelBuild" : { "uniqueName" : "v0.4" } 613 | } 614 | --------------------------------------------------------------------------------