4Tracking UI Events in the CTI Application
Tracking UI Events in the CTI Application
This chapter describes how Oracle CRM On Demand allows for the tracking of UI events by the computer telephony integration (CTI) application.
The chapter contains the following topics:
HTML Custom Attributes
The CTI application is responsible for collecting particular UI event information from UI controls in the Oracle CRM On Demand browser window, and performing the associated CTI action. Some examples of UI events and actions are as follows:
Clicking the Listen to Vmail button plays back the voicemail to the user through the CTI application.
Clicking the Origin phone number dials that phone number.
Oracle CRM On Demand provides attributes in the HTML elements for its UI controls that indicate the type of CTI method to invoke when the control is clicked. Additional attributes of the element can also provide name-value pairs that provide relevant data.
HTML custom attributes are fully supported in HTML5 and valid custom attributes are prefixed with the data- characters.
(In versions of HTML before HTML5, custom attributes were an undocumented feature.)
Custom attributes are supported for the following browsers:
Internet Explorer Version 6.0 and later
Mozilla Firefox Version 2.0 and later
Google Chrome (all versions)
The following table shows the custom attributes that are available and the data that they provide to the CTI application.
Table HTML Custom Attributes in Oracle CRM On Demand
Attribute |
CTI Data |
Comments |
---|---|---|
data-cti-action |
CTI operation to perform |
Attribute values and the associated CTI actions are as follows:
|
data-cti-interactionId |
CTI interaction Id |
CTI assigned unique identifier. |
data-cti-phone-number |
CTI dialed number identification service (DNIS) number to dial |
Oracle CRM On Demand deformatted phone number (that is, purely digits) to dial |
data-cti-phone-countrycode |
CTI DNIS country code |
Oracle CRM On Demand phone number country code. |
data-cti-crmod-recordtype |
Oracle CRM On Demand record type |
Used for Click-to-Dial. CTI sends this back to Oracle CRM On Demand so that the activity is associated with the correct record type. |
data-cti-crmod-recordid |
Oracle CRM On Demand record ID |
Used for Click-to-Dial. CTI sends this back to Oracle CRM On Demand so that the activity is associated with the correct record. |
UI Controls
This topic summarizes the Oracle CRM On Demand UI controls from which the CTI application can collect event information.
The following table shows on which detail pages in Oracle CRM On Demand the CTI UI buttons are located. Click-to-Dial links are available on all record type detail pages, lists, and child lists.
Table Detail Pages on which CTI UI Buttons Are Located
UI Button |
Call Detail |
Chat Detail |
Email Detail |
Vmail Detail |
---|---|---|---|---|
Listen to Vmail |
No |
No |
No |
Yes |
Listen to Vmail on Phone |
No |
No |
No |
Yes |
Reassign |
No |
No |
Yes |
Yes |
Open Email |
No |
No |
Yes |
No |
View Chat |
No |
Yes |
No |
No |
View Interaction History |
Yes |
Yes |
Yes |
Yes |
Save |
Yes |
Yes |
Yes |
Yes |
The following subtopics describe, for each UI control, the behavior triggered in the CTI application by the events associated with the UI controls. The CTI application is responsible for taking action on these events, for example, when the user initiates click-to-dial, or clicks a button. The HTML custom attributes for each UI control and an example of HTML are also shown.
The custom attributes (data-*)
are added to the UI controls' HTML elements dynamically, after the UI is loaded.
Click-to-Dial Links
Clicking a phone number link in a record in the Oracle CRM On Demand UI provides HTML custom attributes that enable a CTI client application to dial the phone number and create an activity associated with the record whose link is clicked.
The values for the data- attributes are stored in the HTML element's id attribute and dynamically added to the element after the page is initially loaded. The HTML custom attributes for Click-to-Dial links are:
data-cti-action="dial" or data-cti-action="promptToDial"
data-cti-phone-number="phone number digits"
data-cti-phone-countrycode="country code"
data-cti-crmod-recordtype="record type"
data-cti-crmod-recordid="record Id"
The Display Click-to-Dial Popup check box in the My Profile page in Oracle CRM On Demand determines the value for the data-cti-action attribute. If the check box is selected, the value is promptToDial
, specifying that the user is prompted with a Click-to-Dial popup before the phone number is dialed. If the check box is cleared, data-cti-action has the value dial.
The CTI application uses the information in the data- attributes and makes a CTIActivityInsert call to create an activity (with Type = Call, Subtype = Outbound Call) associated with the record. The following table shows how the HTML attributes for Click-to-Dial relate to CTIActivityInsert method parameters.
Table Mapping of data- Attributes to CTIActivityInsert Input Parameters
data- Attribute |
CTIActivityInsert Parameter |
Mapping |
---|---|---|
data-cti-phone-countrycode |
Destination |
Destination = data-cti-phone-countrycode + data-cti-phone-number (for example, 16505550199) |
data-cti-phone-number |
Destination |
Destination = data-cti-phone-countrycode + data-cti-phone-number (for example, 16505550199) |
data-cti-crmod-recordtype |
AssociatedRecordType |
AssociatedRecordType = data-cti-crmod-recordtype |
data-cti-crmod-recordid |
AssociatedRecordId |
AssociatedRecordId = data-cti-crmod-recordid |
If the data-cti-crmod-recordtype value does not correspond to one of the record types supported by the AssociatedRecordType parameter, the CTIActivityInsert method simply ignores the associated record specified, and continues creating the activity record. It is up to the CTI application to decide whether to display a screen pop, based on the screen pop information returned by the CTIActivityInsert method.
Oracle CRM On Demand UI displays the wrap-up associated with the interaction.
An example of HTML for a click-to-dial link is as follows:
<td class="fv fvu" style="padding-left:6px" id="A0.R0.Work Phone #"> <a class="nclk" id="CTIDialNumberId|true|6505550199|1|Contact|1-CVVZ0" href="javascript:void(0);" data-cti-action="promptToDial" data-cti-phone-number="6505550199" data-cti-phone-countrycode="1" data-cti-crmod-recordtype="Contact"data-cti-crmod-recordid="1-CVVZ0" 1(650)555-0199 </a></td>
Listen to Vmail Button
Clicking this button in the Oracle CRM On Demand UI plays back the interaction's voicemail message to the user.
The HTML custom attributes for the button are:
data-cti-action="openVmail"
data-cti-interactionId="interactionId"
An example of HTML for the button is as follows:
<td onmouseover="toggleNavButton(this);" onmouseout="toggleNavButton(this);" onkeypress="onButtonPress(this);"
tabindex="3" class="buttonTD" data-cti-action="openVmail" data-cti-interactionId="54065405406456450"
onclick="function () {return false;};" id="CODDetailVMForm25658904*3">
 Listen to Vmail </td>
Listen to Vmail on Phone Button
Clicking this button in the Oracle CRM On Demand UI plays back the interaction's voicemail message on the user's phone.
The HTML custom attributes for the button are:
data-cti-action="vmailOnPhone"
data-cti-interactionId="interactionId"
An example of HTML for the button is as follows:
<td onmouseover="toggleNavButton(this);" onmouseout="toggleNavButton(this);" onkeypress="onButtonPress(this);"
tabindex="3" class="buttonTD" data-cti-action="vmailOnPhone" data-cti-interactionId="54065405406456450"
onclick="function () {return false;};" id="CODDetailVMForm25658904*3">
 Listen to Vmail on Phone </td>
Reassign Button (Voicemail)
Clicking this button in the VMail Detail page in the Oracle CRM On Demand UI opens the voicemail reassign dialog in the CTI application.
The HTML custom attributes for the button are:
data-cti-action="reassignVmail"
data-cti-interactionId="interactionId"
An example of HTML for the button is as follows:
<td onmouseover="toggleNavButton(this);" onmouseout="toggleNavButton(this);" onkeypress="onButtonPress(this);"
onclick="function () {return false;};" tabindex="2" class="buttonTD" data-cti-action="reassignVmail" data-cti-interactionId="21646540540654064" id="CODDetailVMForm7715170*2">
 Reassign </td>
Open Email Button
Clicking this button in the Oracle CRM On Demand UI opens the email transcript associated with the interaction.
The HTML custom attributes for the button are:
data-cti-action="openEmail"
data-cti-interactionId="interactionId"
An example of HTML for the button is as follows:
<td onmouseover="toggleNavButton(this);" onmouseout="toggleNavButton(this);" onkeypress="onButtonPress(this);"
onclick="function () {return false;};" tabindex="2" class="buttonTD" data-cti-action="openEmail" data-cti-interactionId="21646540540654064" id="CODDetailEmailForm32883963*2">
 Open Email </td>
Reassign Button (Email)
Clicking this button in the Email Detail page in the Oracle CRM On Demand UI opens the email reassign dialog in the CTI application.
The HTML custom attributes for the button are:
data-cti-action="reassignEmail"
data-cti-interactionId="interactionId"
An example of HTML for the button is as follows:
<td onmouseover="toggleNavButton(this);" onmouseout="toggleNavButton(this);" onkeypress="onButtonPress(this);"
onclick="function () {return false;};" tabindex="2" class="buttonTD" data-cti-action="reassignEmail" data-cti-interactionId="21646540540654064" id="CODDetailEMForm7715170*2">
 Reassign </td>
View Chat Button
Clicking this button in the Oracle CRM On Demand UI opens the chat transcript associated with the interaction.
The HTML custom attributes for the button are:
data-cti-action="openChat"
data-cti-interactionId="interactionId"
An example of HTML for the button is as follows:
<td onmouseover="toggleNavButton(this);" onmouseout="toggleNavButton(this);"
onkeypress="onButtonPress(this);" onclick="function () {return false;};" tabindex="2" class="buttonTD" data-cti-action="openChat" data-cti-interactionId="21646540540654064" id="CODDetailChatForm32883963*2">
 View Chat </td>
View Interaction History Button
Clicking this button in the Oracle CRM On Demand UI opens the interaction history dialog in the CTI application.
The HTML custom attributes for the button are:
data-cti-action="openHistory"
data-cti-interactionId="interactionId"
An example of HTML for the button is as follows:
<td onmouseover="toggleNavButton(this);" onmouseout="toggleNavButton(this);"
onkeypress="onButtonPress(this);" onclick="function () {return false;};" tabindex="2" class="buttonTD" data-cti-action="openHistory" data-cti-interactionId="21646540540654064" id="CODDetailChatForm32883963*2">
 View Interaction History </td>
Save Button on Wrap Up Form
Clicking this button in the Oracle CRM On Demand UI ends the wrap-up for an interaction in the CTI application.
The HTML custom attributes for the button are:
data-cti-action="endWrapUp"
data-cti-interactionId="interactionId"
An example of HTML for the button is as follows:
<td onmouseover="toggleNavButton(this);" onmouseout="toggleNavButton(this);" onkeypress="onButtonPress(this);"
onclick="function () {return false;};" tabindex="2" class="buttonTD" data-cti-action="endWrapUp" data-cti-interactionId="21646540540654064" id="CTIWrapUp_Save">
 Save </td>