Newer Version Available

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

Integrate the Engagement Objects Into Your CTI System

Modify your CTI adapter so that when a customer service representative (CSR) accepts an incoming call using the softphone, an engagement interaction record for the call is created. Engagement Interaction is part of the Engagement data model, which has two other objects, Engagement Attendee and Engagement Topic. These objects store details such as the start and end date and time of an interaction, what an interaction is about, and attendee details.

Modifications to the CTI Adapter

We use the Open CTI demo adapter as an example to describe the changes that you’re required to make. To interact with the engagement objects, make similar modifications to your adapter using Engagement Connect APIs or the sObject API.

Note

The Engagement Connect APIs (REST or Apex) provide a way to create, get, and delete engagement attendee, engagement interaction, and engagement topic records.

Using the Connect APIs, you can perform all three operations on all three engagement objects in a single API call.

Note

Alternatively, use the sObject API to perform CRUD operations on the engagement objects.
The demo adapter triggers an Aura component code when an incoming call is accepted using the softphone. The callInitiatedPanel.cmp is displayed that contains the accept listener.
At the same time, an event is raised, which is captured by the accept method in the callInitiatedPanelController.js file.
The method brings up the Connected panel defined in the helper. The panel contains the SoftphoneContactSearchController Apex class, which is called from the callInitiatedPanelHelper.js file.
The SoftphoneContactSearchController Apex class contains the createEngagementInteraction method, which uses the connect API to create an engagement interaction record as shown in this example:
if you want to create engagement attendee and engagement topic records along with the engagement interaction record using the connect API, you can change the input to the createEngagementInteraction method. . This example shows how to create engagement attendee records using the Connect API:

Engagement attendee records for internal attendees of an engagement are automatically created after an engagement interaction record is created. If necessary, stop the automatic creation of engagement attendee records by turning off the Auto-Creation of Internal Attendee Record org preference.

When the call ends, another Aura component code is triggered.
The endCall listener invokes the endCall method in the connectedPanelController.js file.

If necessary, add methods to update engagement interaction, engagement attendee, and engagement topic records to the SoftphoneContactSearchController Apex class.

Alternatively, use the sObject API to perform CRUD operations on the engagement objects. This example shows how to create or edit engagement attendee or engagement topic records using the sObject API: