Create a CTI Control
Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2013, Dynamics CRM 2015, Dynamics CRM 2016
To manage agent states and call states, computer telephony integration (CTI) scenarios require the following user interface (UI) controls:
Agent state management control: Displays the current state of the agent within a User Interface Integration (UII) desktop (such as Unified Service Desk. This control doesn’t need to be tied to the CTI system, but it allows you to map CTI agent states with the current agent state, which is the visual state of the agent desktop.
Call control: Provides buttons that the agent can use to make a call, answer a call, put a call on hold, transfer a call to another agent, or hang up.
Both of these controls are normal UII hosted controls that inherit from either the HostedControl or HostedWpfControl class. You can also choose to merge both the controls into a single UII hosted control. More information:Use UII hosted controls with Unified Service Desk
Interfaces for implementing a CTI Control
Use the following interfaces to implement the user interface of a CTI Control.
ICtiAgentStateControl
The ICtiAgentStateControl interface is a specialized interface for describing a hosted control that is used for processing and/or displaying agent state information. This interface contains the SetAgentState method that’s used to set the state of an agent.
IDesktopUserActionsConsumer
The IDesktopUserActionsConsumer interface is not specific to CTI, but it is typically used by the CTI Controls to provide access to desktop operations. It has two members:
DesktopLoadingComplete: Raised when the desktop has completed loading. This is raised in a separate thread from the main desktop UI thread.
SetDesktopUserActionsAccess: Used by the desktop loader to set a pointer to itself in the hosted control that implemented the ICtiEnabledControlConsumer interface. It is the pointer to the desktop interface (shell).
By implementing this interface, you get access to all user actions, as shown in the following example.
bool AppExistsInUI(string applicationName);
bool CloseDynamicApplication(string applicationName);
bool CloseSession();
bool CloseSession(Session sessionToClose);
bool CreateDynamicApplication(string applicationName);
WorkflowData GetCurrentWorkflowState();
bool SetFocusOnApplication(string applicationName);
string UserDefinedCommand(string command, string request);
ICtiEnabledControlConsumer
The ICtiEnabledControlConsumer interface describes a hosted control that will accept pointers to the CtiCallStateManager and the CtiAgentStateManager.
This interface has method definitions to perform following functions:
SetManagers: Called by UII when a control that implements this interface is initialized.
SessionCloseEvent: Called by UII when a session is closing.
The ICtiEnabledControlConsumer interface uses the IsManagersSet property to set or get whether the SetManagers method has been called successfully.
Configure the CTI Control hosted control in Unified Service Desk
Sign in to Microsoft Dynamics 365.
On the nav bar, choose Microsoft Dynamics 365 > Settings > Unified Service Desk.
On the Unified Service Desk page, click Hosted Controls.
On the Hosted Controls page, click New.
On the New Hosted Control page, specify the following values:
Field
Value
Name
Specify a name.
USD Component Type
CCA Hosted Application
Hosted Application
Hosted Control
Application is Global
Checked
Display Group
CtiPanel
Adapter
Use No Adapter
Assembly URI
This is the name of your assembly (.dll) file that you built in the previous step.
Assembly Type
This is the name of your assembly followed by a dot, and then the class name of your CTI Control. For example, if your assembly (dll) name is MyCtiControl, and the name of the class of your CTI project is CtiControl, type the following in this field: MyCtiControl.CtiControl.
Choose Save to create the hosted control.
See Also
Considerations for creating a CTI adapter for Unified Service Desk
Create a CTI Connector
Create a CTI Desktop Manager
UII computer telephony integration (CTI) framework
Unified Service Desk 2.0
© 2017 Microsoft. All rights reserved. Copyright