Skip to main content
Tero Nurmi a posé une question dans #Service Cloud Voice

Hi, 

 

Use-case: In a 3rd party VoIP softphone there is an incoming phone call from customer. The phone call is already visible in Salesforce Omni Channel widget, as a CALL_STARTED event was published. Customer rep can successfully accept the call by pressing "Accept" in Omni Channel widget/sidebar. 

 

However, in our case the rep can also accept the call directly in our softphone. In that case we need to programmatically tell Salesforce that "this call is now accepted". I'm having trouble finding the correct mechanism for this, in the Service Cloud Voice base connector (@salesforce/scv-connector-base). 

 

Any advice, please? 

 

I did find that this might be possible by using the Voice LWC Toolkit API, as it has "acceptCall" method available which sounds very tempting. But I'm trying to understand if this is really the only way. It seems to me that the Connector should support such a simple use-case. Currently we don't have the Voice LWC Toolkit in use at all, and I'm trying to avoid bloating our implementation. 

 

#Service Cloud Voice

7 réponses
  1. 12 oct., 08:04

    @Gabriel Fuoco

     no, I did not try the toolkit path (at least not yet). 

     

    Code below works in my tests to "auto-accept" call on Salesforce side . However, I would like to understand if this can have some strange consequences I'm not yet aware of. 

     

    // User accepts call in our softphone -> Programmatically accept on Salesforce side.const call = new PhoneCall({	callId: "ourVendorCallId",	state: Constants.CALL_STATE.CONNECTED,	callAttributes: new PhoneCallAttributes({		voiceCallId: "voiceCallId",		participantType: Constants.PARTICIPANT_TYPE.INITIAL_CALLER	}),	callInfo: new CallInfo({		// Unofficial workaround:		// Temporarily set isSoftphoneCall to false. With this, the work item is cleared from Omni Inbox.		isSoftphoneCall: false	})});publishEvent ({	eventType: Constants.VOICE_EVENT_TYPE.CALL_CONNECTED,	payload: new CallResult({ call })});
0/9000