分享方式:


在 Dynamics 365 中使用 Parature 知識

 

發佈日期: 2017年1月

適用對象: Dynamics 365 (online)、Dynamics 365 (on-premises)、Dynamics CRM 2016、Dynamics CRM Online

Parature,來自 Microsoft 是雲端客戶服務解決方案,透過知識管理、智慧型自助服務和多管道互動,提供一致和組織資訊的快速存取。其他資訊:關於 Parature

在 Microsoft Dynamics 365 中使用 Parature 知識,您可協助服務專員快速找到正確資訊並提供給客戶,藉以提高他們的生產力。

本主題內容

在 Dynamics 365 中整合 Parature 知識

建立並管理知識庫記錄中繼資料

關聯知識庫記錄與實體執行個體

在 Dynamics 365 中整合 Parature 知識

如果您使用 Dynamics 365 (線上),可以在設定知識庫管理時選擇是否使用原生 Dynamics 365 知識或 Parature 知識做為知識來源。 知識庫管理只可以使用網頁用戶端設定,無法透過 SDK 執行。其他資訊:說明及訓練:設定 CRM 中的知識管理

備註

您只可以在 Dynamics 365 (線上) 執行個體中整合 Parature 知識,在內部部署 Dynamics 365 無法使用。

設定知識庫管理使用 Parature 之後,開發人員便可以使用 IsKnowledgeManagementEnabled 屬性,在 Dynamics 365 啟用或偵測實體的知識管理整合。 您只可以針對可在多對多實體關聯的實體 (可使用實體的 CanBeInManyToMany 屬性決定) 啟用 Parature 知識管理。

根據預設,Incident 實體會啟用知識管理整合。 下列範例程式碼顯示如何偵測及啟用實體的知識管理整合。


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.");
}

如需完整的範例程式碼,請參閱範例:建立並關聯知識庫記錄與事件

當您啟用 Dynamics 365 (線上) 執行個體的 Parature 知識管理,可以將知識庫搜尋控制項新增至已啟用知識管理整合之實體的表單。 可以使用此控制項,在搜尋結果中自動顯示建議、定義搜尋篩選並指定在知識庫文章可完成的關聯式動作。其他資訊:TechNet:將知識庫搜尋控制項新增至 Microsoft Dynamics CRM 表單

知識庫搜尋控制項提供程式設計支援,以自動化或增強使用者使用此控制項的體驗。其他資訊:知識庫搜尋控制項 (用戶端參考)

建立並管理知識庫記錄中繼資料

使用 KnowledgeBaseRecord 實體,您可以建立和管理 Parature 知識庫記錄中繼資料。 在下表中會顯示此實體儲存的部分資訊。

屬性

描述

KnowledgeBaseRecord.Title

知識庫記錄的標題。

KnowledgeBaseRecord.UniqueID

連結的 Parature 知識庫記錄的唯一識別碼。

KnowledgeBaseRecord.PrivateUrl

知識庫記錄的內部 Parature 服務台 URL。

KnowledgeBaseRecord.PublicUrl

知識庫記錄的公用 Parature 入口網站 URL。

下列範例程式碼示範如何建立知識庫記錄執行個體。


// 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());

如需完整的範例程式碼,請參閱範例:建立並關聯知識庫記錄與事件

關聯知識庫記錄與實體執行個體

您可以透過程式設計方式,使用多對多關聯 (當您啟用實體的 Parature 整合時自動建立) 來關聯 KnowledgeBaseRecord 執行個體與實體執行個體。 當您關聯 KnowledgeBaseRecord 執行個體與實體執行個體時,在下列名稱的交集實體中建立此關聯的記錄:msdyn_<Entity_Name>_knowledgebaserecord。 例如,當您首次關聯 KnowledgeBaseRecord 執行個體與 Account 執行個體,會建立稱為 msdyn_account_knowledgebaserecord 的交集實體,並在交集實體中建立關聯對應的記錄。

下列範例程式碼示範如何關聯 KnowledgeBaseRecord 執行個體與 Incident 執行個體。


// 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);

如需完整範例程式碼,包括如何解除關聯 KnowledgeBaseRecord 執行個體與 Incident 執行個體,請參閱 範例:建立並關聯知識庫記錄與事件

KnowledgeBaseRecord 和交集實體 (在此情況下為 IncidentKnowledgeBaseRecord) 中的資料可透過工具 (如 Power BI) 產生關於 Parature 知識庫對客戶服務影響的報表。

另請參閱

KnowledgeBaseRecord 實體訊息和方法
在 Dynamics 365 中使用知識文章
範例:建立並關聯知識庫記錄與事件
TechNet:將 Microsoft Dynamics CRM 連線至 Parature 知識庫
知識庫搜尋控制項 (用戶端參考)
TechNet:將知識庫搜尋控制項新增至 Microsoft Dynamics CRM 表單
事件 (案例) 實體

Microsoft Dynamics 365

© 2017 Microsoft. 著作權所有,並保留一切權利。 著作權