+ Start a Discussion

Need help with Call Center/Softphone customizations using Apex

Basically, I need to be able to associate inbound call attributes with Cases created for them. Having this association is a good source for reporting on call duration vs case subject.


I have tested when the SoftPhone call terminates, SalesForce creates a Task record with the OwnerId of the call taker and writes values to the CallDurationInSeconds, CallType & CallObject fields on the Task. No inbound phone number is written though.


I have created a VF page & extension that I setup the SoftPhone to pop. This way I can have full control over the call taker's workflow from contact lookup/creation to Case creation. All associated with the inbound number. My problem is: I cannot associate the CallDurationInSeconds to the case or Task that gets created for that matter due to the lack of phone number on the Task.


Does anyone know of a way I can accomplish this? Is there a way that I can access the call durations/inbound phone number using Apex via the CTI?



Try this.
String phoneNumber = ApexPages.currentPage().getParameters().get('ANI');

CTI sends the inbound phone number by default. We just need to receive it. Also you can create different fields in CTI and could pass those fields during call. You need to receive them in SFDC. Also in your call center you need to update the Call Information Field Labels if you create new/extra fields in CTI.

Let me know if you have any other question.


[Do mark this answer as solution if it works for you and give a kudos.]