Question

2
Replies
838
Views
Close popover
Ravi Kumar Pisupati (Ravi Kumar Pisupati)
Optum
Principal LSA - Pega
Optum
US
Ravi Kumar Pisupati Member since 2015 85 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 Enterprise Application Development Dev/Designer Studio Data Integration Java and Activities User Experience
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.