Skip to content

Commit

Permalink
Merge pull request #2527 from techmatters/sinekhaya/sg/workflow-update
Browse files Browse the repository at this point in the history
SG updates
  • Loading branch information
sinehome authored Sep 18, 2024
2 parents 256d186 + b1dd51d commit 9af4450
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
[
{
"flag": "blocked",
"label": "Short Term Block (24 Hours)",
"durationInHours": "24"
},
{
"flag": "blocked",
"label": "Long Term Block (1 Week)",
"durationInHours": "168"
"label": "Short Term Block (3 Hours)",
"durationInHours": "3"
}
]
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
[
{
"name": "firstName",
"label": "First Name",
"type": "input",
"required": {
"value": true,
"message": "RequiredFieldError"
}
},
{
"name": "lastName",
"label": "Last Name",
"label": "Name",
"type": "input",
"required": {
"value": true,
Expand Down Expand Up @@ -89,11 +80,7 @@
{
"name": "emailAddress",
"label": "Email Address",
"type": "input",
"required": {
"value": true,
"message": "RequiredFieldError"
}
"type": "input"
},
{
"name": "gender",
Expand Down
2 changes: 1 addition & 1 deletion plugin-hrm-form/src/translations/en-SG/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"WelcomeMsg": "Hi, this is Tinkle Friend!",
"GoodbyeMsg": "Tinkle Friend has left the chat. Thank you for reaching out. Please contact us again if you need more help.",
"EndChatMsg": "This chat has ended. Thank you for reaching out.",
"ClosedOutOfShift": "Tinkle Friend chat is currently closed. Please reach out to us again any time during our operating hours Monday to Thursday 2.30pm to 7pm or Friday 2.30pm to 5.00pm (Please note that we are closed on Public Holidays)",
"ClosedOutOfShift": "Hello! Tinkle Friend is currently closed. We are available from Monday to Thursday from 2.30pm to 7pm, and Friday from 2.30pm to 5pm (closed on public holidays).\nDo check out our BUZZ magazine at https://www.tinklefriend.sg/buzz-magazine/ and come back again later to chat with us! Alternatively, you can email us at tinklefriend@childrensociety.org.sg and we will respond to you in 3 working days.\nHowever, if you are facing a crisis and thinking about suicide, you can WhatsApp our friends from Samaritans of Singapore (SOS) at 9151 1767.\nIf you are in immediate danger, please call the Police at 999.",
"ClosedHolidays": "The helpline is closed due to a holiday."
}
12 changes: 8 additions & 4 deletions twilio-iac/helplines/sg/common.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ locals {
custom_task_routing_filter_expression = "channelType =='voice' OR channelType =='web' OR isContactlessTask == true"
workflows = {
master : {
friendly_name : "Master Workflow"
templatefile : "/app/twilio-iac/helplines/sg/templates/workflows/master.tftpl"
friendly_name = "Master Workflow"
templatefile = "/app/twilio-iac/helplines/sg/templates/workflows/master.tftpl"
},
queue_transfers : {
friendly_name = "Queue Transfers Workflow"
templatefile = "/app/twilio-iac/helplines/templates/workflows/queue-transfers.tftpl"
},
survey : {
friendly_name : "Survey Workflow"
templatefile : "/app/twilio-iac/helplines/templates/workflows/lex.tftpl"
friendly_name = "Survey Workflow"
templatefile = "/app/twilio-iac/helplines/templates/workflows/lex.tftpl"
}
}
task_queues = {
Expand Down
6 changes: 3 additions & 3 deletions twilio-iac/helplines/sg/production.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ locals {
contact_identity = ""
templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-no-chatbot-operating-hours-blocking.tftpl"
channel_flow_vars = {
chat_greeting_message = "Hello! Tinkle Friend is engaged with other children at the moment. Please hold on for a while and we will attend to you as soon as we can."
chat_greeting_message = "Hello! Tinkle Friend is engaged with other children at the moment. Please hold on for a while and we will attend to you as soon as we can. Thank you for your patience!\nWhile waiting, you can check out our BUZZ magazine at https://www.tinklefriend.sg/buzz-magazine/. Alternatively, you can email us at tinklefriend@childrensociety.org.sg and we will respond to you in 3 working days.\nHowever, if you are facing a crisis and thinking about suicide, you can WhatsApp our friends from Samaritans of Singapore (SOS) at 9151 1767. If you are in immediate danger, please call the Police at 999."
widget_from = "Tinkle Friend"
chat_blocked_message = "Hi, you've been blocked from accessing Tinkle Friend services and we are not able to read or receive further messages from you."
chat_blocked_message = "Hello! Tinkle Friend is engaged with other children at the moment. Please hold on for a while and we will attend to you as soon as we can. Thank you for your patience!\nWhile waiting, you can check out our BUZZ magazine at https://www.tinklefriend.sg/buzz-magazine/. Alternatively, you can email us at tinklefriend@childrensociety.org.sg and we will respond to you in 3 working days.\nHowever, if you are facing a crisis and thinking about suicide, you can WhatsApp our friends from Samaritans of Singapore (SOS) at 9151 1767. If you are in immediate danger, please call the Police at 999."
}
chatbot_unique_names = []
},
Expand All @@ -43,7 +43,7 @@ locals {
voice_ivr_greeting_message = "Hello! Tinkle Friend is engaged with other children at the moment. Please hold on for a while and we will attend to you as soon as we can."

welcome_message_url = "https://sg-services-4304.twil.io/welcome_Message.mp3"
busy_message_url = "https://sg-services-4304.twil.io/waiting_music_sg.mp3"
busy_message_url = "https://sg-services-4304.twil.io/waiting_music.mp3"
closed_message_url = "https://sg-services-4304.twil.io/closed_Message.mp3"

widget_from = "Tinkle Friend"
Expand Down
6 changes: 3 additions & 3 deletions twilio-iac/helplines/sg/staging.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ locals {
contact_identity = ""
templatefile = "/app/twilio-iac/helplines/templates/studio-flows/messaging-no-chatbot-operating-hours-blocking.tftpl"
channel_flow_vars = {
chat_greeting_message = "Hello! Tinkle Friend is engaged with other children at the moment. Please hold on for a while and we will attend to you as soon as we can. While waiting, you can check out our BUZZ magazine at https://www.tinklefriend.sg/buzz-magazine/. Thank you for your patience!"
chat_greeting_message = "Hello! Tinkle Friend is engaged with other children at the moment. Please hold on for a while and we will attend to you as soon as we can. Thank you for your patience!\nWhile waiting, you can check out our BUZZ magazine at https://www.tinklefriend.sg/buzz-magazine/. Alternatively, you can email us at tinklefriend@childrensociety.org.sg and we will respond to you in 3 working days.\nHowever, if you are facing a crisis and thinking about suicide, you can WhatsApp our friends from Samaritans of Singapore (SOS) at 9151 1767. If you are in immediate danger, please call the Police at 999."
widget_from = "Tinkle Friend"
chat_blocked_message = "Hi, you've been blocked from accessing Tinkle Friend services and we are not able to read or receive further messages from you."
chat_blocked_message = "Hello! Tinkle Friend is engaged with other children at the moment. Please hold on for a while and we will attend to you as soon as we can. Thank you for your patience!\nWhile waiting, you can check out our BUZZ magazine at https://www.tinklefriend.sg/buzz-magazine/. Alternatively, you can email us at tinklefriend@childrensociety.org.sg and we will respond to you in 3 working days.\nHowever, if you are facing a crisis and thinking about suicide, you can WhatsApp our friends from Samaritans of Singapore (SOS) at 9151 1767. If you are in immediate danger, please call the Police at 999."

}
chatbot_unique_names = []
Expand All @@ -42,7 +42,7 @@ locals {

welcome_message_url = "https://sg-services-1705.twil.io/welcome_Message.mp3"
busy_message_url = "https://sg-services-1705.twil.io/busy_Message.mp3"
closed_message_url = "https://sg-services-1705.twil.io/closed_Message.mp3"
closed_message_url = "https://sg-services-1705.twil.io/closed_Message.mp3"

widget_from = "Tinkle Friend"
voice_ivr_blocked_message = "Hi, you've been blocked from accessing Tinkle Friend services and we are not able to read or receive further messages from you."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ ${
"y": 710
},
"loop": 1,
"say": channel_flow_vars["voice_ivr_blocked_message"],
"play": channel_flow_vars["busy_message_url"],
"language": channel_flow_vars["voice_ivr_language"]
}
}
Expand Down
10 changes: 10 additions & 0 deletions twilio-iac/helplines/sg/templates/workflows/master.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
{
"filter_friendly_name": "${helpline}",
"expression": "${task_routing_filter_expression}",
"targets": [
{
"expression": "((worker.waitingOfflineContact != true 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)) AND worker.roles HAS \"supervisor\"",
"queue": "${task_queues.master}"
}
]
},
{
"filter_friendly_name": "Volunteer Skills",
"expression": "${task_routing_filter_expression}",
"targets": [
{
"expression": "(worker.waitingOfflineContact != true AND ((task.channelType == 'voice' AND worker.channel.chat.assigned_tasks == 0 AND worker.routing.skills HAS \"Calls\") OR (task.channelType != 'voice' AND worker.channel.voice.assigned_tasks == 0 AND worker.routing.skills HAS \"Chat\")) 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)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ ${
},
"service": "{{trigger.message.InstanceSid}}",
"channel": "{{trigger.message.ChannelSid}}",
"from": "Linea Libre",
"from": channel_flow_vars["widget_from"],
"to": "{{contact.channel.address}}",
"body": "{{widgets.check_operating_hours.parsed.message}}"
}
Expand Down

0 comments on commit 9af4450

Please sign in to comment.