1

We have the open CTI adapter working for lightning. I wanted to add a requirement where we have to make a callout to another system and check for DNC and based on the response we need to make the call. How i can achieve this just by clicking the phone number on salesforce?

I went to through some links but i am not getting clear idea on the implementation.

https://blog.bessereau.eu/assets/pdfs/api_cti.pdf https://ringcentral-web-widget-demos.readthedocs.io/en/latest/salesforce_lightning/tutorial/

Please help me on achieving this fucntionality. I am not even sure whether it is possible.

1 Answer 1

0

This is possible by handling the event onClickToDial() for lightning experience.

If you have a HTML page then you can use a event listener when a phone number is clicked as shown below and you will invoke the salesforce apex method (if in vf context) or invoke external service as needed

<html>
 <head>
  <script type="text/javascript" src="https://domain:port/support/api/48.0/lightning/opencti_min.js"></script>
  <script type="text/javascript">
    var listener = function(payload) {
    console.log('Clicked phone number: ' + payload.number);
    // Perform a third party webservice callout
  };

   // Register the listener.
   window.addEventListener('load', function() {
    sforce.opencti.onClickToDial({listener: listener});
  });
</script>
 </head>
</html>

You can also use the same method if you have a VF page approach.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .