Skip to main content
Skip table of contents

Remote Meeting Developer Guide For Pitcher Connect

  1. Following function needs to be added in the index.js file

    CODE
    function triggerCustomAction(callback,parameter) {
    
    if(typeof Ti != "undefined")
    
    Ti.App.fireEvent('triggerCustomAction',{'callBack':callback,"parameter":parameter});
    
    }
    
    
  2. When this function called, portal does the redirections. To illustrate that;

     

  3. Callback function automatically calls for both Rep & Customer interactive. 

    Before the click:

      After the click:

     

  4. On the Rep side returned data has default parameter rep as true. So the developer can do different actions per user type if needed.

  5. When the custom interactive's DOM is ready, Pitcher’s global Ti object might not be ready.

     

  6. If it is really needed to trigger the event as soon as possible then it might be required to check it’s availability with a recursive function like the one below :

CODE
var initRunAttempt = 0;

    function refreshInitialTiCall(parameter,callback) {

    if(typeof Ti == 'undefined' && initRunAttempt > 6) {

        window.location.reload();

    }

    var recurseThis = setTimeout(function() {

    if(typeof Ti == 'undefined' && initRunAttempt > 6) {

        window.location.reload();

    }

    initRunAttempt++;

    if(typeof Ti != 'undefined') {          

        Ti.App.fireEvent('triggerCustomAction',{'callBack':callback,"parameter":parameter});

    } else {

           refreshInitialTiCall(parameter,callback);

           recurseThis = setTimeout(recurseThis, 1000);

       }

     }, 1000);

    }

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.