startCommEvent Method

The toolbar makes this mandatory method call when an agent accepts a new communication that was triggered by the newCommEvent() call.

This method invokes the Identify Contact flow, then triggers the Customer Validation flow, and then runs the screen pop which the following explains:

  1. The method first triggers the Customer Validation flow.

    This flow queries the communication data to determine if a contact has already been identified. If not, the Contact Search window is displayed allowing the agent to search for or create a contact. Once found, the contact information is returned to the toolbar. Toolbars can bypass this flow by identifying the contact prior to the startCommEvent call or by passing the SVCMCA_BYPASS_IDENTIFY_CONTACT. Toolbars can then use the getCustomerData() method to manually request contact identification.

  2. The method then triggers the Customer Verification flow, an optional flow that opens the customer verification page. If the agent doesn't verify the caller, no screen pop is performed. Customer verification can be bypassed by passing in the SVCMCA_BYPASS_CUSTOMER_VERIFICATION token in the call data.

  3. Finally, the method runs a screen pop using your predefined rules. If you want the toolbar to prevent the screen pop, you can add the SVCMCA_BYPASS_AUTO_SCREENPOP token into the call data, and use the invokeScreenPop() method to manually trigger the pop.

Note: A callback passed with the startCommEvent method can be invoked multiple times if the Identify Contact and Customer Verification flows triggered. The outData information from the response can contain updated customer information.

Here's the method details:

Parameter

Description

channel

The name of the channel for which the method is called. For more information on what channels are available, see Channel Type Data.

appClassification

The name of the application classification defined for the current toolbar. If this parameter is passed as null, it's assumed that there is no application classification. For a list of preconfigured values, see Application Classification Code.

eventId

The toolbar generated media event identifier. The same parameter value must be used for all method invocations for a communication. This parameter is stored with internal interaction record.

inData

An object containing information about incoming events for customer identifiable data, as well as attributes containing the names of system or user-defined defined tokens.

callback

Returns results to the caller toolbar.

channelType

The type of channel for which the method is being called. Note that if, for example, the channel is PHONE but the channelType isn't provided, the default value is set to ORA_SVC_PHONE. For more information, see Channel Type Data.

Here's the member attributes of the response object. The object has no return value.

Member Attribute

Description

result

The server side running status. Result values are success or error.

outData

Represents an object containing possible identified data from Fusion Service for the contact or for the organization. This attribute contains the names of system tokens.

error

Contains the error message if the result value is an error. If not, then the value is undefined. For more information about error message codes, see Error Messages.

<html>
<head>
<script type="text/javascript" src="http://domain:port/ora_support/js/mcaInteractionV1.js"> 
</script>
<script type="text/javascript">
function startCommEvent() {
      var inData = {};
      inData.SVCMCA_ANI = '5551234';
      inData.SVCMCA_CONTACT_ID = '1234567890';
      inData.SVCMCA_CONTACT_NAME = 'John Smith';
      inData.createSr = 'yes';
      svcMca.tlb.api.startCommEvent('PHONE', 'ORA_SERVICE', '12345-1234-67890', inData, function (response) {
        if (response.result == 'success') {
          console.log('Created service request: '+response.SVCMCA_SR_NUMBER);
          alert('Success! Results available in log.');
        } else {
          alert('Operation finished with error: ' + response.error);
        }
      },'ORA_SVC_PHONE');
    }</script>
</head>
<body>
<input type="button" value="Call started" onclick="startCommEvent()"/>
</body>
</html>