diff --git a/lambdas/packages/hrm-form-definitions/form-definitions/nzba/v1/insights/postSurvey.json b/lambdas/packages/hrm-form-definitions/form-definitions/nzba/v1/insights/postSurvey.json new file mode 100644 index 0000000000..4da11fecf3 --- /dev/null +++ b/lambdas/packages/hrm-form-definitions/form-definitions/nzba/v1/insights/postSurvey.json @@ -0,0 +1,12 @@ +[ + { + "insightsObject": "conversations", + "attributeName": "conversation_measure_6", + "questions": ["was_helpful"] + }, + { + "insightsObject": "conversations", + "attributeName": "conversation_measure_7", + "questions": ["would_recommend"] + } +] \ No newline at end of file diff --git a/twilio-iac/helplines/nzba/common.hcl b/twilio-iac/helplines/nzba/common.hcl index 94dd078095..2cd1870099 100644 --- a/twilio-iac/helplines/nzba/common.hcl +++ b/twilio-iac/helplines/nzba/common.hcl @@ -6,10 +6,13 @@ locals { local_config = { - helpline = "Barnardos" - default_autopilot_chatbot_enabled = false - task_language = "en-NZ" - helpline_region = "eu-west-1" + helpline = "Barnardos" + task_language = "en-NZ" + helpline_region = "eu-west-1" + + lex_v2_bot_languages = { + en_NZBA : ["pre_survey", "post_survey"] + } workflows = { master : { diff --git a/twilio-iac/helplines/nzba/configs/lex_v2/en_US/bots/post_survey.json b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/bots/post_survey.json similarity index 51% rename from twilio-iac/helplines/nzba/configs/lex_v2/en_US/bots/post_survey.json rename to twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/bots/post_survey.json index 441b666ea8..14ee3906cb 100644 --- a/twilio-iac/helplines/nzba/configs/lex_v2/en_US/bots/post_survey.json +++ b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/bots/post_survey.json @@ -1,12 +1,26 @@ { "post_survey": { - "description": "General es/bots Post Survey bot", + "description": "General configs/lex_v2/en_NZBA/bots Post Survey bot", "locale": "en_US", "child_directed": true, - "idle_session_ttl_in_seconds": "600", + "idle_session_ttl_in_seconds": "300", "type": "Bot", "intents": { "post_survey_yes": { + "utterances": [ + { + "utterance": "Yes" + }, + { + "utterance": "yes" + }, + { + "utterance": "yeah" + }, + { + "utterance": "1" + } + ], "closing_response": { "message": "Thank you for reaching out. Please contact us again if you need more help." }, @@ -14,16 +28,32 @@ "1": { "slot_name": "was_helpful", "slot_type_name": "yes_no", - "slot_question": "Did you find this conversation helpful? Please answer Yes or No." + "slot_question": "Did you find this conversation helpful? Please answer Yes or No.", + "failure_response": "Thank you for reaching out. Please contact us again if you need more help." }, "2": { "slot_name": "would_recommend", "slot_type_name": "yes_no", - "slot_question": "Based on this conversation, would you recommend that someone in a similar situation contact us? Please answer Yes or No." + "slot_question": "Based on this conversation, would you recommend that someone in a similar situation contact us? Please answer Yes or No.", + "failure_response": "Thank you for reaching out. Please contact us again if you need more help." } } }, "post_survey_no": { + "utterances": [ + { + "utterance": "No" + }, + { + "utterance": "no" + }, + { + "utterance": "nope" + }, + { + "utterance": "2" + } + ], "closing_response": { "message": "Thank you for reaching out. Please contact us again if you need more help." }, diff --git a/twilio-iac/helplines/nzba/configs/lex_v2/en_US/bots/pre_survey.json b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/bots/pre_survey.json similarity index 90% rename from twilio-iac/helplines/nzba/configs/lex_v2/en_US/bots/pre_survey.json rename to twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/bots/pre_survey.json index 0b296b1d3b..2444124042 100644 --- a/twilio-iac/helplines/nzba/configs/lex_v2/en_US/bots/pre_survey.json +++ b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/bots/pre_survey.json @@ -1,11 +1,9 @@ { "pre_survey": { - "description": "Example configs/lex_v2/en_US/bots Pre Survey bot", + "description": "Example configs/lex_v2/en_NZBA/bots Pre Survey bot", "locale": "en_US", "child_directed": true, - "idle_session_ttl_in_seconds": "600", - "staging_bot_alias_id": "QUIVYKVF4P", - "production_bot_alias_id": "AHEY3RKT3F", + "idle_session_ttl_in_seconds": "300", "type": "Bot", "intents": { "pre_survey": { diff --git a/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/intents/post_survey_no.json b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/intents/post_survey_no.json new file mode 100644 index 0000000000..e3f8ac7834 --- /dev/null +++ b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/intents/post_survey_no.json @@ -0,0 +1,67 @@ +{ + "intentName": "post_survey_no", + "description": "Post Survey Intent - Yes", + "sampleUtterances": [ + { + "utterance": "No" + }, + { + "utterance": "no" + }, + { + "utterance": "nope" + }, + { + "utterance": "2" + } + ], + "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 reaching out. Please contact us again if you need more help." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + } +} \ No newline at end of file diff --git a/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/intents/post_survey_yes.json b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/intents/post_survey_yes.json new file mode 100644 index 0000000000..f71b991ca1 --- /dev/null +++ b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/intents/post_survey_yes.json @@ -0,0 +1,76 @@ +{ + "intentName": "post_survey_yes", + "description": "Post Survey Intent - Yes", + "sampleUtterances": [ + { + "utterance": "Yes" + }, + { + "utterance": "yes" + }, + { + "utterance": "yeah" + }, + { + "utterance": "1" + } + ], + "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": "was_helpful" + }, + { + "priority": 2, + "slotName": "would_recommend" + } + ], + "intentClosingSetting": { + "closingResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "Thank you for reaching out. Please contact us again if you need more help." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + } +} \ No newline at end of file diff --git a/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/intents/pre_survey.json b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/intents/pre_survey.json new file mode 100644 index 0000000000..f93ea7310d --- /dev/null +++ b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/intents/pre_survey.json @@ -0,0 +1,120 @@ +{ + "intentName": "pre_survey", + "description": "Example configs/lex_v2/en_NZBA/bots Pre Survey bot", + "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": "aboutSelf" + }, + { + "priority": 2, + "slotName": "age" + }, + { + "priority": 3, + "slotName": "gender" + } + ], + "intentClosingSetting": { + "closingResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "We will transfer you now. Please hold for a counsellor." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + }, + "initialResponseSetting": { + "initialResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "Welcome to the helpline. Please answer the following questions." + } + } + } + ], + "allowInterrupt": true + }, + "active": true, + "nextStep": { + "dialogAction": { + "type": "InvokeDialogCodeHook" + }, + "intent": {} + }, + "codeHook": { + "enableCodeHookInvocation": true, + "active": true, + "postCodeHookSpecification": { + "successNextStep": { + "dialogAction": { + "type": "ElicitSlot", + "slotToElicit": "aboutSelf" + }, + "intent": {} + }, + "failureNextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + }, + "timeoutNextStep": { + "dialogAction": { + "type": "EndConversation" + }, + "intent": {} + } + } + } + } +} \ No newline at end of file diff --git a/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/aboutSelf.json b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/aboutSelf.json new file mode 100644 index 0000000000..0fbb4c698c --- /dev/null +++ b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/aboutSelf.json @@ -0,0 +1,108 @@ +{ + "slotName": "aboutSelf", + "slotTypeName": "yes_no", + "intentName": "pre_survey", + "description": "Slot aboutSelf for intent pre_survey", + "valueElicitationSetting": { + "slotConstraint": "Required", + "promptSpecification": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "Are you calling about yourself? Please answer Yes or No." + } + }, + "variations": [ + { + "plainTextMessage": { + "value": "You can answer 'Yes' or 'No'. Are you calling about yourself?" + } + } + ] + } + ], + "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": "age" + }, + "intent": {} + }, + "failureResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "We are having trouble understanding your response. But nothing to worry, we will transfer you to a counsellor." + } + } + } + ], + "allowInterrupt": true + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "elicitationCodeHook": { + "enableCodeHookInvocation": true + } + } + } +} \ No newline at end of file diff --git a/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/age.json b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/age.json new file mode 100644 index 0000000000..55869b4f2e --- /dev/null +++ b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/age.json @@ -0,0 +1,108 @@ +{ + "slotName": "age", + "slotTypeName": "age", + "intentName": "pre_survey", + "description": "Slot age for intent pre_survey", + "valueElicitationSetting": { + "slotConstraint": "Required", + "promptSpecification": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "How old are you?" + } + }, + "variations": [ + { + "plainTextMessage": { + "value": "You can answer with a number like: 12. How old are you?" + } + } + ] + } + ], + "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": "gender" + }, + "intent": {} + }, + "failureResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "We are having trouble understanding your response. But nothing to worry, we will transfer you to a counsellor." + } + } + } + ], + "allowInterrupt": true + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "elicitationCodeHook": { + "enableCodeHookInvocation": true + } + } + } +} \ No newline at end of file diff --git a/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/gender.json b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/gender.json new file mode 100644 index 0000000000..6979a328e2 --- /dev/null +++ b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/gender.json @@ -0,0 +1,107 @@ +{ + "slotName": "gender", + "slotTypeName": "gender", + "intentName": "pre_survey", + "description": "Slot gender for intent pre_survey", + "valueElicitationSetting": { + "slotConstraint": "Required", + "promptSpecification": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "What is your gender?" + } + }, + "variations": [ + { + "plainTextMessage": { + "value": "You can answer male, female, boy, girl, non-binary, etc. You can also answer 'X' if you are not sure or if you don't want to share. What is your gender?" + } + } + ] + } + ], + "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. But nothing to worry, we will transfer you to a counsellor." + } + } + } + ], + "allowInterrupt": true + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "elicitationCodeHook": { + "enableCodeHookInvocation": true + } + } + } +} \ No newline at end of file diff --git a/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/was_helpful.json b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/was_helpful.json new file mode 100644 index 0000000000..01837d5ccf --- /dev/null +++ b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/was_helpful.json @@ -0,0 +1,101 @@ +{ + "slotName": "was_helpful", + "description": "was_helpful", + "slotTypeName": "yes_no", + "intentName": "post_survey_yes", + "valueElicitationSetting": { + "slotConstraint": "Required", + "promptSpecification": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "Did you find this conversation helpful? Please answer Yes or No." + } + } + } + ], + "maxRetries": 1, + "allowInterrupt": true, + "messageSelectionStrategy": "Random", + "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": "would_recommend" + }, + "intent": {} + }, + "failureResponse": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "Sorry, I didn't understand that." + } + } + } + ], + "allowInterrupt": true + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "elicitationCodeHook": { + "enableCodeHookInvocation": true + } + } + } +} \ No newline at end of file diff --git a/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/would_recommend.json b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/would_recommend.json new file mode 100644 index 0000000000..8c853a920a --- /dev/null +++ b/twilio-iac/helplines/nzba/configs/lex_v2/en_NZBA/slots/would_recommend.json @@ -0,0 +1,100 @@ +{ + "slotName": "would_recommend", + "description": "would_recommend", + "slotTypeName": "yes_no", + "intentName": "post_survey_yes", + "valueElicitationSetting": { + "slotConstraint": "Required", + "promptSpecification": { + "messageGroups": [ + { + "message": { + "plainTextMessage": { + "value": "Based on this conversation, would you recommend that someone in a similar situation contact us? Please answer Yes or No." + } + } + } + ], + "maxRetries": 1, + "allowInterrupt": true, + "messageSelectionStrategy": "Random", + "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": "Sorry, I didn't understand that." + } + } + } + ], + "allowInterrupt": true + }, + "failureNextStep": { + "dialogAction": { + "type": "CloseIntent" + }, + "intent": {} + }, + "elicitationCodeHook": { + "enableCodeHookInvocation": true + } + } + } +} \ No newline at end of file diff --git a/twilio-iac/helplines/nzba/configs/service-configuration/common.json b/twilio-iac/helplines/nzba/configs/service-configuration/common.json index 4b57184855..f8750cee59 100644 --- a/twilio-iac/helplines/nzba/configs/service-configuration/common.json +++ b/twilio-iac/helplines/nzba/configs/service-configuration/common.json @@ -8,7 +8,7 @@ "feature_flags": { "use_prepopulate_mappings": true }, - "helplineLanguage": "en-NZ", + "helplineLanguage": "en-US", "permissionConfig": "nzba" }, "ui_attributes": { diff --git a/twilio-iac/helplines/nzba/configs/service-configuration/staging.json b/twilio-iac/helplines/nzba/configs/service-configuration/staging.json index 202adbca4c..f44c75627e 100644 --- a/twilio-iac/helplines/nzba/configs/service-configuration/staging.json +++ b/twilio-iac/helplines/nzba/configs/service-configuration/staging.json @@ -7,6 +7,7 @@ "enable_lambda_post_survey_processing": true, "enable_post_survey": true, "enable_lex_v2": true, + "enable_lex": true, "enable_conferencing": true, "use_twilio_lambda_for_conference_functions": true } diff --git a/twilio-iac/helplines/nzba/staging.hcl b/twilio-iac/helplines/nzba/staging.hcl index 7d2cbf4505..04043f2091 100644 --- a/twilio-iac/helplines/nzba/staging.hcl +++ b/twilio-iac/helplines/nzba/staging.hcl @@ -7,12 +7,12 @@ locals { enable_external_recordings = true enable_post_survey = true enable_datadog_monitoring = false - custom_task_routing_filter_expression = "channelType =='voice' OR 'web'" + custom_task_routing_filter_expression = "channelType IN ['web','voice'] OR isContactlessTask == true" permission_config = "nzba" #Studio flow flow_vars = { - bot_language = "en-US" + bot_language = "en_NZBA" widget_from = "Barnardos" chat_blocked_message = "Sorry, you're not able to contact Barnardos from this device or account" error_message = "There has been an error with your message, please try writing us again." @@ -23,7 +23,7 @@ locals { webchat : { channel_type = "web" contact_identity = "" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking-lambda.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v2-blocking-lambda.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, diff --git a/twilio-iac/terraform-modules/channels/v1/main.tf b/twilio-iac/terraform-modules/channels/v1/main.tf index 09c3f643b0..442d541839 100644 --- a/twilio-iac/terraform-modules/channels/v1/main.tf +++ b/twilio-iac/terraform-modules/channels/v1/main.tf @@ -16,7 +16,9 @@ locals { webhook_url_studio_errors = nonsensitive(data.aws_ssm_parameter.webhook_url_studio_errors.value) custom_lambda_channels = {for key, val in var.channels: key => val if val.lambda_channel == true} - lambda_twilio_account_scoped_url = nonsensitive("https://hrm-${var.environment}.tl.techmatters.org/lambda/twilio/account-scoped/${var.twilio_account_sid}") +lambda_twilio_account_scoped_url = nonsensitive( + "https://hrm-${var.environment}${var.region == "eu-west-1" ? "-eu" : ""}.tl.techmatters.org/lambda/twilio/account-scoped/${var.twilio_account_sid}" +) get_profile_flags_for_identifier_base_url = nonsensitive(var.get_profile_flags_for_identifier_base_url == "" ? var.serverless_url : var.get_profile_flags_for_identifier_base_url) } diff --git a/webchat/configurations/nzba-staging.ts b/webchat/configurations/nzba-staging.ts index ac3512c5ed..06c772b6b6 100644 --- a/webchat/configurations/nzba-staging.ts +++ b/webchat/configurations/nzba-staging.ts @@ -19,7 +19,7 @@ import type { PreEngagementFormDefinition } from '../src/pre-engagement-form'; const accountSid = 'AC574591f522bc6e981aea7d34fb14fa5e'; const flexFlowSid = 'FO72895d84c5d2136ef19d0afc50a59f39'; -const defaultLanguage = 'en-NZ'; +const defaultLanguage = 'en-US'; const captureIp = true; const contactType: ContactType = 'ip'; @@ -47,208 +47,6 @@ const preEngagementConfig: PreEngagementFormDefinition = { label: 'First Name', required: true, }, - { - 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', - 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',