When an agent receives call through Amazon Connect, interaction pop up not opening in same tab

Harini Sirivara
Tera Contributor

We have integrated ServiceNow with Amazon Connect. Whenever any calls is answered by any agent the interaction is not been populated in the same tab, but the interaction is being created in the backend. 

 

/nav_to.do?uri=sys_ui_page.do?sys_id=4c1fdcd4e710001034b36584c2f6a987

 

The above link is the UI Page through which the connection is established. Earlier interaction was opening in the parent tab but there was an issue like whenever the agent receives a call the interaction is been created and popping up in the parent tab and also if any agents opens any other servicenow tab while on the call it is redirecting it to the interaction tab. To avoid we have modified below part in the UI Page due to which the redirection is not happening but the interaction window after receiving a call is not showing up.

 

Modified Script:

 

function initSuccess(snConfig) {
            if (window.parent.location.href.indexOf("/now/sow/") !== -1) {
    return;
   }    //This is the part which we have added
 
openFrameAPI.Initialized = true;
            console.log("openframe configuration",snConfig);
            var openFrameConfig = snConfig;
            if(openFrameConfig.configuration)
                showRecordOnIncomingBehavior = JSON.parse(openFrameConfig.configuration);
            //register for communication event from TopFrame
            openFrameAPI.subscribe('openframe_awa_agent_presence', handleOpenFrameAwaEvent);
            //register event for click to call
            openFrameAPI.subscribe('openframe_communication', handleClickToCall);
}
 
 
0 REPLIES 0