Newer Version Available

This content describes an older version of this product. View Latest

fireOnCallBegin()

Fires an event that notifies a call has begun. Use to get information or send information between an interaction log and a custom console component. This method is only available in API version 31.0 or later.

Syntax

1sforce.console.cti.fireOnCallBegin( callObjectId:String, callType:String, callLabel:String, (optional)callback:Function )

Arguments

Name Type Description
callObjectId string The object ID of the call.
callType string String that specifies the call type, which must be internal, inbound or outbound.
callLabel string String that specifies a call as it appears in the Attach Call drop-down button. For example, Call Label — Inbound Call 12:52:31 PM.
callback function JavaScript method called upon completion of the method.

Sample Code–Visualforce

1<apex:page>
2    <A HREF="#" onClick="testFireOnCallBegin();return false">
3             Click here to start a call</A>
4
5    <apex:includeScript value="/support/console/31.0/integration.js"/>
6    <script type="text/javascript">
7
8        function testFireOnCallBegin() {
9            sforce.console.cti.fireOnCallBegin('call.794937' , 'outbound' , 'label 1');
10        }
11
12    </script>
13</apex:page>

Response

This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field:

Name Type Description
success boolean true if firing the event is successful, false otherwise.