From b57806d8f983defcc12d0243a7c7c6a67c70c88e Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Thu, 27 Aug 2026 12:06:09 +0200 Subject: [PATCH 1/6] lex config --- .../configs/lex_v2/en/bots/pre_survey.json | 189 ++++++++++++++++++ .../en/intents/adult_responsibility.json | 64 ++++++ .../lex_v2/en/intents/csa_prevention.json | 67 +++++++ .../en/intents/healthy_relationships.json | 67 +++++++ .../lex_v2/en/intents/parent_education.json | 67 +++++++ .../configs/lex_v2/en/intents/pre_survey.json | 120 +++++++++++ .../lex_v2/en/intents/report_abuse.json | 70 +++++++ .../lex_v2/en/intents/talk_to_someone.json | 67 +++++++ .../lex_v2/en/intents/volunteer_apply.json | 67 +++++++ .../lex_v2/en/slot_types/howHeardAboutUs.json | 106 ++++++++++ .../configs/lex_v2/en/slot_types/role.json | 94 +++++++++ .../lex_v2/en/slots/howHeardAboutUs.json | 100 +++++++++ .../usvt/configs/lex_v2/en/slots/role.json | 101 ++++++++++ .../usvt/configs/lex_v2/en/slots/town.json | 101 ++++++++++ 14 files changed, 1280 insertions(+) create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/bots/pre_survey.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/intents/adult_responsibility.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/intents/csa_prevention.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/intents/healthy_relationships.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/intents/parent_education.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/intents/pre_survey.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/intents/report_abuse.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/intents/talk_to_someone.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/intents/volunteer_apply.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/slot_types/howHeardAboutUs.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/slot_types/role.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/slots/howHeardAboutUs.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/slots/role.json create mode 100644 twilio-iac/helplines/usvt/configs/lex_v2/en/slots/town.json diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/bots/pre_survey.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/bots/pre_survey.json new file mode 100644 index 0000000000..8356ab806f --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/bots/pre_survey.json @@ -0,0 +1,189 @@ +{ + "pre_survey": { + "description": "usvt/configs/lex_v2/en/bots Pre Survey bot", + "locale": "en_US", + "child_directed": true, + "idle_session_ttl_in_seconds": "350", + "staging_bot_alias_id": "TSTALIASID", + "type": "Bot", + "intents": { + "pre_survey": { + "utterances": [ + { + "utterance": "trigger_pre_survey" + }, + { + "utterance": "Incoming webchat contact" + } + ], + "closing_response": { + "message": "How can we help you today?\n1. Report child abuse and neglect\n2. Talk with someone about something that is happening\n3. Learn how to enroll in parent education programs\n4. Child Sexual Abuse Prevention: school-based programs, adult-focused programs and training of trainers\n5. Healthy Relationships Project\u00ae school-based curriculum\n6. Adult Responsibility Project trainings\n7. Apply to be a volunteer" + }, + "initial_response": { + "message": "If this is a life-threatening emergency, please contact 911. To help us connect you with the right support, please answer a few short questions.", + "slot_to_elicit": "role" + }, + "slot_priorities": { + "1": { + "slot_name": "role", + "slot_type_name": "role", + "slot_question": "Which best describes your role today?\n1. Parent\n2. Caregiver\n3. Pregnant or expecting parent\n4. Family member\n5. Professional/Service Provider\n6. Community Member\n7. Volunteer\n8. Other", + "failure_response": "We are having trouble understanding your response." + }, + "2": { + "slot_name": "town", + "slot_type_name": "AMAZON.FreeFormInput", + "slot_question": "What town are you reaching out from?", + "failure_response": "We are having trouble understanding your response." + }, + "3": { + "slot_name": "howHeardAboutUs", + "slot_type_name": "howHeardAboutUs", + "slot_question": "How did you hear about us?\n1. Google Search\n2. Social media\n3. Healthcare provider\n4. DCF\n5. School\n6. Friend/family\n7. Community organization\n8. Other", + "failure_response": "We are having trouble understanding your response." + } + } + }, + "report_abuse": { + "utterances": [ + { + "utterance": "1" + }, + { + "utterance": "Report" + }, + { + "utterance": "Reporting child abuse and neglect" + }, + { + "utterance": "report abuse" + }, + { + "utterance": "report child abuse" + } + ], + "closing_response": { + "message": "If you or someone else is in immediate danger, please call 911. If you are concerned about the safety or well-being of a child and would like to make a report of child abuse or neglect, you can call 1-800-649-5285. The line is available 24 hours a day, 7 days a week." + }, + "slot_priorities": {} + }, + "talk_to_someone": { + "utterances": [ + { + "utterance": "2" + }, + { + "utterance": "Talk with someone" + }, + { + "utterance": "talk to someone" + }, + { + "utterance": "I need to talk" + } + ], + "closing_response": { + "message": "If you would like to talk with someone you can text this number XXX-XXX-XXXX or call XXX-XXX-XXXX." + }, + "slot_priorities": {} + }, + "parent_education": { + "utterances": [ + { + "utterance": "3" + }, + { + "utterance": "parent education" + }, + { + "utterance": "enroll in parent education programs" + }, + { + "utterance": "parenting classes" + } + ], + "closing_response": { + "message": "We are glad you are interested in learning more about our programs. You can choose the option that feels most helpful to you: to view upcoming programs, click here. To enroll in a program, click here. To refer a family, click here. If you have a specific question or would prefer to speak with someone, please email familysupport@pcavt.org. We are happy to help you find the information or support that is right for you." + }, + "slot_priorities": {} + }, + "csa_prevention": { + "utterances": [ + { + "utterance": "4" + }, + { + "utterance": "child sexual abuse prevention" + }, + { + "utterance": "school based programs" + }, + { + "utterance": "training of trainers" + } + ], + "closing_response": { + "message": "Interested in learning more about Train the Trainer opportunities? You can click here to view upcoming events and find additional information." + }, + "slot_priorities": {} + }, + "healthy_relationships": { + "utterances": [ + { + "utterance": "5" + }, + { + "utterance": "healthy relationships project" + }, + { + "utterance": "HRP" + }, + { + "utterance": "school based curriculum" + } + ], + "closing_response": { + "message": "Looking for Healthy Relationships Project resources or curriculum? To purchase curriculum, click on the link here. To contact the HRP team, please email hrpteam@pcavt.org." + }, + "slot_priorities": {} + }, + "adult_responsibility": { + "utterances": [ + { + "utterance": "6" + }, + { + "utterance": "adult responsibility project" + }, + { + "utterance": "ART trainings" + } + ], + "closing_response": { + "message": "You can explore the Adult Responsibilities Training Calendar and choose the training opportunity that works best for you here: click here." + }, + "slot_priorities": {} + }, + "volunteer_apply": { + "utterances": [ + { + "utterance": "7" + }, + { + "utterance": "volunteer" + }, + { + "utterance": "apply to be a volunteer" + }, + { + "utterance": "I want to volunteer" + } + ], + "closing_response": { + "message": "Thank you for your interest in volunteering with us. We welcome you to learn more and apply when you are ready, click here. If you have questions about volunteering or would like more information before applying, please reach out to our team at pcavt@pcavt.org." + }, + "slot_priorities": {} + } + } + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/adult_responsibility.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/adult_responsibility.json new file mode 100644 index 0000000000..fb4274937c --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/adult_responsibility.json @@ -0,0 +1,64 @@ +{ + "intentName": "adult_responsibility", + "description": "Routing intent for 'How can we help you today?' option: adult_responsibility", + "sampleUtterances": [ + { + "utterance": "6" + }, + { + "utterance": "adult responsibility project" + }, + { + "utterance": "ART trainings" + } + ], + "dialogCodeHook": { + "enabled": false + }, + "fulfillmentCodeHook": { + "enabled": false, + "active": true, + "postFulfillmentStatusSpecification": { + "successNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "timeoutNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + } + } + }, + "slotPriorities": [], + "intentClosingSetting": { + "closingResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "You can explore the Adult Responsibilities Training Calendar and choose the training opportunity that works best for you here: click here." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/csa_prevention.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/csa_prevention.json new file mode 100644 index 0000000000..2949c63866 --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/csa_prevention.json @@ -0,0 +1,67 @@ +{ + "intentName": "csa_prevention", + "description": "Routing intent for 'How can we help you today?' option: csa_prevention", + "sampleUtterances": [ + { + "utterance": "4" + }, + { + "utterance": "child sexual abuse prevention" + }, + { + "utterance": "school based programs" + }, + { + "utterance": "training of trainers" + } + ], + "dialogCodeHook": { + "enabled": false + }, + "fulfillmentCodeHook": { + "enabled": false, + "active": true, + "postFulfillmentStatusSpecification": { + "successNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "timeoutNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + } + } + }, + "slotPriorities": [], + "intentClosingSetting": { + "closingResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "Interested in learning more about Train the Trainer opportunities? You can click here to view upcoming events and find additional information." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/healthy_relationships.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/healthy_relationships.json new file mode 100644 index 0000000000..6032a3db6f --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/healthy_relationships.json @@ -0,0 +1,67 @@ +{ + "intentName": "healthy_relationships", + "description": "Routing intent for 'How can we help you today?' option: healthy_relationships", + "sampleUtterances": [ + { + "utterance": "5" + }, + { + "utterance": "healthy relationships project" + }, + { + "utterance": "HRP" + }, + { + "utterance": "school based curriculum" + } + ], + "dialogCodeHook": { + "enabled": false + }, + "fulfillmentCodeHook": { + "enabled": false, + "active": true, + "postFulfillmentStatusSpecification": { + "successNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "timeoutNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + } + } + }, + "slotPriorities": [], + "intentClosingSetting": { + "closingResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "Looking for Healthy Relationships Project resources or curriculum? To purchase curriculum, click on the link here. To contact the HRP team, please email hrpteam@pcavt.org." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/parent_education.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/parent_education.json new file mode 100644 index 0000000000..29e5c461e7 --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/parent_education.json @@ -0,0 +1,67 @@ +{ + "intentName": "parent_education", + "description": "Routing intent for 'How can we help you today?' option: parent_education", + "sampleUtterances": [ + { + "utterance": "3" + }, + { + "utterance": "parent education" + }, + { + "utterance": "enroll in parent education programs" + }, + { + "utterance": "parenting classes" + } + ], + "dialogCodeHook": { + "enabled": false + }, + "fulfillmentCodeHook": { + "enabled": false, + "active": true, + "postFulfillmentStatusSpecification": { + "successNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "timeoutNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + } + } + }, + "slotPriorities": [], + "intentClosingSetting": { + "closingResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "We are glad you are interested in learning more about our programs. You can choose the option that feels most helpful to you: to view upcoming programs, click here. To enroll in a program, click here. To refer a family, click here. If you have a specific question or would prefer to speak with someone, please email familysupport@pcavt.org. We are happy to help you find the information or support that is right for you." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/pre_survey.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/pre_survey.json new file mode 100644 index 0000000000..98909053f3 --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/pre_survey.json @@ -0,0 +1,120 @@ +{ + "intentName": "pre_survey", + "description": "Main intake intent: collects role, town, and referral source, then presents the routing menu", + "sampleUtterances": [ + { + "utterance": "trigger_pre_survey" + }, + { + "utterance": "Incoming webchat contact" + } + ], + "dialogCodeHook": { + "enabled": false + }, + "fulfillmentCodeHook": { + "enabled": false, + "active": true, + "postFulfillmentStatusSpecification": { + "successNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "timeoutNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + } + } + }, + "slotPriorities": [ + { + "priority": 1, + "slotName": "role" + }, + { + "priority": 2, + "slotName": "town" + }, + { + "priority": 3, + "slotName": "howHeardAboutUs" + } + ], + "intentClosingSetting": { + "closingResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "How can we help you today?\n1. Report child abuse and neglect\n2. Talk with someone about something that is happening\n3. Learn how to enroll in parent education programs\n4. Child Sexual Abuse Prevention: school-based programs, adult-focused programs and training of trainers\n5. Healthy Relationships Project\u00ae school-based curriculum\n6. Adult Responsibility Project trainings\n7. Apply to be a volunteer" + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + }, + "initialResponseSetting": { + "initialResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "If this is a life-threatening emergency, please contact 911. To help us connect you with the right support, please answer a few short questions." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "InvokeDialogCodeHook" + }, + "intent": {} + }, + "codeHook": { + "enableCodeHookInvocation": true, + "active": true, + "postCodeHookSpecification": { + "successNextStep": { + "dialogAction": { + "type": "ElicitSlot", + "slotToElicit": "role" + }, + "intent": {} + }, + "failureNextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + }, + "timeoutNextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + } + } + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/report_abuse.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/report_abuse.json new file mode 100644 index 0000000000..0105a2bc57 --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/report_abuse.json @@ -0,0 +1,70 @@ +{ + "intentName": "report_abuse", + "description": "Routing intent for 'How can we help you today?' option: report_abuse", + "sampleUtterances": [ + { + "utterance": "1" + }, + { + "utterance": "Report" + }, + { + "utterance": "Reporting child abuse and neglect" + }, + { + "utterance": "report abuse" + }, + { + "utterance": "report child abuse" + } + ], + "dialogCodeHook": { + "enabled": false + }, + "fulfillmentCodeHook": { + "enabled": false, + "active": true, + "postFulfillmentStatusSpecification": { + "successNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "timeoutNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + } + } + }, + "slotPriorities": [], + "intentClosingSetting": { + "closingResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "If you or someone else is in immediate danger, please call 911. If you are concerned about the safety or well-being of a child and would like to make a report of child abuse or neglect, you can call 1-800-649-5285. The line is available 24 hours a day, 7 days a week." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/talk_to_someone.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/talk_to_someone.json new file mode 100644 index 0000000000..b23b0e37cd --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/talk_to_someone.json @@ -0,0 +1,67 @@ +{ + "intentName": "talk_to_someone", + "description": "Routing intent for 'How can we help you today?' option: talk_to_someone", + "sampleUtterances": [ + { + "utterance": "2" + }, + { + "utterance": "Talk with someone" + }, + { + "utterance": "talk to someone" + }, + { + "utterance": "I need to talk" + } + ], + "dialogCodeHook": { + "enabled": false + }, + "fulfillmentCodeHook": { + "enabled": false, + "active": true, + "postFulfillmentStatusSpecification": { + "successNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "timeoutNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + } + } + }, + "slotPriorities": [], + "intentClosingSetting": { + "closingResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "If you would like to talk with someone you can text this number XXX-XXX-XXXX or call XXX-XXX-XXXX." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/volunteer_apply.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/volunteer_apply.json new file mode 100644 index 0000000000..c6936c5356 --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/intents/volunteer_apply.json @@ -0,0 +1,67 @@ +{ + "intentName": "volunteer_apply", + "description": "Routing intent for 'How can we help you today?' option: volunteer_apply", + "sampleUtterances": [ + { + "utterance": "7" + }, + { + "utterance": "volunteer" + }, + { + "utterance": "apply to be a volunteer" + }, + { + "utterance": "I want to volunteer" + } + ], + "dialogCodeHook": { + "enabled": false + }, + "fulfillmentCodeHook": { + "enabled": false, + "active": true, + "postFulfillmentStatusSpecification": { + "successNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "timeoutNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + } + } + }, + "slotPriorities": [], + "intentClosingSetting": { + "closingResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "Thank you for your interest in volunteering with us. We welcome you to learn more and apply when you are ready, click here. If you have questions about volunteering or would like more information before applying, please reach out to our team at pcavt@pcavt.org." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/slot_types/howHeardAboutUs.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/slot_types/howHeardAboutUs.json new file mode 100644 index 0000000000..bea8513d8a --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/slot_types/howHeardAboutUs.json @@ -0,0 +1,106 @@ +{ + "slotTypeName": "howHeardAboutUs", + "slotTypeValues": [ + { + "sampleValue": { + "value": "Google Search" + }, + "synonyms": [ + { + "value": "1" + }, + { + "value": "Google" + } + ] + }, + { + "sampleValue": { + "value": "Social media" + }, + "synonyms": [ + { + "value": "2" + }, + { + "value": "Social Media" + } + ] + }, + { + "sampleValue": { + "value": "Healthcare provider" + }, + "synonyms": [ + { + "value": "3" + }, + { + "value": "Healthcare Provider" + } + ] + }, + { + "sampleValue": { + "value": "DCF" + }, + "synonyms": [ + { + "value": "4" + } + ] + }, + { + "sampleValue": { + "value": "School" + }, + "synonyms": [ + { + "value": "5" + } + ] + }, + { + "sampleValue": { + "value": "Friend/family" + }, + "synonyms": [ + { + "value": "6" + }, + { + "value": "Friend" + }, + { + "value": "Family" + } + ] + }, + { + "sampleValue": { + "value": "Community organization" + }, + "synonyms": [ + { + "value": "7" + }, + { + "value": "Community Organization" + } + ] + }, + { + "sampleValue": { + "value": "Other" + }, + "synonyms": [ + { + "value": "8" + } + ] + } + ], + "valueSelectionSetting": { + "resolutionStrategy": "TopResolution" + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/slot_types/role.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/slot_types/role.json new file mode 100644 index 0000000000..c7242d779c --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/slot_types/role.json @@ -0,0 +1,94 @@ +{ + "slotTypeName": "role", + "slotTypeValues": [ + { + "sampleValue": { + "value": "Parent" + }, + "synonyms": [ + { + "value": "1" + } + ] + }, + { + "sampleValue": { + "value": "Caregiver" + }, + "synonyms": [ + { + "value": "2" + } + ] + }, + { + "sampleValue": { + "value": "Pregnant or expecting parent" + }, + "synonyms": [ + { + "value": "3" + } + ] + }, + { + "sampleValue": { + "value": "Family member" + }, + "synonyms": [ + { + "value": "4" + } + ] + }, + { + "sampleValue": { + "value": "Professional/Service Provider" + }, + "synonyms": [ + { + "value": "5" + }, + { + "value": "Professional" + }, + { + "value": "Service Provider" + } + ] + }, + { + "sampleValue": { + "value": "Community Member" + }, + "synonyms": [ + { + "value": "6" + } + ] + }, + { + "sampleValue": { + "value": "Volunteer" + }, + "synonyms": [ + { + "value": "7" + } + ] + }, + { + "sampleValue": { + "value": "Other" + }, + "synonyms": [ + { + "value": "8" + } + ] + } + ], + "valueSelectionSetting": { + "resolutionStrategy": "TopResolution" + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/slots/howHeardAboutUs.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/slots/howHeardAboutUs.json new file mode 100644 index 0000000000..ae2685e52c --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/slots/howHeardAboutUs.json @@ -0,0 +1,100 @@ +{ + "slotName": "howHeardAboutUs", + "slotTypeName": "howHeardAboutUs", + "intentName": "pre_survey", + "description": "Slot howHeardAboutUs for intent pre_survey", + "valueElicitationSetting": { + "slotConstraint": "Required", + "promptSpecification": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "How did you hear about us?\n1. Google Search\n2. Social media\n3. Healthcare provider\n4. DCF\n5. School\n6. Friend/family\n7. Community organization\n8. Other" + } + } + } + ], + "maxRetries": 1, + "allowInterrupt": true, + "messageSelectionStrategy": "Ordered", + "promptAttemptsSpecification": { + "Initial": { + "allowInterrupt": true, + "allowedInputTypes": { + "allowAudioInput": true, + "allowDTMFInput": true + }, + "audioAndDTMFInputSpecification": { + "startTimeoutMs": 4000, + "audioSpecification": { + "maxLengthMs": 15000, + "endTimeoutMs": 640 + }, + "dtmfSpecification": { + "maxLength": 513, + "endTimeoutMs": 5000, + "deletionCharacter": "*", + "endCharacter": "#" + } + }, + "textInputSpecification": { + "startTimeoutMs": 30000 + } + }, + "Retry1": { + "allowInterrupt": true, + "allowedInputTypes": { + "allowAudioInput": true, + "allowDTMFInput": true + }, + "audioAndDTMFInputSpecification": { + "startTimeoutMs": 4000, + "audioSpecification": { + "maxLengthMs": 15000, + "endTimeoutMs": 640 + }, + "dtmfSpecification": { + "maxLength": 513, + "endTimeoutMs": 5000, + "deletionCharacter": "*", + "endCharacter": "#" + } + }, + "textInputSpecification": { + "startTimeoutMs": 30000 + } + } + } + }, + "slotCaptureSetting": { + "captureNextStep": { + "dialogAction": { + "type": "FulfillIntent" + }, + "intent": {} + }, + "failureResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "We are having trouble understanding your response." + } + } + } + ], + "allowInterrupt": true + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "elicitationCodeHook": { + "enableCodeHookInvocation": true + } + } + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/slots/role.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/slots/role.json new file mode 100644 index 0000000000..8b26f39722 --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/slots/role.json @@ -0,0 +1,101 @@ +{ + "slotName": "role", + "slotTypeName": "role", + "intentName": "pre_survey", + "description": "Slot role for intent pre_survey", + "valueElicitationSetting": { + "slotConstraint": "Required", + "promptSpecification": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "Which best describes your role today?\n1. Parent\n2. Caregiver\n3. Pregnant or expecting parent\n4. Family member\n5. Professional/Service Provider\n6. Community Member\n7. Volunteer\n8. Other" + } + } + } + ], + "maxRetries": 1, + "allowInterrupt": true, + "messageSelectionStrategy": "Ordered", + "promptAttemptsSpecification": { + "Initial": { + "allowInterrupt": true, + "allowedInputTypes": { + "allowAudioInput": true, + "allowDTMFInput": true + }, + "audioAndDTMFInputSpecification": { + "startTimeoutMs": 4000, + "audioSpecification": { + "maxLengthMs": 15000, + "endTimeoutMs": 640 + }, + "dtmfSpecification": { + "maxLength": 513, + "endTimeoutMs": 5000, + "deletionCharacter": "*", + "endCharacter": "#" + } + }, + "textInputSpecification": { + "startTimeoutMs": 30000 + } + }, + "Retry1": { + "allowInterrupt": true, + "allowedInputTypes": { + "allowAudioInput": true, + "allowDTMFInput": true + }, + "audioAndDTMFInputSpecification": { + "startTimeoutMs": 4000, + "audioSpecification": { + "maxLengthMs": 15000, + "endTimeoutMs": 640 + }, + "dtmfSpecification": { + "maxLength": 513, + "endTimeoutMs": 5000, + "deletionCharacter": "*", + "endCharacter": "#" + } + }, + "textInputSpecification": { + "startTimeoutMs": 30000 + } + } + } + }, + "slotCaptureSetting": { + "captureNextStep": { + "dialogAction": { + "type": "ElicitSlot", + "slotToElicit": "town" + }, + "intent": {} + }, + "failureResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "We are having trouble understanding your response." + } + } + } + ], + "allowInterrupt": true + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "elicitationCodeHook": { + "enableCodeHookInvocation": true + } + } + } +} diff --git a/twilio-iac/helplines/usvt/configs/lex_v2/en/slots/town.json b/twilio-iac/helplines/usvt/configs/lex_v2/en/slots/town.json new file mode 100644 index 0000000000..11d3e99849 --- /dev/null +++ b/twilio-iac/helplines/usvt/configs/lex_v2/en/slots/town.json @@ -0,0 +1,101 @@ +{ + "slotName": "town", + "slotTypeName": "AMAZON.FreeFormInput", + "intentName": "pre_survey", + "description": "Slot town for intent pre_survey", + "valueElicitationSetting": { + "slotConstraint": "Required", + "promptSpecification": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "What town are you reaching out from?" + } + } + } + ], + "maxRetries": 1, + "allowInterrupt": true, + "messageSelectionStrategy": "Ordered", + "promptAttemptsSpecification": { + "Initial": { + "allowInterrupt": true, + "allowedInputTypes": { + "allowAudioInput": true, + "allowDTMFInput": true + }, + "audioAndDTMFInputSpecification": { + "startTimeoutMs": 4000, + "audioSpecification": { + "maxLengthMs": 15000, + "endTimeoutMs": 640 + }, + "dtmfSpecification": { + "maxLength": 513, + "endTimeoutMs": 5000, + "deletionCharacter": "*", + "endCharacter": "#" + } + }, + "textInputSpecification": { + "startTimeoutMs": 30000 + } + }, + "Retry1": { + "allowInterrupt": true, + "allowedInputTypes": { + "allowAudioInput": true, + "allowDTMFInput": true + }, + "audioAndDTMFInputSpecification": { + "startTimeoutMs": 4000, + "audioSpecification": { + "maxLengthMs": 15000, + "endTimeoutMs": 640 + }, + "dtmfSpecification": { + "maxLength": 513, + "endTimeoutMs": 5000, + "deletionCharacter": "*", + "endCharacter": "#" + } + }, + "textInputSpecification": { + "startTimeoutMs": 30000 + } + } + } + }, + "slotCaptureSetting": { + "captureNextStep": { + "dialogAction": { + "type": "ElicitSlot", + "slotToElicit": "howHeardAboutUs" + }, + "intent": {} + }, + "failureResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "We are having trouble understanding your response." + } + } + } + ], + "allowInterrupt": true + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "elicitationCodeHook": { + "enableCodeHookInvocation": true + } + } + } +} From 5103280e6ad3f0932a331ca6bc93ebc4e950ec98 Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Thu, 27 Aug 2026 12:10:02 +0200 Subject: [PATCH 2/6] enable lex --- twilio-iac/helplines/usvt/common.hcl | 6 ++++++ twilio-iac/helplines/usvt/staging.hcl | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/twilio-iac/helplines/usvt/common.hcl b/twilio-iac/helplines/usvt/common.hcl index 492a6aeee4..a04bb3b3e7 100644 --- a/twilio-iac/helplines/usvt/common.hcl +++ b/twilio-iac/helplines/usvt/common.hcl @@ -14,6 +14,12 @@ locals { enable_post_survey = false enable_external_recordings = true permission_config = "demo" + enable_lex_v2 = true + + lex_v2_bot_languages = { + en : ["pre_survey"] + } + workflows = { master : { friendly_name = "Master Workflow" diff --git a/twilio-iac/helplines/usvt/staging.hcl b/twilio-iac/helplines/usvt/staging.hcl index 6ae913df9c..84f589e75a 100644 --- a/twilio-iac/helplines/usvt/staging.hcl +++ b/twilio-iac/helplines/usvt/staging.hcl @@ -20,7 +20,7 @@ locals { channel_type = "chat" messaging_mode = "conversations" contact_identity = "" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-blocking-preq-conv-lambda-sd.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking-lambda-sd.tftpl" channel_flow_vars = { widget_from = "PCAVT" chat_blocked_message = "Sorry, you're not able to contact Barnardos from this device or account" From b0be9b574ebf070418d8d19ce29f684ceadd7b31 Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Thu, 27 Aug 2026 12:54:08 +0200 Subject: [PATCH 3/6] bot language --- .../voice-no-chatbot-operating-hours-blocking-lambda-sd.tftpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twilio-iac/helplines/nzba/templates/studio-flows/voice-no-chatbot-operating-hours-blocking-lambda-sd.tftpl b/twilio-iac/helplines/nzba/templates/studio-flows/voice-no-chatbot-operating-hours-blocking-lambda-sd.tftpl index 44c41b718b..9a665d51ba 100644 --- a/twilio-iac/helplines/nzba/templates/studio-flows/voice-no-chatbot-operating-hours-blocking-lambda-sd.tftpl +++ b/twilio-iac/helplines/nzba/templates/studio-flows/voice-no-chatbot-operating-hours-blocking-lambda-sd.tftpl @@ -223,7 +223,7 @@ ${ "properties": { "finish_on_key": "#", "gather_language": "en", - "loop": 3, + "loop": 1, "number_of_digits": 1, "offset": { "x": 702, @@ -233,7 +233,7 @@ ${ "speech_model": "default", "speech_timeout": "5", "stop_gather": false, - "timeout": 2 + "timeout": 1 }, "transitions": [ { From 3bc078e205d5a02a896339bb1cc9cd7152331285 Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Thu, 27 Aug 2026 12:54:46 +0200 Subject: [PATCH 4/6] bot --- twilio-iac/helplines/usvt/staging.hcl | 1 + 1 file changed, 1 insertion(+) diff --git a/twilio-iac/helplines/usvt/staging.hcl b/twilio-iac/helplines/usvt/staging.hcl index 84f589e75a..9590bd1086 100644 --- a/twilio-iac/helplines/usvt/staging.hcl +++ b/twilio-iac/helplines/usvt/staging.hcl @@ -13,6 +13,7 @@ locals { flow_vars = { widget_from = "PCAVT" chat_blocked_message = "Hi, you've been blocked from accessing our services and we are not able to read or receive further messages from you." + bot_language = "en" } channels = { From 30d379faf072993bdef51259c281eaa782f84b96 Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Fri, 28 Aug 2026 14:24:27 +0200 Subject: [PATCH 5/6] vars --- twilio-iac/helplines/usvt/staging.hcl | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/twilio-iac/helplines/usvt/staging.hcl b/twilio-iac/helplines/usvt/staging.hcl index 9590bd1086..b0b2783e6b 100644 --- a/twilio-iac/helplines/usvt/staging.hcl +++ b/twilio-iac/helplines/usvt/staging.hcl @@ -7,21 +7,23 @@ locals { common_config = local.common_config_hcl.locals.config config = merge(local.common_config, local.local_config) - local_config = { custom_task_routing_filter_expression = "channelType IN ['web'] OR isContactlessTask == true" + local_config = { custom_task_routing_filter_expression = "channelType IN ['web'] OR isContactlessTask == true" #Studio flow flow_vars = { - widget_from = "PCAVT" - chat_blocked_message = "Hi, you've been blocked from accessing our services and we are not able to read or receive further messages from you." - bot_language = "en" + widget_from = "PCAVT" + chat_blocked_message = "Hi, you've been blocked from accessing our services and we are not able to read or receive further messages from you." + bot_language = "en" + send_message_janitor_function_sid = "ZH10171c61b82a492f4cf008622e1d9f34" + error_message = "There has been an error with your message, please try writing us again." } channels = { chat : { - channel_type = "chat" - messaging_mode = "conversations" - contact_identity = "" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking-lambda-sd.tftpl" + channel_type = "chat" + messaging_mode = "conversations" + contact_identity = "" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking-lambda-sd.tftpl" channel_flow_vars = { widget_from = "PCAVT" chat_blocked_message = "Sorry, you're not able to contact Barnardos from this device or account" From 0f1d519400a386a3e7fc160524775e3e367e797e Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Fri, 28 Aug 2026 14:37:58 +0200 Subject: [PATCH 6/6] webchat --- .../usvt/v1/webchat/PreEngagementForm.json | 321 +----------------- 1 file changed, 4 insertions(+), 317 deletions(-) diff --git a/lambdas/packages/hrm-form-definitions/form-definitions/usvt/v1/webchat/PreEngagementForm.json b/lambdas/packages/hrm-form-definitions/form-definitions/usvt/v1/webchat/PreEngagementForm.json index d5f35ee962..f5675023d2 100644 --- a/lambdas/packages/hrm-form-definitions/form-definitions/usvt/v1/webchat/PreEngagementForm.json +++ b/lambdas/packages/hrm-form-definitions/form-definitions/usvt/v1/webchat/PreEngagementForm.json @@ -6,328 +6,15 @@ "type": "input", "name": "friendlyName", "label": "Nickname", - "placeholder": "GuestName", - "required": true - }, - { - "type": "input", - "name": "firstName", - "label": "First Name", - "placeholder": "GuestName", + "placeholder": "Enter Your Name", "required": true }, { "type": "email", - "name": "contactIdentifier", - "label": "Email", - "required": true, - "placeholder": "Email" - }, - { - "label": "Age", - "type": "select", - "name": "age", - "required": true, - "defaultValue": "", - "options": [ - { - "value": "", - "label": "" - }, - { - "value": "Unborn", - "label": "Unborn" - }, - { - "value": "00", - "label": "0" - }, - { - "value": "01", - "label": "1" - }, - { - "value": "02", - "label": "2" - }, - { - "value": "03", - "label": "3" - }, - { - "value": "04", - "label": "4" - }, - { - "value": "05", - "label": "5" - }, - { - "value": "06", - "label": "6" - }, - { - "value": "07", - "label": "7" - }, - { - "value": "08", - "label": "8" - }, - { - "value": "09", - "label": "9" - }, - { - "value": "10", - "label": "10" - }, - { - "value": "11", - "label": "11" - }, - { - "value": "12", - "label": "12" - }, - { - "value": "13", - "label": "13" - }, - { - "value": "14", - "label": "14" - }, - { - "value": "15", - "label": "15" - }, - { - "value": "16", - "label": "16" - }, - { - "value": "17", - "label": "17" - }, - { - "value": "18", - "label": "18" - }, - { - "value": "19", - "label": "19" - }, - { - "value": "20", - "label": "20" - }, - { - "value": "21", - "label": "21" - }, - { - "value": "22", - "label": "22" - }, - { - "value": "23", - "label": "23" - }, - { - "value": "24", - "label": "24" - }, - { - "value": ">25", - "label": ">25" - }, - { - "value": "Unknown", - "label": "Unknown" - } - ] - }, - { - "label": "Gender", - "type": "select", - "name": "gender", + "name": "email", + "label": "Email Address", "required": true, - "defaultValue": "", - "options": [ - { - "value": "", - "label": "" - }, - { - "value": "Girl", - "label": "Girl" - }, - { - "value": "Boy", - "label": "Boy" - }, - { - "value": "Non-Binary", - "label": "Non-Binary" - }, - { - "value": "Unknown", - "label": "Unknown" - } - ] - }, - { - "type": "select", - "name": "province", - "label": "Province", - "required": false, - "defaultValue": "", - "options": [ - { - "value": "", - "label": "" - }, - { - "value": "Northern", - "label": "Northern" - }, - { - "value": "Eastern", - "label": "Eastern" - }, - { - "value": "Western", - "label": "Western" - }, - { - "value": "Southern", - "label": "Southern" - }, - { - "value": "Unknown", - "label": "Unknown" - } - ] - }, - { - "name": "district", - "label": "District", - "type": "dependent-select", - "dependsOn": "province", - "required": false, - "options": { - "Northern": [ - { - "value": "District A", - "label": "District A" - }, - { - "value": "District B", - "label": "District B" - }, - { - "value": "District C", - "label": "District C" - }, - { - "value": "Unknown", - "label": "Unknown" - } - ], - "Eastern": [ - { - "value": "District A", - "label": "District A" - }, - { - "value": "District B", - "label": "District B" - }, - { - "value": "District C", - "label": "District C" - }, - { - "value": "Unknown", - "label": "Unknown" - } - ], - "Western": [ - { - "value": "District A", - "label": "District A" - }, - { - "value": "District B", - "label": "District B" - }, - { - "value": "District C", - "label": "District C" - }, - { - "value": "Unknown", - "label": "Unknown" - } - ], - "Southern": [ - { - "value": "District A", - "label": "District A" - }, - { - "value": "District B", - "label": "District B" - }, - { - "value": "District C", - "label": "District C" - }, - { - "value": "Unknown", - "label": "Unknown" - } - ] - } - }, - { - "label": "How urgent is your situation?", - "type": "select", - "name": "urgencyLevel", - "required": false, - "defaultValue": "", - "options": [ - { - "value": "", - "label": "" - }, - { - "value": "Urgent", - "label": "Urgent" - }, - { - "value": "Critical", - "label": "Critical" - }, - { - "value": "Non-critical", - "label": "Non-critical" - }, - { - "value": "Other", - "label": "Other" - } - ] - }, - { - "type": "checkbox", - "name": "termsAndConditions", - "label": "I've read and accept the Terms and Conditions", - "required": { - "value": true, - "message": "Sorry, if you don't accept our terms and conditions we can't provide counselling to you." - } + "placeholder": "Enter Your Email Address" } ] }