Use contextual conversation with Microsoft Lync 2010 SDK to increase productivity by capturing the message sender's context, and/or setting up the receiver's context.
-
Contextual conversation improves productivity by reducing interruptions to the recipient's workflow.
-
Contextual conversation improves productivity by reducing the time required for call participants to join one unique data environment.
Application Scenarios
Adding context to the data carried by a call makes communication more efficient. The purpose of the context framework is to allow the receiver to quickly step into the same data environment inhabited by the caller.
Open Third Party Applications in the Extensibility Window
Use the extensibility window to display a business application that relates to the call. This application might display information about the caller, or it might allow users to enter information about the call.
Important |
---|
The contextual application must be installed and registered on each client computer where it will be used. For more information, see Registering Contextual Conversation Packages . |
Add Context to a Conversation You Are Joining
Use contextual conversation features to add information about the sender, the conversation, or for other uses by business applications, for example:
-
Launch an application when the conversation window is opened. For more information, see Launching Applications in the Lync Extensibility Window .
-
Add rich or simple application context. Rich context is automatically launching an application, or passing real-time data between business applications. For example, two CAD programs exchanging x, y, z coordinates for a 3D object. For more information, see Send and Update Context in an Existing Conversation . Simple context is sending a URL side that is displayed in the conversation window. It does not require package registration and places the security responsibility on the end user to decide if they want to click the link.
-
Share a URL - a sales manager can include a supplier's URL in an IM to a member of her sales team. For more information, see Walkthrough: Add Context to an Outbound Conversation .
-
Customize the message subject- Business Analyst, can customize the subject line that accompanies her audio or IM message. For more information, see Subject .
Transfer Calls with Context
Although not necessarily a contextual conversation feature, seamlessly transferring calls without losing context is important to correctly implement the contextual conversation experience. In a previous scenario, Marie opens a conversation with Ken using IM and then transfers the audio call to him.
Development Models
Use Lync SDK at two levels ranging from simple to complex, to add contextual conversation features to business calls.
-
Use Microsoft Lync Controls to add contextual conversation support to an application with drag and drop XAML controls and code-behind. For more information see the topics under Lync Controls .
-
Use Microsoft Lync 2010 API to add contextual conversation to an application with .NET Framework code. For more information see the topics under Lync 2010 API .
Use Contextual Conversation with Lync Controls
Lync 2010 API includes many XAML controls, each available in Microsoft Silverlight and Microsoft Windows Presentation Foundation (WPF) versions. You can add these controls to existing business applications and use either XAML or the code-behind page to add contextual conversation features. The following example adds the sender's context to an IM conversation. For more information, see Walkthrough: Launch a Contextual Conversation in an IM Call .
Copy Code | |
---|---|
<StackPanel> <StackPanel.Resources> <controls:ConversationContextualInfo x:Key="contextualInfo" ApplicationId="{}{21224942-AC24-4D0D-B0C7-6107D79448DF}" ApplicationData="your application data here" Subject="Try out this customized toast!" /> </StackPanel.Resources> <controls:StartInstantMessagingButton x:Name="startInstantMessaging" Source="sip:barbara@contoso.com" ContextualInformation="{StaticResource contextualInfo}" /> </StackPanel> |
Add Context to a Conversation with Lync API
Lync 2010 API includes a managed code API that you can use to add contextual conversation features to conversations with the Lync 2010 UI as an optional element. The following example adds an application ID and application data to a conversation. For more information, see Send and Update Context in an Existing Conversation .
Copy Code | |
---|---|
Dictionary<ContextType, object> context = new Dictionary<ContextType, object>(); context.Add(ContextType.ApplicationId, "{d0722164-f660-470f-a933-e4853f215b77}"); context.Add(ContextType.ApplicationData, "Some data string"); IAsyncResult res = conversation.BeginSendInitialContext(context, null, null); |
Add Simple Context or Rich Context
Developers can add simple context to conversations, or install packages to provide rich context.
Adding Simple Context
Developers can add simple context to a conversation by sending an untrusted URL with a message. The message recipient will see the text "A contextual link has been provided with this conversation. If the link below looks suspicious do not click on it." followed by the URL. For more information, see Walkthrough: Add Context to an Outbound Conversation .
Adding Rich Context
Developers can add rich context by sending an application ID in the message content. Using rich context requires application package installation on the sending and receiving computers. For more information, see Registering Contextual Conversation Packages . The application ID in the message is used to launch a package in the following manner:
-
Package provides a launch link that specifies a file path or a URL.
-
Package opens an application in the extensibility window.
Rich context provides an easier way for an application to register for events with Lync 2010. For example, using rich context, Microsoft Visual Studio development system can examine incoming conversations. When Visual Studio detects an appropriate conversation, it instructs Lync 2010 to dock the conversation window in the Visual Studio environment.
Tip |
---|
Rich context requires a registered package on the target computer. If the package is registered, it can be trusted. For more information on trust, see Establishing Trust on Contextual Conversation Clients . |
Use Install Registration and Run-Time Registration
Contextual conversation packages can be installed to a URL or file path. To simplify package management, install it to a URL, and then register the contextual application with Microsoft Lync 2010.
-
You can specify a default application that is used to provide a context when none is available. For example, when a sales manager gets a call, a CRM contextual application is specified and then started. The contextual application provides information about the caller. Fopr more information on default applications, see Understand the Role of the Default Package .
-
After registration is complete, you can provide rich context and applications. For example, when two oil field engineers consult about a field, the company's line-of-business application launches with various graphical displays providing geological data.
There are two ways to register a contextual application:
-
Install Registration.
-
Run-Time Registration.
The recommended practice is to perform install registration to install the contextual application, and then run-time registration every time the application launches.
Install Registration
Use Install Registration to manage and deploy contextual conversation experience by product installs. The alternative is Run-Time Registration. Use Install Registration to improve control of package setup. For more information see Walkthrough: Perform Install Registration for an Extensibility Application .
Run-Time Registration
Use Run-Time Registration for flexible package setup. Use the ApplicationRegistration class to perform Run-Time Registration. For more information see Walkthrough: Perform Run-Time Registration for an Extensibility Application .