Partager via


Understand Lync 2010 Contextual Conversations

Use contextual conversation with Microsoft Lync 2010 SDK to increase productivity by capturing the message sender’s context or setting up the receiver’s context, or both.

  • Contextual conversation improves productivity by reducing interruptions to the recipient’s workflow.

  • Contextual conversation improves productivity by reducing the time that is 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 Conversation Window Extension

Use Microsoft Lync 2010 Conversation Window Extension to display a business application that relates to the call. This application might display information about the caller, or it could 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 Register Contextual Conversation Packages in Lync 2010.

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 Lync 2010 Conversation Window Extension.

  • Add rich or simple application context. Rich context is automatically starting 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 with Lync 2010 SDK. Simple context is sending a URL side that is displayed in the conversation window. It does not require package registration and positions the security responsibility on the user to determine whether 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 (Lync 2010 SDK).

  • 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 easy to complex, to add contextual conversation features to business calls.

  • Use Microsoft Lync Controls to add contextual conversation support to an application by using drag-and-drop XAML controls and code-behind. For more information see Lync 2010 Controls.

  • Use Microsoft Lync 2010 API to add contextual conversation to an application that uses .NET Framework code. For more information see Lync 2010 API Concepts.

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: Start a Contextual Conversation in an IM Call.

<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 with Lync 2010 SDK.

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 (Lync 2010 SDK).

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 Register Contextual Conversation Packages in Lync 2010. The application ID in the message is used to launch a package as follows:

  • Package provides a start link that specifies a file path or a URL.

  • Package opens an application in the Lync Conversation Window Extension.

Rich context provides an easier way for an application to register for events with Lync 2010. For example, by 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 about trust, see Establish Trust on Contextual Conversation Clients in Lync 2010.

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. For more information about default applications, see Understand the Role of the Default Package in Lync 2010.

  • 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 starts and displays 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 that the application starts.

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 (Lync 2010 SDK).

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 (Lync 2010 SDK).

See Also

Other Resources

Lync Extensibility API Contextual Conversations (Lync 2010 SDK)