Skip to content

Commit a1fd013

Browse files
authored
SSCSCI-2079: Webchat Genesys update (#1886)
* Genesys update * turn web chat on in preview * remove second web chat inclusion
1 parent 2654d39 commit a1fd013

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

charts/sscs-tribunals-frontend/values.preview.template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ nodejs:
1717
WEBCHAT_CLIENT_URL: "webchat-client.pp.ctsc.hmcts.net"
1818
ALLOW_COOKIE_BANNER_ENABLED: true
1919
WEBCHAT_OPENING_TIME_8_5: true
20-
KERV_WEBCHAT_ENABLED: false
20+
KERV_WEBCHAT_ENABLED: true
2121
FT_WELSH: true
2222
PCQ_ENABLED: true
2323
IBC_NI_POSTCODES_FEATURE: true

views/components/contact-us.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ <h2 class="govuk-heading-m govuk-!-margin-bottom-0">{{ commonContent[htmlLang].c
2020
{% include "components/web-chat.html" %}
2121
{% endif %}
2222
</div>
23-
{% include "components/web-chat.html" %}
2423
<div id="antenna-web-chat-closed" style="display: none;">{{ commonContent[htmlLang].contactUs.webchat.textChatClosed }}</div>
2524
<div id="antenna-web-chat-busy" style="display: none;">{{ commonContent[htmlLang].contactUs.webchat.textAllAgentsBusy }}</div>
2625
<div id="antenna-web-chat-no-agents" style="display: none;">{{ commonContent[htmlLang].contactUs.webchat.textNoAgentsAvailable }}</div>

views/components/kerv-webchat.html

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,27 @@
6363
})(window, 'Genesys',
6464
'${GENESYS_BASE_URL}/genesys-bootstrap/genesys.min.js',
6565
{ environment: '${ENVIRONMENT}', deploymentId: '${DEPLOYMENT_ID}' });
66-
Genesys("command", "Database.set", {
67-
messaging: { customAttributes: { webReferrerPage: '${REFERRER_PAGE}'}}
68-
},
69-
function(data){ /* fulfilled, returns data */}, function(){ /* rejected */ }
66+
Genesys(
67+
"subscribe",
68+
"Messenger.ready",
69+
function () {
70+
Genesys("command", "Database.set",
71+
{ messaging: { customAttributes: { webReferrerPage: '${REFERRER_PAGE}' } } },
72+
() => { console.log("database set"); },
73+
(error) => { console.log("Couldn't set database.", error); }
74+
)
75+
}
76+
);
77+
Genesys(
78+
"subscribe",
79+
"MessagingService.conversationCleared",
80+
function () {
81+
Genesys("command", "Database.set",
82+
{ messaging: { customAttributes: { webReferrerPage: '${REFERRER_PAGE}' } } },
83+
() => { console.log("database set"); },
84+
(error) => { console.log("Couldn't set database.", error); }
85+
)
86+
}
7087
);
7188
window.addEventListener('load', function () {
7289
Genesys('subscribe', 'Messenger.ready', function () {

0 commit comments

Comments
 (0)