-
Notifications
You must be signed in to change notification settings - Fork 96
What is the equivalent Lightning method sendCTIMessage() to make an outbound call? #37
Comments
You may use lightning message service, which will GA soon (currently it's a
developer preview).
With it, you can publish a message from the softphone and handle it in
lightning, and vice versa.
https://developer.salesforce.com/blogs/2019/10/lightning-message-service-developer-preview.html
…On Mon, Feb 17, 2020, 6:16 AM araveticharan ***@***.***> wrote:
Hi @dlouvton <https://github.com/dlouvton> , You may help with this. We
are using twilio flex as a vendor for our open CTI. In classic we have a
method sendCTIMessage() which talks to call center setup(twilio flex) and
making a call to the customer. However, this is not the case with
Lightning. Seems like we need special configuration in code in order to
make a programmatic outbound call.
I have posted this question in multiple places with no luck:
https://salesforce.stackexchange.com/questions/294758/what-is-the-equivalent-lightning-method-sendctimessage-to-make-an-outbound-cal
https://success.salesforce.com/answers?id=9063A000000q1yBQAQ
Any help is greatly appreciated.
Thank you!
Charan
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#37?email_source=notifications&email_token=ABSWICQY2DLR4OGBNGLJAEDRDKL3FA5CNFSM4KWSRA3KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IOBPJFA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABSWICVMZHNMWWN7352YJT3RDKL3FANCNFSM4KWSRA3A>
.
|
Thanks for the response. We just using Twilio Flex agent console as softphone in one of our Lightning app that uses Open CTI. So I don't think we will be having any control over the vendor's softphones which are in Salesforce. There should be something like sendCTIMessage() in Lightning as well to initiate the call and Salesforce will take care the rest. To test this in classic, I have created a simple VF page(below is the code) with a button which is calling sendCTIMessage(). So when I click that button, my Twilio Flex softphone console popup and will show that I am in call with XXXXXXXX and will show some call controls like hangup, transfer.
I truly appreciate your time regarding this matter. Thank you! |
Why don't you use clickToDial() and onClickToDial()? With clickToDial() you
can send a payload and with onClickToDial() process the payload.
…On Tue, Feb 18, 2020, 8:19 AM araveticharan ***@***.***> wrote:
Thanks for the response.
We just using Twilio Flex agent console as softphone in one of our
Lightning app that uses Open CTI. So I don't think we will be having any
control over the vendor's softphones which are in Salesforce.
There should be something like sendCTIMessage() in Lightning as well to
initiate the call and Salesforce will take care the rest.
To test this in classic, I have created a simple VF page(below is the
code) with a button which is calling sendCTIMessage(). So when I click that
button, my Twilio Flex softphone console popup and will show that I am in
call with XXXXXXXX and will show some call controls like hangup, transfer.
<apex:page standardController="Lead">
<script type="text/javascript">
function makeACall(){
console.log('sendCTIMessage: '+sendCTIMessage);
sendCTIMessage('/CLICK_TO_DIAL?DN=XXXXXXXXXXX&ID=00QXXXXXXXXXX&ENTITY_NAME=Lead&OBJECT_NAME=testing');
}
</script>
<input type="button" name="call" value="call" onClick="makeACall();"/>
</apex:page>
[image: Capture]
<https://user-images.githubusercontent.com/47491128/74753480-30e53880-523e-11ea-994a-cc7b84f30d6f.PNG>
I truly appreciate your your time regarding this matter.
Thank you!
Charan
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#37?email_source=notifications&email_token=ABSWICTJHBOGCZ2EBWWCRADRDQDAJA5CNFSM4KWSRA3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMCTNSY#issuecomment-587544267>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABSWICXCTWSBWBPDU2O66HTRDQDAJANCNFSM4KWSRA3A>
.
|
I never came across clickToDial() method. I know there are aura/LWC tags lightning:clickToDial/lightning-click-to-dial for user to click and give a call to the number. I am referring https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_intro.htm. I am pretty sure I am missing something but I understand we don't have sendCTIMessage() equivalent Lightning method. |
Hey Charan any Luck ? can you please share solution |
Hey, Actually, I found 2 solutions:
Note: We have to be careful about this, as Salesforce is not documented this event.
Publisher : Component: Controller: Subscriber: Add openCti library to your subscriber component/code
|
Hi @araveticharan, The difference is, I'm trying this for Twilio Programmable Chat (not Calls). Wondering if you can shed some light here. Thanks in advance 👍 |
Hey @warnakuw , So what is your question? |
@araveticharan I was interested to know more about your second option. It would greatly help if you could share how you modified the OOTB Twilio Flex component. And, if you were referring to a customised component (in your example), how did you customise it ? |
Hey, Apologies for the delayed response. I think I can help you with that. Ultimately, what you have to do is, you have to modify your salesforce Twilio flex console. Below are sequence of steps that will help you to do so. Updating Twilio Flex Salesforce Console react component: Subscriber(React) changes you have to make:
// Define LMS channel in React component //Use OopenCTI function subscribe in React Component //Take care of your chat stuff with your context data
Yes, you heard it correct, you are going to make use of Salesforce provided OpenCTI JS library in REACT plugin and install the same in Flex Console. Let me know if you need any other help. |
@araveticharan could you provide details on how to use opencti library features like clickToDial() features using react js |
Hi @dlouvton , You may help with this. We are using twilio flex as a vendor for our open CTI. In classic we have a method sendCTIMessage() which talks to call center setup(twilio flex) and making a call to the customer. However, this is not the case with Lightning. Seems like we need special arrangments in the code in order to make a programmatic outbound call.
I have posted this question in multiple places with no luck:
https://salesforce.stackexchange.com/questions/294758/what-is-the-equivalent-lightning-method-sendctimessage-to-make-an-outbound-cal
https://success.salesforce.com/answers?id=9063A000000q1yBQAQ
Any help is greatly appreciated.
Thank you!
Charan
The text was updated successfully, but these errors were encountered: