diff --git a/docs/samples/contact-center/app.js b/docs/samples/contact-center/app.js index eaa97ffb53c..19736d496be 100644 --- a/docs/samples/contact-center/app.js +++ b/docs/samples/contact-center/app.js @@ -52,6 +52,7 @@ const endConsultBtn = document.querySelector('#end-consult'); const consultTabBtn = document.querySelector('#consult'); const initiateConsultControlsElm = document.querySelector('#initiate-consult-controls'); const initiateConsultDialog = document.querySelector('#initiate-consult-dialog'); +const agentMultiLoginAlert = document.querySelector('#agentMultiLoginAlert'); const consultTransferBtn = document.querySelector('#consult-transfer'); const transferElm = document.getElementById('transfer'); @@ -574,6 +575,14 @@ function register() { idleCodesDropdown.value = data.auxCodeId?.trim() !== '' ? data.auxCodeId : DEFAULT_CODE; } }); + + webex.cc.on('agent:multiLogin', (data) => { + if (data && typeof data === 'object' && data.type === 'AgentMultiLoginCloseSession') { + agentMultiLoginAlert.innerHTML = 'Multiple Agent Login Session Detected!'; + agentMultiLoginAlert.style.color = 'red';`` + } + }); + } function populateWrapupCodesDropdown() { diff --git a/docs/samples/contact-center/index.html b/docs/samples/contact-center/index.html index 688bdc316f5..7cb43a8e3f5 100644 --- a/docs/samples/contact-center/index.html +++ b/docs/samples/contact-center/index.html @@ -102,6 +102,7 @@
NOTE: Teams are fetched automatically for the Agent Login.