From 69d7f00cdabd3fb5fab7d6cbd8b1e452bf766b95 Mon Sep 17 00:00:00 2001 From: janorivera Date: Tue, 16 Jul 2024 16:23:46 -0400 Subject: [PATCH 01/25] updating mapping --- .../form-definitions/nz/v1/insights/oneToOneConfigSpec.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hrm-form-definitions/form-definitions/nz/v1/insights/oneToOneConfigSpec.json b/hrm-form-definitions/form-definitions/nz/v1/insights/oneToOneConfigSpec.json index 4ea0ac3cba..5cca949322 100644 --- a/hrm-form-definitions/form-definitions/nz/v1/insights/oneToOneConfigSpec.json +++ b/hrm-form-definitions/form-definitions/nz/v1/insights/oneToOneConfigSpec.json @@ -27,7 +27,7 @@ ], "referral": [ { - "name": "externalInterventionTo", + "name": "referredTo", "insights": [ "customers", "customer_manager" From dfa6bc9ac8557dbe12c06c18feeb5ef1cd7d7e37 Mon Sep 17 00:00:00 2001 From: janorivera Date: Tue, 16 Jul 2024 17:39:11 -0400 Subject: [PATCH 02/25] updating mapping (#2416) --- .../form-definitions/nz/v1/insights/oneToOneConfigSpec.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hrm-form-definitions/form-definitions/nz/v1/insights/oneToOneConfigSpec.json b/hrm-form-definitions/form-definitions/nz/v1/insights/oneToOneConfigSpec.json index 4ea0ac3cba..5cca949322 100644 --- a/hrm-form-definitions/form-definitions/nz/v1/insights/oneToOneConfigSpec.json +++ b/hrm-form-definitions/form-definitions/nz/v1/insights/oneToOneConfigSpec.json @@ -27,7 +27,7 @@ ], "referral": [ { - "name": "externalInterventionTo", + "name": "referredTo", "insights": [ "customers", "customer_manager" From 0b930f7245dbae6257108b926b9ddd8bf500b1f4 Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Wed, 17 Jul 2024 20:11:16 +0200 Subject: [PATCH 03/25] sg updates --- .../sg/v1/profileForms/FlagDurations.json | 4 ++-- .../sg/v1/profileForms/Sections.json | 18 ------------------ plugin-hrm-form/src/permissions/sg.json | 2 +- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/hrm-form-definitions/form-definitions/sg/v1/profileForms/FlagDurations.json b/hrm-form-definitions/form-definitions/sg/v1/profileForms/FlagDurations.json index 9a9b75ad4d..ce00a3b521 100644 --- a/hrm-form-definitions/form-definitions/sg/v1/profileForms/FlagDurations.json +++ b/hrm-form-definitions/form-definitions/sg/v1/profileForms/FlagDurations.json @@ -6,7 +6,7 @@ }, { "flag": "blocked", - "label": "Long Term Block (5 Years)", - "durationInHours": "43848" + "label": "Long Term Block (1 Week)", + "durationInHours": "168" } ] diff --git a/hrm-form-definitions/form-definitions/sg/v1/profileForms/Sections.json b/hrm-form-definitions/form-definitions/sg/v1/profileForms/Sections.json index ed3f60b20b..5b783a7066 100644 --- a/hrm-form-definitions/form-definitions/sg/v1/profileForms/Sections.json +++ b/hrm-form-definitions/form-definitions/sg/v1/profileForms/Sections.json @@ -7,23 +7,5 @@ "rows": 20, "width": 500, "placeholder": "Enter a summary of the client" - }, - { - "name": "recommendedApproach", - "label": "Recommended Approach", - "editLabel": "Edit Recommended Approach", - "type": "textarea", - "rows": 20, - "width": 500, - "placeholder": "Enter recommended approach" - }, - { - "name": "details", - "label": "Details", - "editLabel": "Edit Details", - "type": "textarea", - "rows": 20, - "width": 500, - "placeholder": "Enter Details" } ] diff --git a/plugin-hrm-form/src/permissions/sg.json b/plugin-hrm-form/src/permissions/sg.json index 4bf909407b..112f4eb71f 100644 --- a/plugin-hrm-form/src/permissions/sg.json +++ b/plugin-hrm-form/src/permissions/sg.json @@ -30,7 +30,7 @@ "unflagProfile": [["isSupervisor"]], "createProfileSection": [["everyone"]], "viewProfileSection": [["everyone"]], - "editProfileSection": [["everyone"]], + "editProfileSection": [["isSupervisor"]], "viewPostSurvey": [["isSupervisor"]], From e182137b9552443c231d701fa341067f0b32bf2e Mon Sep 17 00:00:00 2001 From: Annalise Irby <122470559+annaliseirby090@users.noreply.github.com> Date: Thu, 18 Jul 2024 09:31:12 -0400 Subject: [PATCH 04/25] updateMaltaClientProfiles (#2418) --- .../mt/v1/profileForms/FlagDurations.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/hrm-form-definitions/form-definitions/mt/v1/profileForms/FlagDurations.json b/hrm-form-definitions/form-definitions/mt/v1/profileForms/FlagDurations.json index 2b60152b45..8611a0fc44 100644 --- a/hrm-form-definitions/form-definitions/mt/v1/profileForms/FlagDurations.json +++ b/hrm-form-definitions/form-definitions/mt/v1/profileForms/FlagDurations.json @@ -1,12 +1,7 @@ [ { "flag": "blocked", - "label": "Short Term Block (24 Hours)", - "durationInHours": "24" - }, - { - "flag": "blocked", - "label": "Long Term Block (5 Years)", - "durationInHours": "43848" + "label": "Short Term Block (2 Hours)", + "durationInHours": "2" } ] \ No newline at end of file From 568ca51d8d55bd017464d6991aa79c01dc70921f Mon Sep 17 00:00:00 2001 From: Gianfranco Date: Thu, 18 Jul 2024 14:23:41 -0300 Subject: [PATCH 05/25] chore: bypass flex plugin deploy validation (#2422) --- .github/actions/main-action/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/main-action/action.yml b/.github/actions/main-action/action.yml index 1b9ca94269..ff302b3900 100644 --- a/.github/actions/main-action/action.yml +++ b/.github/actions/main-action/action.yml @@ -113,7 +113,7 @@ runs: env: TWILIO_ACCOUNT_SID: ${{ inputs.account-sid }} TWILIO_AUTH_TOKEN: ${{ inputs.auth-token }} - run: twilio flex:plugins:deploy --changelog "commit ${{ github.sha }}" + run: twilio flex:plugins:deploy --bypass-validation --changelog "commit ${{ github.sha }}" working-directory: ./plugin-hrm-form shell: bash # Release flex plugin From 9331a1a8e90863aa8b83aaba9efa758d2bea5e8c Mon Sep 17 00:00:00 2001 From: janorivera Date: Mon, 22 Jul 2024 10:26:24 -0400 Subject: [PATCH 06/25] Adding unknown value to ageRange --- .../mt/v1/tabbedForms/ChildInformationTab.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hrm-form-definitions/form-definitions/mt/v1/tabbedForms/ChildInformationTab.json b/hrm-form-definitions/form-definitions/mt/v1/tabbedForms/ChildInformationTab.json index e92661f013..f350891614 100644 --- a/hrm-form-definitions/form-definitions/mt/v1/tabbedForms/ChildInformationTab.json +++ b/hrm-form-definitions/form-definitions/mt/v1/tabbedForms/ChildInformationTab.json @@ -29,6 +29,10 @@ "type": "select", "unknownOption": "", "options": [ + { + "value": "Unknown", + "label": "" + }, { "value": ">=16", "label": ">=16" From 93c39aaed18b1d15eaf40487804e04e1abf51b81 Mon Sep 17 00:00:00 2001 From: janorivera Date: Mon, 22 Jul 2024 18:20:29 -0400 Subject: [PATCH 07/25] MT: cherry pick update (#2439) * update * update to > --- .../mt/v1/tabbedForms/ChildInformationTab.json | 16 ++++++++-------- webchat/configurations/mt-staging.ts | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hrm-form-definitions/form-definitions/mt/v1/tabbedForms/ChildInformationTab.json b/hrm-form-definitions/form-definitions/mt/v1/tabbedForms/ChildInformationTab.json index f350891614..419a5983af 100644 --- a/hrm-form-definitions/form-definitions/mt/v1/tabbedForms/ChildInformationTab.json +++ b/hrm-form-definitions/form-definitions/mt/v1/tabbedForms/ChildInformationTab.json @@ -51,12 +51,16 @@ "name": "age", "label": "Age", "type": "select", - "unknownOption": "Unknown", + "unknownOption": "", "options": [ { - "value": "Unknown", + "value": "", "label": "" }, + { + "value": "Unknown", + "label": "Rather not say" + }, { "value": "00", "label": "0" @@ -342,12 +346,8 @@ "label": "70" }, { - "value": "70+", - "label": "70+" - }, - { - "value": "Unknown", - "label": "Rather not say" + "value": ">70", + "label": ">70" } ], "required": { diff --git a/webchat/configurations/mt-staging.ts b/webchat/configurations/mt-staging.ts index a7e7f91a5b..a5c6586587 100644 --- a/webchat/configurations/mt-staging.ts +++ b/webchat/configurations/mt-staging.ts @@ -392,8 +392,8 @@ const preEngagementConfig: PreEngagementFormDefinition = { label: "70" }, { - value: "70+", - label: "70+" + value: ">70", + label: ">70" }, { value: "Unknown", From 758b8c464d8751315479a8b505ceaf3f38f477aa Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Tue, 23 Jul 2024 16:21:47 +0200 Subject: [PATCH 08/25] case permissions --- plugin-hrm-form/src/permissions/zw.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin-hrm-form/src/permissions/zw.json b/plugin-hrm-form/src/permissions/zw.json index bfabfc0b0b..68b69613e7 100644 --- a/plugin-hrm-form/src/permissions/zw.json +++ b/plugin-hrm-form/src/permissions/zw.json @@ -3,7 +3,7 @@ "closeCase": [["isSupervisor"], ["isCreator", "isCaseOpen"]], "reopenCase": [["isSupervisor"]], "caseStatusTransition": [], - "addNote": [["isSupervisor"], ["isCreator", "isCaseOpen"]], + "addNote": [["everyone"], ["isCaseOpen"]], "editNote": [["isSupervisor"]], "addReferral": [["isSupervisor"], ["isCreator", "isCaseOpen"]], "editReferral": [["isSupervisor"]], From 33d70c506d58c90bfd5f5efd695537418c368cad Mon Sep 17 00:00:00 2001 From: janorivera Date: Tue, 23 Jul 2024 17:08:51 -0400 Subject: [PATCH 09/25] adding missing translations (#2447) --- .../src/translations/th-TH/flexUI.json | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/plugin-hrm-form/src/translations/th-TH/flexUI.json b/plugin-hrm-form/src/translations/th-TH/flexUI.json index 4afba62c47..f02873b62e 100644 --- a/plugin-hrm-form/src/translations/th-TH/flexUI.json +++ b/plugin-hrm-form/src/translations/th-TH/flexUI.json @@ -620,5 +620,58 @@ "Profile-Notes-No": "เลขที่", "Profile-ViewClient": "ดูไคลเอนต์", "Transfer-RefreshButton": "รีเฟรช", - "Transfer-ErrorLoadingMessage": "เกิดข้อผิดพลาดในการโหลดข้อความ" + "Transfer-ErrorLoadingMessage": "เกิดข้อผิดพลาดในการโหลดข้อความ", + "SearchResults-CounselorName": "ชื่อที่ปรึกษา:", + "SearchResults-FirstName": "ชื่อ:", + "SearchResults-LastName": "นามสกุล:", + "SearchResults-PhoneNumber": "หมายเลขโทรศัพท์:", + "SearchResults-DateFrom": "วันที่เริ่ม:", + "SearchResults-DateTo": "วันที่สิ้นสุด:", + "SearchResults-Contact": "1 ผู้ติดต่อ", + "SearchResults-Contacts": "ผู้ติดต่อ", + "SearchResults-Case": "1 กรณี", + "SearchResults-Cases": "กรณี", + "SearchResults-For": "สำหรับ", + "Transfer-ErrorLoadingMessages": "ข้อผิดพลาดในการโหลดข้อความ กรุณารีเฟรชเบราว์เซอร์เพื่อลองใหม่", + "Transfer-CannotTransferTooManyParticipants": "ไม่สามารถโอนเมื่อมีผู้เข้าร่วม 3 คนหรือมากกว่า", + "Case-DeleteDocument": "ลบ", + "ContactDetails-GeneralDetails-externalReport": "เพิ่มรายงาน CSAM", + "ContactDetails-GeneralDetails-ExternalReportsFiled": "รายงานภายนอกที่ยื่น", + "ContactDetails-GeneralDetails-ResourcesReferrals": "ทรัพยากรที่แชร์", + "ContactDetails-Recording": "การบันทึก", + "Contact-ExternalReport": "ยื่นรายงานภายนอก", + "TaskList-AddOfflineContact-CreateError": "ข้อผิดพลาดในการสร้างผู้ติดต่อใหม่แบบออฟไลน์", + "PreviousContacts-Has": "มี", + "Profile-Title": "โปรไฟล์ลูกค้า", + "Profile-IdentifiersHeader": "ตัวระบุ", + "Profile-StatusHeader": "สถานะ", + "Profile-EditNoteHeader": "แก้ไขบันทึก", + "Profile-FlagEditHeader": "แก้ไขสถานะและการบล็อก", + "Profile-ValidUntil": "จนถึง", + "SideNavProfileList": "โปรไฟล์ลูกค้า", + "Profile-Singular-Client": "ลูกค้า", + "ProfileList-Clients": "ลูกค้า", + "ProfileList-Count-Singular": "{{count}} ลูกค้า", + "ProfileList-Count-Plural": "{{count}} ลูกค้า", + "ProfileList-THClient": "ลูกค้า", + "ProfileList-THClientName": "ชื่อ", + "ProfileList-THStatus": "สถานะ", + "ProfileList-THIdentifier": "ตัวระบุ", + "ProfileList-THSummary": "สรุป", + "ProfileList-NoClients": "ไม่พบลูกค้า", + "ProfileList-Summary-None": "- ไม่มีสรุปโปรไฟล์ -", + "ProfileList-Status-None": "- ไม่มีสถานะ -", + "ProfileList-ClientName-None": "- ไม่มีชื่อ -", + "Toolkit-ConfirmTextOne": "คุณจะถูกเปลี่ยนเส้นทางไปยังระบบจัดการความรู้ของ {{helpline}}", + "Toolkit-ConfirmTextTwo": "คุณแน่ใจว่าต้องการดำเนินการต่อหรือไม่?", + "UnmaskPhoneNumber": "หมายเลขโทรศัพท์ที่แสดง", + "RecordingSection-Error": "มีบางอย่างผิดพลาด กรุณาติดต่อทีมสนับสนุนหรือผู้บังคับบัญชาของคุณ", + "Conference-AddConferenceCallParticipant": "เพิ่มผู้เข้าร่วมการประชุมทางโทรศัพท์", + "Conference-EnterPhoneNumber": "ป้อนหมายเลขโทรศัพท์", + "Conference-DialButton": "โทร", + "HangupCallLeaveTooltip": "ออกจากสาย", + "NavigableContainer-BackButton": "กลับ", + "NavigableContainer-CloseButton": "ปิด", + "CaseMerging-ContactUndoRemovedFromCase": "ยกเลิก", + "TeamsView-NoSkills": "- ไม่มีทักษะที่ระบุ -" } \ No newline at end of file From bed5da23b15002f2d7117a8df3490bcfd5b38dfa Mon Sep 17 00:00:00 2001 From: janorivera Date: Tue, 23 Jul 2024 17:20:04 -0400 Subject: [PATCH 10/25] MT: Alejandro/mt/cherry pick 2 (#2445) * adding new line * repeating change * repeating change --- webchat/src/translations/index.ts | 2 ++ webchat/src/translations/mt.ts | 22 ++++++++++++++++++++++ webchat/src/translations/ukr.ts | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 webchat/src/translations/mt.ts diff --git a/webchat/src/translations/index.ts b/webchat/src/translations/index.ts index b203824c72..3283df213d 100644 --- a/webchat/src/translations/index.ts +++ b/webchat/src/translations/index.ts @@ -20,6 +20,7 @@ import fr from './fr'; import hu from './hu'; import ru from './ru'; import ukr from './ukr'; +import mt from './mt'; export default { en, @@ -28,4 +29,5 @@ export default { hu, ru, ukr, + mt, } as Record>; diff --git a/webchat/src/translations/mt.ts b/webchat/src/translations/mt.ts new file mode 100644 index 0000000000..c11d619595 --- /dev/null +++ b/webchat/src/translations/mt.ts @@ -0,0 +1,22 @@ +/** + * Copyright (C) 2021-2023 Technology Matters + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + +export default { + EndChatButtonLabel: 'Ħruġ mill-chat', + QuickExitButtonLabel: 'Ħruġ malajr', + QuickExitDescription: 'Għandek bżonn titlaq malajr?', + ChatWithUs: 'Chat magħna', +} as Record; diff --git a/webchat/src/translations/ukr.ts b/webchat/src/translations/ukr.ts index 9b5b397315..f3770d86b9 100644 --- a/webchat/src/translations/ukr.ts +++ b/webchat/src/translations/ukr.ts @@ -19,5 +19,5 @@ export default { EndChatButtonLabel: 'Вийти із чату', QuickExitButtonLabel: 'Швидкий вихід', QuickExitDescription: 'Потрібно швидко піти?', - ChatWithUs: 'Kék Vonal', + ChatWithUs: 'Спілкуйтеся з нами', } as Record; From 7c12cb301c7db126f5745e48f9a4c93a8cd018d7 Mon Sep 17 00:00:00 2001 From: janorivera Date: Tue, 23 Jul 2024 17:34:02 -0400 Subject: [PATCH 11/25] more translations (#2449) --- plugin-hrm-form/src/translations/th-TH/flexUI.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin-hrm-form/src/translations/th-TH/flexUI.json b/plugin-hrm-form/src/translations/th-TH/flexUI.json index f02873b62e..380ac1bc05 100644 --- a/plugin-hrm-form/src/translations/th-TH/flexUI.json +++ b/plugin-hrm-form/src/translations/th-TH/flexUI.json @@ -673,5 +673,7 @@ "NavigableContainer-BackButton": "กลับ", "NavigableContainer-CloseButton": "ปิด", "CaseMerging-ContactUndoRemovedFromCase": "ยกเลิก", - "TeamsView-NoSkills": "- ไม่มีทักษะที่ระบุ -" + "TeamsView-NoSkills": "- ไม่มีทักษะที่ระบุ -", + "blocked":"ถูกบล็อก", + "Long Term Block (100 Years)":"การบล็อกระยะยาว (100 ปี)" } \ No newline at end of file From 8e5420dedfa18dc59538c570ff39c9dc70bcdbe5 Mon Sep 17 00:00:00 2001 From: janorivera Date: Wed, 24 Jul 2024 10:49:35 -0400 Subject: [PATCH 12/25] TH adding abusive (#2451) --- plugin-hrm-form/src/translations/th-TH/flexUI.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin-hrm-form/src/translations/th-TH/flexUI.json b/plugin-hrm-form/src/translations/th-TH/flexUI.json index 380ac1bc05..6db2582043 100644 --- a/plugin-hrm-form/src/translations/th-TH/flexUI.json +++ b/plugin-hrm-form/src/translations/th-TH/flexUI.json @@ -675,5 +675,6 @@ "CaseMerging-ContactUndoRemovedFromCase": "ยกเลิก", "TeamsView-NoSkills": "- ไม่มีทักษะที่ระบุ -", "blocked":"ถูกบล็อก", - "Long Term Block (100 Years)":"การบล็อกระยะยาว (100 ปี)" -} \ No newline at end of file + "Long Term Block (100 Years)":"การบล็อกระยะยาว (100 ปี)", + "abusive":"คุกคาม" +} From 7a95e3c388f1e64fe7cf80744ab30218888e2ff6 Mon Sep 17 00:00:00 2001 From: Dee Luo <79488570+dee-luo@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:19:28 -0400 Subject: [PATCH 13/25] Update Sections.json --- .../form-definitions/jm/v1/profileForms/Sections.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hrm-form-definitions/form-definitions/jm/v1/profileForms/Sections.json b/hrm-form-definitions/form-definitions/jm/v1/profileForms/Sections.json index bc98875ae8..e99859bcae 100644 --- a/hrm-form-definitions/form-definitions/jm/v1/profileForms/Sections.json +++ b/hrm-form-definitions/form-definitions/jm/v1/profileForms/Sections.json @@ -1,7 +1,7 @@ [ { "name": "summary", - "label": "Summary", + "label": "Summary - General Assessment of Case and Plan"", "editLabel": "Edit Summary", "type": "textarea", "rows": 20, From 030c9e81c1aff0ad74c67de4c61eaab079f20e8a Mon Sep 17 00:00:00 2001 From: Dee Luo <79488570+dee-luo@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:22:59 -0400 Subject: [PATCH 14/25] Update Sections.json --- .../form-definitions/jm/v1/profileForms/Sections.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hrm-form-definitions/form-definitions/jm/v1/profileForms/Sections.json b/hrm-form-definitions/form-definitions/jm/v1/profileForms/Sections.json index e99859bcae..d94f29cb1f 100644 --- a/hrm-form-definitions/form-definitions/jm/v1/profileForms/Sections.json +++ b/hrm-form-definitions/form-definitions/jm/v1/profileForms/Sections.json @@ -1,7 +1,7 @@ [ { "name": "summary", - "label": "Summary - General Assessment of Case and Plan"", + "label": "Summary - General Assessment of Case and Plan", "editLabel": "Edit Summary", "type": "textarea", "rows": 20, From 639b176ea8bff45c58f4541662b20ee3e5b091e9 Mon Sep 17 00:00:00 2001 From: Dee Luo <79488570+dee-luo@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:23:42 -0400 Subject: [PATCH 15/25] Update zw.json --- plugin-hrm-form/src/permissions/zw.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin-hrm-form/src/permissions/zw.json b/plugin-hrm-form/src/permissions/zw.json index 68b69613e7..1a689e59d1 100644 --- a/plugin-hrm-form/src/permissions/zw.json +++ b/plugin-hrm-form/src/permissions/zw.json @@ -26,7 +26,7 @@ "removeContactFromCase": [["isSupervisor"], ["isOwner"]], "viewProfile": [["everyone"]], - "flagProfile": [["everyone"]], + "flagProfile": [["isSupervisor"]], "unflagProfile": [["isSupervisor"]], "createProfileSection": [["everyone"]], "viewProfileSection": [["everyone"]], From 666c197457b14de02e3be14dae159c67bc0bf32b Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Thu, 25 Jul 2024 13:29:19 +0200 Subject: [PATCH 16/25] ZW voice studio flow w/ blocking --- twilio-iac/helplines/zw/production.hcl | 15 +++- twilio-iac/helplines/zw/staging.hcl | 16 ++-- .../zw/templates/studio-flows/voice-ac.tftpl | 81 ++++++++++++++++++- 3 files changed, 100 insertions(+), 12 deletions(-) diff --git a/twilio-iac/helplines/zw/production.hcl b/twilio-iac/helplines/zw/production.hcl index cfa4be2369..8058ce21ed 100644 --- a/twilio-iac/helplines/zw/production.hcl +++ b/twilio-iac/helplines/zw/production.hcl @@ -7,11 +7,12 @@ locals { local_config = { - custom_task_routing_filter_expression = "channelType =='web' OR isContactlessTask == true OR twilioNumber == 'messenger:123236277715368'" + custom_task_routing_filter_expression = "channelType =='web' OR isContactlessTask == true OR twilioNumber == 'messenger:123236277715368'" flow_vars = { - + widget_from = "Childline Zimbabwe" + chat_blocked_message = "Hi, you've been blocked from accessing Childline services and we are not able to read or receive further messages from you." } channels = { @@ -30,6 +31,16 @@ locals { templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging.tftpl" channel_flow_vars = {} chatbot_unique_names = [] + }, + voice : { + channel_type = "voice" + contact_identity = "" + templatefile = "/app/twilio-iac/helplines/zw/templates/studio-flows/voice-ac.tftpl" + channel_flow_vars = { + voice_ivr_language = "en-US", + voice_ivr_blocked_message = "Hi, you've been blocked from accessing Childline services and we are not able to receive further calls from you." + } + chatbot_unique_names = [] } } diff --git a/twilio-iac/helplines/zw/staging.hcl b/twilio-iac/helplines/zw/staging.hcl index cc10ce9b60..c54b1d46e9 100644 --- a/twilio-iac/helplines/zw/staging.hcl +++ b/twilio-iac/helplines/zw/staging.hcl @@ -10,8 +10,8 @@ locals { flow_vars = { - widget_from = "Childline Zimbabwe" - chat_blocked_message = "Hi, you've been blocked from accessing Childline services and we are not able to read or receive further messages from you." + widget_from = "Childline Zimbabwe" + chat_blocked_message = "Hi, you've been blocked from accessing Childline services and we are not able to read or receive further messages from you." } channels = { @@ -21,6 +21,7 @@ locals { templatefile = "/app/twilio-iac/helplines/zw/templates/studio-flows/messaging-greeting-message-blocking.tftpl" channel_flow_vars = { chat_greeting_message = "Thank you for contacting Childline Zimbabwe, a counsellor will be with you shortly. If this is an emergency or you wait longer than 30 min, we recommend you call us for free at 116." + } chatbot_unique_names = [] }, @@ -32,10 +33,13 @@ locals { chatbot_unique_names = [] }, voice : { - channel_type = "voice" - contact_identity = "" - templatefile = "/app/twilio-iac/helplines/zw/templates/studio-flows/voice-ac.tftpl" - channel_flow_vars = {} + channel_type = "voice" + contact_identity = "" + templatefile = "/app/twilio-iac/helplines/zw/templates/studio-flows/voice-ac.tftpl" + channel_flow_vars = { + voice_ivr_language = "en-US", + voice_ivr_blocked_message = "Hi, you've been blocked from accessing Childline services and we are not able to receive further calls from you." + } chatbot_unique_names = [] } } diff --git a/twilio-iac/helplines/zw/templates/studio-flows/voice-ac.tftpl b/twilio-iac/helplines/zw/templates/studio-flows/voice-ac.tftpl index 9751ce2a90..aa77c3049a 100644 --- a/twilio-iac/helplines/zw/templates/studio-flows/voice-ac.tftpl +++ b/twilio-iac/helplines/zw/templates/studio-flows/voice-ac.tftpl @@ -11,7 +11,7 @@ ${ "event": "incomingMessage" }, { - "next": "SendCallToAgent", + "next": "getProfileFlagsForIdentifier", "event": "incomingCall" }, { @@ -47,12 +47,85 @@ ${ ], "properties": { "offset": { - "x": 30, - "y": 180 + "x": -30, + "y": 620 }, "workflow": workflow_sids["master"], "channel": task_channel_sids["voice"], - "attributes": "{ "type": "inbound", "name_old": "{{trigger.call.From}}","name":"{{trigger.call.From | replace: 'sip:', '' | split: '@' | first}}","ignoreAgent":"", "transferTargetType":"","channelType":"voice", "aseloCallId": "{{trigger.call.SipHeader_X-Aselo-Call-Id}}","aseloHostId": "{{trigger.call.SipHeader_X-Aselo-Call-Id | split: ':' | last}}"}" + "attributes": "{ \"type\": \"inbound\", \"name_old\": \"{{trigger.call.From}}\",\"name\":\"{{trigger.call.From | replace: 'sip:', '' | split: '@' | first}}\",\"ignoreAgent\":\"\", \"transferTargetType\":\"\",\"channelType\":\"voice\", \"aseloCallId\": \"{{trigger.call.SipHeader_X-Aselo-Call-Id}}\",\"aseloHostId\": \"{{trigger.call.SipHeader_X-Aselo-Call-Id | split: ':' | last}}\"}" + } + }, + { + "name": "getProfileFlagsForIdentifier", + "type": "make-http-request", + "transitions": [ + { + "next": "contact_routing", + "event": "success" + }, + { + "event": "failed" + } + ], + "properties": { + "offset": { + "x": 160, + "y": 170 + }, + "method": "POST", + "content_type": "application/x-www-form-urlencoded;charset=utf-8", + "add_twilio_auth": false, + "body": "{\"trigger\": {{trigger | to_json}}}", + "url": "${serverless_url}/getProfileFlagsForIdentifier" + } + }, + { + "name": "blocked", + "type": "say-play", + "transitions": [ + { + "event": "audioComplete" + } + ], + "properties": { + "offset": { + "x": 740, + "y": 610 + }, + "loop": 1, + "say": channel_flow_vars["voice_ivr_blocked_message"], + "language": channel_flow_vars["voice_ivr_language"] + } + }, + { + "name": "contact_routing", + "type": "split-based-on", + "transitions": [ + { + "next": "SendCallToAgent", + "event": "noMatch" + }, + { + "next": "blocked", + "event": "match", + "conditions": [ + { + "friendly_name": "If value contains blocked", + "arguments": [ + "{{widgets.getProfileFlagsForIdentifier.parsed}}" + ], + "type": "contains", + "value": "blocked" + } + ] + } + ], + "properties": { + "input": "{{widgets.getProfileFlagsForIdentifier.parsed}}", + "offset": { + "x": 350, + "y": 390 + } } } ], From 290d1c25f15440be0ef3a999f324ae739d4e6966 Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Thu, 25 Jul 2024 13:36:41 +0200 Subject: [PATCH 17/25] ZM voice studio flow w/ blocking --- twilio-iac/helplines/zm/production.hcl | 10 ++ twilio-iac/helplines/zm/staging.hcl | 16 +- .../zm/templates/studio-flows/voice-ac.tftpl | 147 ++++++++++++++++++ 3 files changed, 170 insertions(+), 3 deletions(-) create mode 100644 twilio-iac/helplines/zm/templates/studio-flows/voice-ac.tftpl diff --git a/twilio-iac/helplines/zm/production.hcl b/twilio-iac/helplines/zm/production.hcl index db4b27a43f..1a1e3b5ada 100644 --- a/twilio-iac/helplines/zm/production.hcl +++ b/twilio-iac/helplines/zm/production.hcl @@ -26,6 +26,14 @@ locals { templatefile = "/app/twilio-iac/helplines/zm/templates/studio-flows/messaging.tftpl" channel_flow_vars = {} chatbot_unique_names = [] + }, + voice : { + channel_type = "voice" + contact_identity = "" + templatefile = "/app/twilio-iac/helplines/zm/templates/studio-flows/voice-ac.tftpl" + channel_flow_vars = { + } + chatbot_unique_names = [] } } #Studio flow @@ -36,6 +44,8 @@ locals { capture_channel_with_bot_function_sid = "ZH38598267c5c40e659e4fef46a019dd24" widget_from = "Lifeline/Childline Zambia" chat_blocked_message = "Hi, you've been blocked from accessing Childline/Lifeline services and we are not able to read or receive further messages from you." + voice_ivr_language = "en-US", + voice_ivr_blocked_message = "Hi, you've been blocked from accessing Childline/Lifeline services and we are not able to receive further calls from you." } } } \ No newline at end of file diff --git a/twilio-iac/helplines/zm/staging.hcl b/twilio-iac/helplines/zm/staging.hcl index 3e20f4c952..6dc9fb91b5 100644 --- a/twilio-iac/helplines/zm/staging.hcl +++ b/twilio-iac/helplines/zm/staging.hcl @@ -26,16 +26,26 @@ locals { templatefile = "/app/twilio-iac/helplines/zm/templates/studio-flows/messaging.tftpl" channel_flow_vars = {} chatbot_unique_names = [] + }, + voice : { + channel_type = "voice" + contact_identity = "" + templatefile = "/app/twilio-iac/helplines/zm/templates/studio-flows/voice-ac.tftpl" + channel_flow_vars = { + } + chatbot_unique_names = [] } } #Studio flow flow_vars = { - service_sid = "ZSe4567a77a4d25e4d539aa715c46f0202" - environment_sid = "ZEb5f4d53708997b098f3c7456435c2083" - send_message_janitor_function_sid = "ZH0b9f111cb63b53f265d487aa63bb4818" + service_sid = "ZSe4567a77a4d25e4d539aa715c46f0202" + environment_sid = "ZEb5f4d53708997b098f3c7456435c2083" + send_message_janitor_function_sid = "ZH0b9f111cb63b53f265d487aa63bb4818" capture_channel_with_bot_function_sid = "ZHca6a97b33320c5efd5430fb9f1a5480b" widget_from = "Lifeline/Childline Zambia" chat_blocked_message = "Hi, you've been blocked from accessing Childline/Lifeline services and we are not able to read or receive further messages from you." + voice_ivr_language = "en-US", + voice_ivr_blocked_message = "Hi, you've been blocked from accessing Childline/Lifeline services and we are not able to receive further calls from you." } ui_editable = true diff --git a/twilio-iac/helplines/zm/templates/studio-flows/voice-ac.tftpl b/twilio-iac/helplines/zm/templates/studio-flows/voice-ac.tftpl new file mode 100644 index 0000000000..886524c7e2 --- /dev/null +++ b/twilio-iac/helplines/zm/templates/studio-flows/voice-ac.tftpl @@ -0,0 +1,147 @@ +${ + jsonencode( +{ + "description": flow_description, + "states": [ + { + "name": "Trigger", + "type": "trigger", + "transitions": [ + { + "event": "incomingMessage" + }, + { + "next": "getProfileFlagsForIdentifier", + "event": "incomingCall" + }, + { + "event": "incomingConversationMessage" + }, + { + "event": "incomingRequest" + }, + { + "event": "incomingParent" + } + ], + "properties": { + "offset": { + "x": -10, + "y": 0 + } + } + }, + { + "name": "SendCallToAgent", + "type": "send-to-flex", + "transitions": [ + { + "event": "callComplete" + }, + { + "event": "failedToEnqueue" + }, + { + "event": "callFailure" + } + ], + "properties": { + "offset": { + "x": 300, + "y": 760 + }, + "workflow": workflow_sids[ + "master" + ], + "channel": task_channel_sids[ + "voice" + ], + "attributes": "{ \"type\": \"inbound\", \"name_old\": \"{{trigger.call.From}}\",\"name\":\"{{trigger.call.From | replace: 'sip:', '' | split: '@' | first}}\",\"ignoreAgent\":\"\", \"transferTargetType\":\"\",\"channelType\":\"voice\", \"aseloCallId\": \"{{trigger.call.SipHeader_X-Aselo-Call-Id}}\",\"aseloHostId\": \"{{trigger.call.SipHeader_X-Aselo-Call-Id | split: ':' | last}}\", \"helpline\":\"{{trigger.call.SipHeader_X-Aselo-Helpline}}\"}" + } + }, + { + "name": "getProfileFlagsForIdentifier", + "type": "make-http-request", + "transitions": [ + { + "next": "contact_routing", + "event": "success" + }, + { + "next": "SendCallToAgent", + "event": "failed" + } + ], + "properties": { + "offset": { + "x": 130, + "y": 190 + }, + "method": "POST", + "content_type": "application/json;charset=utf-8", + "add_twilio_auth": false, + "body": "{\"trigger\": {{trigger | to_json}}}", + "url": "${serverless_url}/getProfileFlagsForIdentifier" + } + }, + { + "name": "contact_routing", + "type": "split-based-on", + "transitions": [ + { + "next": "SendCallToAgent", + "event": "noMatch" + }, + { + "next": "blocked", + "event": "match", + "conditions": [ + { + "friendly_name": "If value contains blocked", + "arguments": [ + "{{widgets.getProfileFlagsForIdentifier.parsed}}" + ], + "type": "contains", + "value": "blocked" + } + ] + } + ], + "properties": { + "input": "{{widgets.getProfileFlagsForIdentifier.parsed}}", + "offset": { + "x": -220, + "y": 400 + } + } + }, + { + "name": "blocked", + "type": "say-play", + "transitions": [ + { + "event": "audioComplete" + } + ], + "properties": { + "offset": { + "x": -300, + "y": 710 + }, + "loop": 1, + "say": flow_vars[ + "voice_ivr_blocked_message" + ], + "language": flow_vars[ + "voice_ivr_language" + ] + } + } + ], + "initial_state": "Trigger", + "flags": { + "allow_concurrent_calls": true + } + } +) +} \ No newline at end of file From 355d4d76c0a975808bc238ff2bad3bd4d4e75d61 Mon Sep 17 00:00:00 2001 From: Stephen Okpalaononuju Date: Fri, 26 Jul 2024 12:07:29 +0100 Subject: [PATCH 18/25] ch: hide add to case button for contact in progress --- plugin-hrm-form/src/components/contact/ContactDetailsHome.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin-hrm-form/src/components/contact/ContactDetailsHome.tsx b/plugin-hrm-form/src/components/contact/ContactDetailsHome.tsx index 67fe40593e..b36d0262b8 100644 --- a/plugin-hrm-form/src/components/contact/ContactDetailsHome.tsx +++ b/plugin-hrm-form/src/components/contact/ContactDetailsHome.tsx @@ -293,6 +293,7 @@ const ContactDetailsHome: React.FC = function ({ ); const addedToCaseBanner = () => ; + const showAddcaseButton = !isDraft && !showRemovedFromCaseBanner; const renderCaseButton = () => { if (featureFlags.enable_case_merging) { @@ -300,7 +301,7 @@ const ContactDetailsHome: React.FC = function ({ <> {caseId ? addedToCaseBanner() - : !showRemovedFromCaseBanner && ( + : showAddcaseButton && ( Date: Fri, 26 Jul 2024 16:33:34 +0100 Subject: [PATCH 19/25] ch: change renderCaseButton to renderCaseBanners --- plugin-hrm-form/src/components/contact/ContactDetailsHome.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin-hrm-form/src/components/contact/ContactDetailsHome.tsx b/plugin-hrm-form/src/components/contact/ContactDetailsHome.tsx index b36d0262b8..96f66d2a2b 100644 --- a/plugin-hrm-form/src/components/contact/ContactDetailsHome.tsx +++ b/plugin-hrm-form/src/components/contact/ContactDetailsHome.tsx @@ -295,7 +295,7 @@ const ContactDetailsHome: React.FC = function ({ const addedToCaseBanner = () => ; const showAddcaseButton = !isDraft && !showRemovedFromCaseBanner; - const renderCaseButton = () => { + const renderCaseBanners = () => { if (featureFlags.enable_case_merging) { return ( <> @@ -341,7 +341,7 @@ const ContactDetailsHome: React.FC = function ({ )} - {renderCaseButton()} + {renderCaseBanners()} } From 5fe8e3579581f74720f91a925f42eaac4e7cfe4b Mon Sep 17 00:00:00 2001 From: Gianfranco Paoloni Date: Fri, 26 Jul 2024 13:30:55 -0300 Subject: [PATCH 20/25] chore: remove hyphens from phone numbers --- plugin-hrm-form/src/utils/task.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/plugin-hrm-form/src/utils/task.ts b/plugin-hrm-form/src/utils/task.ts index a7f2bc3a75..901c9cbd47 100644 --- a/plugin-hrm-form/src/utils/task.ts +++ b/plugin-hrm-form/src/utils/task.ts @@ -25,14 +25,18 @@ const getContactValueFromWebchat = task => { return preEngagementData.contactIdentifier; }; +/** + * IMPORTANT: keep up to date with serverless/functions/getProfileFlagsForIdentifier + */ const trimSpaces = (s: string) => s.replaceAll(' ', ''); - +const trimHyphens = (s: string) => s.replaceAll('-', ''); +const phoneNumberStandardization = (s: string) => [trimSpaces, trimHyphens].reduce((accum, f) => f(accum), s); type TransformIdentifierFunction = (c: string) => string; const channelTransformations: { [k in ChannelTypes]: TransformIdentifierFunction[] } = { - voice: [trimSpaces], - sms: [trimSpaces], - whatsapp: [s => s.replace('whatsapp:', ''), trimSpaces], - modica: [s => s.replace('modica:', ''), trimSpaces], + voice: [phoneNumberStandardization], + sms: [phoneNumberStandardization], + whatsapp: [s => s.replace('whatsapp:', ''), phoneNumberStandardization], + modica: [s => s.replace('modica:', ''), phoneNumberStandardization], facebook: [s => s.replace('messenger:', '')], instagram: [], line: [], From d767ce58b5aaed388ac2dedb99ace6202e5e9729 Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Tue, 30 Jul 2024 18:22:06 +0200 Subject: [PATCH 21/25] additional options --- .../zm/v1/tabbedForms/ChildInformationTab.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hrm-form-definitions/form-definitions/zm/v1/tabbedForms/ChildInformationTab.json b/hrm-form-definitions/form-definitions/zm/v1/tabbedForms/ChildInformationTab.json index d95a5eb3ce..9ddfd75435 100644 --- a/hrm-form-definitions/form-definitions/zm/v1/tabbedForms/ChildInformationTab.json +++ b/hrm-form-definitions/form-definitions/zm/v1/tabbedForms/ChildInformationTab.json @@ -360,6 +360,10 @@ "label": "Vulnerable Groups", "type": "listbox-multiselect", "options": [ + { + "value": "Asylum seeker", + "label": "Asylum seeker" + }, { "value": "HIV Positive?", "label": "HIV Positive?" @@ -400,6 +404,10 @@ "value": "Out-of-school child", "label": "Out-of-school child" }, + { + "value": "Refugees", + "label": "Refugees" + }, { "value": "Other", "label": "Other" From 722070b68fec6f7e725ffe20c14f1c652617e6b8 Mon Sep 17 00:00:00 2001 From: Sinekhaya Date: Tue, 13 Aug 2024 21:22:57 +0200 Subject: [PATCH 22/25] spelling error fix --- .../sg/v1/tabbedForms/IssueCategorizationTab.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hrm-form-definitions/form-definitions/sg/v1/tabbedForms/IssueCategorizationTab.json b/hrm-form-definitions/form-definitions/sg/v1/tabbedForms/IssueCategorizationTab.json index 9ccf11e03a..ef991935b7 100644 --- a/hrm-form-definitions/form-definitions/sg/v1/tabbedForms/IssueCategorizationTab.json +++ b/hrm-form-definitions/form-definitions/sg/v1/tabbedForms/IssueCategorizationTab.json @@ -158,13 +158,10 @@ "color": "#db7a34", "subcategories": [ { - "label": "Firends and Friendships" + "label": "Friends and Friendships" }, { "label": "Heterosexual intimate partner relationships" - }, - { - "label": "Making friends" } ] }, From a855a5d018a4186ce54c83f430f5e8014fb119f8 Mon Sep 17 00:00:00 2001 From: janorivera Date: Mon, 16 Sep 2024 10:03:24 -0300 Subject: [PATCH 23/25] Adding expression to default queue transfers workflow (#2524) --- twilio-iac/helplines/templates/workflows/queue-transfers.tftpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/twilio-iac/helplines/templates/workflows/queue-transfers.tftpl b/twilio-iac/helplines/templates/workflows/queue-transfers.tftpl index 5ebc9cf657..795c69444f 100644 --- a/twilio-iac/helplines/templates/workflows/queue-transfers.tftpl +++ b/twilio-iac/helplines/templates/workflows/queue-transfers.tftpl @@ -8,7 +8,8 @@ "expression": "transferTargetType == 'queue' AND targetSid == '${value}'", "targets": [ { - "queue": "${key == "survey" ? (contains(keys(task_queues), "master") ? task_queues.master : task_queues.survey) : value}" + "queue": "${key == "survey" ? (contains(keys(task_queues), "master") ? task_queues.master : task_queues.survey) : value}", + "expression": "(worker.waitingOfflineContact != true AND ((task.channelType == 'voice' AND worker.channel.chat.assigned_tasks == 0) OR (task.channelType != 'voice' AND worker.channel.voice.assigned_tasks == 0)) AND ((task.transferTargetType == 'worker' AND task.targetSid == worker.sid) OR (task.transferTargetType != 'worker' AND worker.sid != task.ignoreAgent))) OR (worker.waitingOfflineContact == true AND task.targetSid == worker.sid AND task.isContactlessTask == true)" } ] }%{ if length(task_queues) > 1 && key != keys(task_queues)[length(task_queues)-1] },%{ endif } From 75e4d65e5a4593881310ee27444bd09ea942ede9 Mon Sep 17 00:00:00 2001 From: janorivera Date: Mon, 16 Sep 2024 10:04:08 -0300 Subject: [PATCH 24/25] AS: Alejandro/as/adding blocking (#2523) * blocking conversation normal channel * staging updates * updating production * update to flow * adding missing variable --------- Co-authored-by: Stephen Hand --- twilio-iac/helplines/as/production.hcl | 14 +- twilio-iac/helplines/as/staging.hcl | 16 +- .../messaging-lex-v3-blocking.tftpl | 356 ++++++++++++++++++ 3 files changed, 375 insertions(+), 11 deletions(-) create mode 100644 twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking.tftpl diff --git a/twilio-iac/helplines/as/production.hcl b/twilio-iac/helplines/as/production.hcl index 0fc89a217a..9251090ade 100644 --- a/twilio-iac/helplines/as/production.hcl +++ b/twilio-iac/helplines/as/production.hcl @@ -9,14 +9,18 @@ locals { flow_vars = { capture_channel_with_bot_function_sid = "ZHd9eb5ce1b230abe29d9eafccc88b16d3" chatbot_callback_cleanup_function_sid = "ZH757387715913592aa1938b284411f18b" + send_message_janitor_function_sid = "ZHdfbbef84918d1e31fab54ab0cab8d0f7" bot_language = "en-US" + widget_from = "Aselo" + chat_blocked_message = "Sorry, you're not able to contact SafeSpot from this device or account" + error_message = "There has been an error with your message, please try writing us again." } channels = { webchat : { channel_type = "web" contact_identity = "" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v2.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v2-blocking.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, @@ -24,7 +28,7 @@ locals { messaging_mode = "conversations" channel_type = "facebook" contact_identity = "messenger:105642325869250" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, @@ -32,7 +36,7 @@ locals { messaging_mode = "conversations" channel_type = "whatsapp" contact_identity = "whatsapp:+15079441697" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, @@ -40,7 +44,7 @@ locals { messaging_mode = "conversations" channel_type = "custom" contact_identity = "instagram" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-custom-channel-lex-v3-blocking.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, @@ -48,7 +52,7 @@ locals { messaging_mode = "conversations" channel_type = "custom" contact_identity = "line" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-custom-channel-lex-v3-blocking.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, diff --git a/twilio-iac/helplines/as/staging.hcl b/twilio-iac/helplines/as/staging.hcl index cbaed19bc9..bf3a583ab1 100644 --- a/twilio-iac/helplines/as/staging.hcl +++ b/twilio-iac/helplines/as/staging.hcl @@ -11,7 +11,11 @@ locals { flow_vars = { capture_channel_with_bot_function_sid = "ZH979fc67a70a4a9572552c81a0d5d41d7" chatbot_callback_cleanup_function_sid = "ZH31416a207f81bf504a1391ed7649400e" + send_message_janitor_function_sid = "ZH91e33557d45b6dd60100876452e2428b" bot_language = "en-US" + widget_from = "Aselo" + chat_blocked_message = "Sorry, you're not able to contact Aselo from this device or account" + error_message = "There has been an error with your message, please try writing us again." } @@ -19,7 +23,7 @@ locals { webchat : { channel_type = "web" contact_identity = "" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v2.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v2-blocking.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, @@ -27,7 +31,7 @@ locals { messaging_mode = "conversations" channel_type = "messenger" contact_identity = "messenger:131329426738030" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, @@ -35,7 +39,7 @@ locals { messaging_mode = "conversations" channel_type = "whatsapp" contact_identity = "whatsapp:+12055189944" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, @@ -43,7 +47,7 @@ locals { messaging_mode = "conversations" channel_type = "custom" contact_identity = "line" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-custom-channel-lex-v3-blocking.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, @@ -51,7 +55,7 @@ locals { messaging_mode = "conversations" channel_type = "custom" contact_identity = "telegram" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-custom-channel-lex-v3-blocking.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, @@ -59,7 +63,7 @@ locals { messaging_mode = "conversations" channel_type = "custom" contact_identity = "instagram" - templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3.tftpl" + templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-custom-channel-lex-v3-blocking.tftpl" channel_flow_vars = {} chatbot_unique_names = [] }, diff --git a/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking.tftpl b/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking.tftpl new file mode 100644 index 0000000000..445b3d8f44 --- /dev/null +++ b/twilio-iac/helplines/templates/studio-flows/messaging-lex-v3-blocking.tftpl @@ -0,0 +1,356 @@ +${ + jsonencode( + { + "description": flow_description, + "states": [ + { + "name": "Trigger", + "type": "trigger", + "transitions": [ + { + "event": "incomingMessage" + }, + { + "event": "incomingCall" + }, + { + "next": "getProfileFlagsForIdentifier", + "event": "incomingConversationMessage" + }, + { + "event": "incomingRequest" + }, + { + "event": "incomingParent" + } + ], + "properties": { + "offset": { + "x": -60, + "y": -540 + } + } + }, + { + "name": "getProfileFlagsForIdentifier", + "type": "make-http-request", + "transitions": [ + { + "next": "contact_routing", + "event": "success" + }, + { + "next": "pre_survey_complete", + "event": "failed" + } + ], + "properties": { + "offset": { + "x": -350, + "y": -280 + }, + "method": "POST", + "content_type": "application/json;charset=utf-8", + "add_twilio_auth": false, + "body": "{ \"trigger\": {{trigger | to_json}}, \"channelType\": \"${channel_name}\"}", + "url": "${serverless_url}/getProfileFlagsForIdentifier" + } + }, + { + "name": "send_blocked_message", + "type": "send-message", + "transitions": [ + { + "event": "sent" + }, + { + "event": "failed" + } + ], + "properties": { + "offset": { + "x": -640, + "y": 210 + }, + "service": "{{trigger.conversation.InstanceSid}}", + "channel": "{{trigger.conversation.ChannelSid}}", + "from": flow_vars["widget_from"], + "to": "{{contact.channel.address}}", + "body": flow_vars["chat_blocked_message"] + } + }, + { + "name": "contact_routing", + "type": "split-based-on", + "transitions": [ + { + "next": "pre_survey_complete", + "event": "noMatch" + }, + { + "next": "send_blocked_message", + "event": "match", + "conditions": [ + { + "friendly_name": "If value contains blocked", + "arguments": [ + "{{widgets.getProfileFlagsForIdentifier.parsed.flags}}" + ], + "type": "contains", + "value": "blocked" + } + ] + } + ], + "properties": { + "input": "{{widgets.getProfileFlagsForIdentifier.parsed.flags}}", + "offset": { + "x": -690, + "y": -60 + } + } + }, + { + "name": "attributes", + "type": "send-to-flex", + "transitions": [ + { + "event": "callComplete" + }, + { + "next": "webhook_notify_failed_to_enqueue", + "event": "failedToEnqueue" + }, + { + "event": "callFailure" + } + ], + "properties": { + "offset": { + "x": 420, + "y": 970 + }, + "workflow": workflow_sids["master"], + "channel": task_channel_sids["chat"], + "attributes":channel_attributes["default"] + } + }, + { + "name": "pre_survey_complete", + "type": "split-based-on", + "transitions": [ + { + "next": "capture_channel_with_bot", + "event": "noMatch" + }, + { + "next": "attributes", + "event": "match", + "conditions": [ + { + "friendly_name": "If value equal_to true", + "arguments": [ + "{{trigger.conversation.ChannelAttributes.preSurveyComplete}}" + ], + "type": "equal_to", + "value": "true" + } + ] + } + ], + "properties": { + "input": "{{trigger.conversation.ChannelAttributes.preSurveyComplete}}", + "offset": { + "x": 150, + "y": 200 + } + } + }, + { + "name": "capture_channel_with_bot", + "type": "run-function", + "transitions": [ + { + "event": "success" + }, + { + "next": "webhook_notify_error", + "event": "fail" + } + ], + "properties": { + "service_sid": serverless_service_sid, + "environment_sid": serverless_environment_sid, + "offset": { + "x": -130, + "y": 500 + }, + "function_sid": flow_vars["capture_channel_with_bot_function_sid"], + "parameters": [ + { + "value": "{{flow.channel.address}}", + "key": "channelSid" + }, + { + "value": "trigger_pre_survey", + "key": "message" + }, + { + "value": "{{flow.flow_sid}}", + "key": "studioFlowSid" + }, + { + "value": "en-US", + "key": "language" + }, + { + "value": "pre_survey", + "key": "botSuffix" + }, + { + "value": "withUserMessage", + "key": "triggerType" + }, + { + "value": "triggerStudioFlow", + "key": "releaseType" + }, + { + "value": "preSurveyComplete", + "key": "releaseFlag" + }, + { + "value": "{{trigger.conversation.Source | downcase}}", + "key": "channelType" + }, + { + "value": "true", + "key": "isConversation" + } + ], + "url": "${serverless_url}/channelCapture/captureChannelWithBot" + } + }, + { + "name": "channel_cleanup", + "type": "run-function", + "transitions": [ + { + "next": "attributes", + "event": "success" + }, + { + "next": "send_message_run_janitor", + "event": "fail" + } + ], + "properties": { + "service_sid": serverless_service_sid, + "environment_sid": serverless_environment_sid, + "offset": { + "x": -210, + "y": 1080 + }, + "function_sid": flow_vars["chatbot_callback_cleanup_function_sid"], + "parameters": [ + { + "value": "{{flow.channel.address}}", + "key": "channelSid" + } + ], + "url": "${serverless_url}/channelCapture/chatbotCallbackCleanup" + } + }, + { + "name": "webhook_notify_error", + "type": "make-http-request", + "transitions": [ + { + "next": "channel_cleanup", + "event": "success" + }, + { + "next": "channel_cleanup", + "event": "failed" + } + ], + "properties": { + "offset": { + "x": 0, + "y": 730 + }, + "method": "POST", + "content_type": "application/json;charset=utf-8", + "add_twilio_auth": false, + "body": "{ \"text\": \"Issue detected on ${short_helpline} ${short_environment} Flow SID: {{flow.flow_sid}} Execution SID: {{flow.sid}} \" }", + "url": webhook_url_studio_errors + } + }, + { + "name": "webhook_notify_failed_to_enqueue", + "type": "make-http-request", + "transitions": [ + { + "event": "success" + }, + { + "event": "failed" + } + ], + "properties": { + "offset": { + "x": 540, + "y": 1250 + }, + "method": "POST", + "content_type": "application/json;charset=utf-8", + "add_twilio_auth": false, + "body": "{ \"text\": \"Issue detected [Failed to Enqueue] on ${short_helpline} ${short_environment} Flow SID: {{flow.flow_sid}} Execution SID: {{flow.sid}} \" }", + "url": webhook_url_studio_errors + } + }, + { + "name": "send_message_run_janitor", + "type": "run-function", + "transitions": [ + { + "event": "success" + }, + { + "event": "fail" + } + ], + "properties": { + "service_sid": serverless_service_sid, + "environment_sid": serverless_environment_sid, + "offset": { + "x": 110, + "y": 1260 + }, + "function_sid": flow_vars["send_message_janitor_function_sid"], + "parameters": [ + { + "value": "{{flow.channel.address}}", + "key": "channelSid" + }, + { + "value": flow_vars["error_message"], + "key": "message" + }, + { + "value": flow_vars["widget_from"], + "key": "from" + } + ], + "url": "${serverless_url}/sendMessageAndRunJanitor" + } + } + ], + "initial_state": "Trigger", + "flags": { + "allow_concurrent_calls": true + } +} + + ) +} \ No newline at end of file From 90e8274d49aba39d3e9c1005fa09434410dc5a24 Mon Sep 17 00:00:00 2001 From: janorivera Date: Mon, 16 Sep 2024 10:17:19 -0300 Subject: [PATCH 25/25] NZ: message update (#2526) --- plugin-hrm-form/src/translations/en-NZ/messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin-hrm-form/src/translations/en-NZ/messages.json b/plugin-hrm-form/src/translations/en-NZ/messages.json index 1df1528d01..f866ca5eb6 100644 --- a/plugin-hrm-form/src/translations/en-NZ/messages.json +++ b/plugin-hrm-form/src/translations/en-NZ/messages.json @@ -1,6 +1,6 @@ { "WelcomeMsg": "Kia ora, you're now talking with a Youthline counsellor. How can we support you?", - "GoodbyeMsg": "We've closed this conversation on our side - you're welcome to reach out to us again the next time you need support. As a reminder, if you're feeling unsafe at any time you can get urgent support by calling 111, or the number for your area at www.health.govt.nz/cateams", + "GoodbyeMsg": "We've closed this conversation on our side - you're welcome to reach out to us again the next time you need support. As a reminder, if you're feeling unsafe at any time you can get urgent support by calling 111, or the number for your area at info.health.nz/crisis-assessment-teams", "EndChatMsg": "The client has clicked 'End Chat'. Thank you for reaching out. Please contact us again if you need more help.", "ClosedOutOfShift": "You've reached the Helpline outside our webchat hours. If you'd like to talk to us now, please txt us for free on 234 or call us for free on 0800376633", "ClosedHolidays": "The helpline is closed due to a holiday."