Integrate Microsoft Dynamics CRM 2015 with Parature

 

Applies To: Dynamics CRM 2015

Improve the productivity of your service agents by helping them quickly find and provide accurate information to the customers from within Microsoft Dynamics CRM by enabling integration with Parature knowledge management. Parature, from Microsoft is a cloud-based customer service solution that provides quick access to consistent and organized information through knowledge management, intelligent self-service, and multi-channel interactions. For more information about Parature, see About Parature.

Note

For Microsoft Dynamics CRM Online organizations, this feature is available only if your organization has updated to Dynamics CRM Online 2015 Update 1. This feature is not available for Dynamics CRM (on-premises).

In This Topic

Enable integration with Parature knowledge management

Create and manage knowledge base record metadata

Associate a knowledge base record with an entity instance

Enable integration with Parature knowledge management

You can enable integration with Parature knowledge management for your CRM instance using the web client; this cannot be done through SDK. More information: TechNet: Connect Microsoft Dynamics CRM to Parature knowledge base

After enabling the integration with Parature knowledge management, developers can enable or detect Parature knowledge management integration for an entity in CRM by using the IsKnowledgeManagementEnabled attribute. You can enable Parature integration for only those entities that can be in a many-to-many entity relationship, which can be determined using the CanBeInManyToMany attribute for the entity.

When you enable Parature integration for an entity, a many-to-many relationship is automatically created between the entity and the KnowledgeBaseRecord entity with the following name: KnowledgeBaseRecord_<Entity_Name>. For example, if you enable Parature integration for the Account entity, the name of the many-to-many relationship will be KnowledgeBaseRecord_Account.

By default, knowledge management integration is enabled for the Incident entity. The following sample code shows how you can detect and enable knowledge management integration for an entity:


RetrieveEntityRequest entityRequest = new RetrieveEntityRequest
{
    EntityFilters = EntityFilters.All,
    LogicalName = Incident.EntityLogicalName,

    // Retrieve only the currently published changes, ignoring the changes 
    // that have not been published.
    RetrieveAsIfPublished = false
};
RetrieveEntityResponse entityResponse = (RetrieveEntityResponse)_serviceProxy.Execute(entityRequest);

if (entityResponse.EntityMetadata.IsKnowledgeManagementEnabled == true)
{
    Console.WriteLine("Verified that knowledge management is enabled for Incident entity.\n");
    return;
}
else
{
    // Enable knolwledge management for the Incident entity.
    Console.WriteLine("Knowledge management is not enabled for the Incident entity.");
    entityResponse.EntityMetadata.IsKnowledgeManagementEnabled = true;

    // Create an update request.                    
    UpdateEntityRequest updateRequest = new UpdateEntityRequest
    {
        Entity = entityResponse.EntityMetadata
    };
    _serviceProxy.Execute(updateRequest);

    // Publish the entity.
    // All customizations must be published before they can be used.
    PublishAllXmlRequest enableRequest = new PublishAllXmlRequest();
    _serviceProxy.Execute(enableRequest);
    Console.WriteLine("Enabled Knowledge management for the Incident entity.");
}

For the full sample code, see Sample: Create and associate knowledge base record to incident.

When you enable Parature knowledge management for your CRM instance, you can add a Knowledge Base Search control to the forms of entities that are enabled for knowledge management integration. You can use the Knowledge Base Search control to show automatic suggestions in search results, define filters for search, and specify the contextual actions that can be done on a knowledge base article. More information: TechNet: Add the Knowledge Base Search control to Microsoft Dynamics CRM forms.

The Knowledge Base Search control provides programmability support to automate or enhance the user’s experience when using this control. More information: Parature knowledge base search control (client-side reference)

Create and manage knowledge base record metadata

You can create and manage Parature knowledge base record metadata using the KnowledgeBaseRecord entity. Some of the information that this entity stores is shown in the following table.

Attribute

Description

KnowledgeBaseRecord.Title

Title of the knowledge base record.

KnowledgeBaseRecord.UniqueID

Unique ID of the linked Parature knowledge based record.

KnowledgeBaseRecord.PrivateUrl

Internal Parature service desk URL of the knowledge base record

KnowledgeBaseRecord.PublicUrl

Public Parature portal URL of the knowledge base record

The following sample code demonstrates how you can create a knowledge base record instance:


// Create a knowledge base record instance        
KnowledgeBaseRecord kbRecord = new KnowledgeBaseRecord
{
    // These are sample values. Replace them with
    // appropriate values as per your integrated 
    // Parature  instance.
    PrivateUrl = "http://www.demo.parature.com/internal",
    PublicUrl = "http://www.demo.parature.com",
    Title = "How to track shipping?",
    UniqueId = "8000/8467/Article/23782"
};
_kbRecordId = _serviceProxy.Create(kbRecord);
Console.WriteLine("Created knowledge base record with ID: '{0}'.\n", _kbRecordId.ToString());

For the full sample code, see Sample: Create and associate knowledge base record to incident.

Associate a knowledge base record with an entity instance

You can programmatically associate a KnowledgeBaseRecord instance with an entity instance using the many-to-many relationship that is automatically created when you enabled Parature integration for the entity. When you associate a KnowledgeBaseRecord instance with an entity instance, a record for the relationship is created in an intersect entity called: **<Entity_Name>KnowledgeBaseRecord. For example, when you associate KnowledgeBaseRecord instance with an Account instance for the first time, an intersect entity called AccountKnowledgeBaseRecord will be created, and a record with the association mapping will be created in this intersect entity.

The following sample code demonstrates how to associate a KnowledgeBaseRecord instance with an Incident instance:


// Associate the knowledge base record with an incident record

// Step 1: Create a collection of knowledge base record that will be 
// associated to the incident. In this case, we have only a single
// knowledge base record to be associated.
EntityReferenceCollection relatedEntities = new EntityReferenceCollection();
relatedEntities.Add(new EntityReference(KnowledgeBaseRecord.EntityLogicalName, _kbRecordId));

// Step 2: Create an object that defines the relationship between knowledge base record and incident.
// Use the many-to-many relationship name (KnowledgeBaseRecord_Incident) between knowledge base
// record and incident.
Relationship relationship = new Relationship("KnowledgeBaseRecord_Incident");

// Step 3: Associate the knowledge base record with the incident record.
_serviceProxy.Associate(Incident.EntityLogicalName, _incidentId, relationship,
    relatedEntities);

For the full sample code, including how to disassociate a KnowledgeBaseRecord instance from an Incident instance, see Sample: Create and associate knowledge base record to incident.

The data stored in the KnowledgeBaseRecord and the intersect (in this case IncidentKnowledgeBaseRecord) entities can be used with tools like Power BI to generate reports about the impact of Parature knowledge base in servicing the customers.

See Also

KnowledgeBaseRecord entity messages and methods
Sample: Create and associate knowledge base record to incident
TechNet: Connect Microsoft Dynamics CRM to Parature knowledge base
Parature knowledge base search control (client-side reference)
TechNet: Add the Knowledge Base Search control to Microsoft Dynamics CRM forms
Incident (case) entities

© 2017 Microsoft. All rights reserved. Copyright