Question

2
Replies
832
Views
Ravi Kumar Pisupati Member since 2015 76 posts
Optum
Posted: October 1, 2016
Last activity: October 6, 2016
Closed
Solved

Handshake to IVR/CTI from Pega

Hi,

We are working on a contact center application running on V6.2 + CPMHC FW. Now we are aupgrading of our application to V7.1.9 + CSHC FW7.13. In our application, the customer call is coming from our custom IVR/CTI tool in a screen popup and from there agents start resolving the customer issues using CSHC FW features. During this process, we need to send back some call data to our IVR/CTI tool and for that we have written a JS function. This function was working fine in V62 but not in V7. Why because, the ActiveX controls are not supported in V7 as per current system. Tried dubugging the below code and the code is failing from 2nd if(window.ActiveXObject) onwards. Is there anyway (simple) to reslolve this issue?

 

<script>
function sendCallData()
{
               var interactionType = '<%= pega_rules_string.stripSpecialChars(tools.getPrimaryPage().getTopLevelPage().getStringIfPresent("InteractionType"))%>';
               if (interactionType == "phone") {
                              var val1 = '<%= pega_rules_string.stripSpecialChars(tools.getPrimaryPage().getTopLevelPage().getIfPresent("Page1").getPageValue().getStringIfPresent("Number1"))%>';
                              var val2 = '<%= pega_rules_string.stripSpecialChars(tools.getPrimaryPage().getTopLevelPage().getIfPresent("Page1").getPageValue().getStringIfPresent("Number2"))%>';
                              var callData =
                              "<root>
                                             <callvar><type>vccvar</type><name>Data1</name><value>" + val1 + "</value></callvar>
                                             <callvar><type>vccvar</type><name>Data2</name><value>" + val2 + "</value></callvar>
                              </root>";
                              var RC = 0;
                              if (window.ActiveXObject) {
                                             try {
                                                            var ATL = new ActiveXObject("CustomDesktopApi.CustomCallControl");
                                                            RC =ATL.SetCurCallData(callData);
                                                            /*
                                                            if (RC == 0)
                                                                           alert("call data set");
                                                            else
                                                                           alert("Unable to set call data");
                                                            */
                                             }
                                             catch (e) {
                                             /*
                                                            alert("Unable to create call control");
                                             */
                                             }
                              }
                              /*
                              else
                                             alert("Browser does not support call control");
                              */
               }
}
if (window.addEventListener)
               window.addEventListener("load",  sendCallData, false);
else if (window.attachEvent)
               window.attachEvent("onload",  sendCallData);
</script>
 
Thanks and Regards,
Ravi Kumar Pisupati

 ***Updated by Moderator: Vidyaranjan. Removed user added Ask the Expert tag. Apologies for confusion, shouldn't have been an end-user option***

Low-Code App Development Low-Code App Development Dev/Designer Studio Data Integration Java and Activities User Interface
Moderation Team has archived post
Share this page LinkedIn