참조 자료 문서 작업
적용 대상: Dynamics 365 Contact Center - 독립 실행형 및 Dynamics 365 Customer Service만 해당
새로운 참조 자료 환경을 사용하면 버전 관리 및 번역 지원과 함께 풍부한 참조 문서를 만들 수 있습니다. 새로운 참조 자료 환경에서는 KnowledgeArticle
엔터티를 사용하여 Dynamics 365 Customer Service에서 기본적으로 참조 자료를 저장하고 관리합니다.
노트
엔터티 KBArticle
, KBArticleTemplate
및 KBArticleComment
는 더 이상 사용되지 않습니다. 즉, 더 이상 이러한 엔터티를 사용하지 않아도 됩니다. Dynamics 365 Customer Service에서의 참조 자료 관리에는 최신 KnowledgeArticle
엔터티를 사용해야 합니다. 자세한 내용은 이 항목의 끝에서 더 이상 사용되지 않는 참조 자료 엔터티를 참조하십시오.
참조 문서 만들기
기술 자료 문서 레코드를 만들면 Dynamics 365 Customer Service는 내부적으로 레코드의 루트 문서를 만듭니다. 루트 문서는 사용자가 향후 만들 수 있는 모든 문서 버전 및 번역과 함께 사용자가 만든 기본 참조 자료 문서를 위한 컨테이너 역할을 합니다. 다음 다이어그램은 KnowledgeArticle
엔터티에 대한 엔터티 모델을 설명합니다.
참조 자료 문서 레코드를 만들면 Draft
상태로 만들어집니다. 새로운 KnowledgeArticle
엔터티를 사용하면 내용을 지정하고 HTML 형식으로 서식을 지정하여 문서를 만들 수 있습니다.
KnowledgeArticle
에 고유한 값을 지정할 수 있습니다.
ArticlePublicNumber
특성의 자체 값을 지정할 수 있습니다. 그렇지 않으면 이 값은 웹 클라이언트의 Dynamics 365 Customer Service 설정 영역에 지정된 형식을 기반으로 자동으로 생성됩니다.
KnowledgeArticle
.
ArticlePublicNumber
특성은 고객, 파트너 및 기타 외부 사용자에게 노출된 ID를 저장하여 참조 자료 문서를 참조하고 조회하며 참조 자료 문서 버전 및 번역과 동일하게 유지됩니다.
다음 샘플 코드는 참조 자료 문서 레코드를 만드는 방법을 보여 줍니다.
KnowledgeArticle newKnowledgeArticle = new KnowledgeArticle
{
Title = "Sample Knowledge Article",
Content = "<p>This is the article content.</p>"
};
knowledgeArticleId = _serviceProxy.Create(newKnowledgeArticle);
Console.WriteLine("Created {0}", newKnowledgeArticle.Title);
참조 자료 문서의 주 버전 및 부 버전 만들기
참조 자료 문서 레코드를 생성할 때 대버전은 자동으로 1, 소버전은 0으로 설정됩니다.
CreateKnowledgeArticleVersion
메시지 (CreateKnowledgeArticleVersion Action or CreateKnowledgeArticleVersionRequest)를 사용하여 참조 자료 문서의 대 또는 소 버전을 만듭니다. 요청 메시지에서 IsMajor
를 true
로 설정하여 주 버전을 만들고 false
로 설정하여 부 버전을 만듭니다. 만들어지는 새로운 버전 레코드는 다음을 사용합니다.
KnowledgeArticle
.RootArticleId
루트 참조 자료 문서 레코드와 연결을 유지하는 특성.KnowledgeArticle
.PreviousArticleContentId
레코드의 이전 버전을 가리키는 특성.
다음 샘플 코드는 CreateKnowledgeArticleVersionRequest를 사용하여 참조 자료 문서 레코드의 주 버전을 만드는 방법을 보여줍니다.
CreateKnowledgeArticleVersionRequest versionRequest = new CreateKnowledgeArticleVersionRequest
{
Source = new EntityReference(KnowledgeArticle.EntityLogicalName, knowledgeArticleId),
IsMajor = true
};
CreateKnowledgeArticleVersionResponse versionResponse = (CreateKnowledgeArticleVersionResponse)_serviceProxy.Execute(versionRequest);
참조 자료 문서 번역 만들기
CreateKnowledgeArticleTranslation Action(웹 API) 또는 CreateKnowledgeArticleTranslationRequest(조직 서비스)를 사용하여 참조 자료 문서 레코드를 위한 번역을 만듭니다. 150개 이상의 언어로 참조 자료 문서를 번역할 수 있으며 이러한 지원되는 언어에 대한 정보는 새로운 LanguageLocale
엔터티에서 사용할 수 있습니다.
자세한 정보: LanguageLocale 테이블.
CreateKnowledgeArticleTranslation Action(웹 API) 또는 CreateKnowledgeArticleTranslationRequest(조직 서비스)를 사용하여 소스 레코드에서 새 레코드로 복사한 제목, 콘텐츠, 설명 및 키워드가 있는 새로운 참조 자료 문서 레코드를 만들고 새로운 레코드의 언어를 요청에 지정된 언어로 설정합니다. 또한 새 레코드를 주 버전 또는 부 버전으로 할 것인지 여부를 지정해야 합니다. 새 레코드는 KnowledgeArticle
을 사용합니다.
ParentArticleContentId
기본 참조 문서 레코드와의 연결을 유지하기 위한 속성 특성.
이 메시지를 실행하고 응답을 받은 후 응답 개체에서 참조 자료 문서 레코드를 검색한 다음 제목, 컨텐츠, 설명 및 키워드를 업데이트하여 번역된 컨텐츠를 추가합니다.
다음 샘플 코드는 CreateKnowledgeArticleTranslationRequest를 사용하여 참조 자료 문서 번역을 만드는 방법을 보여줍니다.
CreateKnowledgeArticleTranslationRequest translationRequest = new CreateKnowledgeArticleTranslationRequest
{
Source = new EntityReference(KnowledgeArticle.EntityLogicalName, knowledgeArticleId),
Language = new EntityReference(LanguageLocale.EntityLogicalName, languageLocaleId), //languageLocaleId = GUID of the Primary Key of LanguageLocale record
IsMajor = true // Creating a major version
};
CreateKnowledgeArticleTranslationResponse translationResponse = (CreateKnowledgeArticleTranslationResponse)_serviceProxy.Execute(translationRequest);
// Retrieve the new knowledge article record
KnowledgeArticle respObject = (KnowledgeArticle)_serviceProxy.Retrieve(KnowledgeArticle.EntityLogicalName,
translationResponse.CreateKnowledgeArticleTranslation.Id, new ColumnSet(true));
노트
LanguageLocale
엔터티의 각 언어 레코드를 위한 기본 키(LanguageLocaleId
)의 GUID 값은 모든 Dynamics 365 Customer Service 조직에 걸쳐 똑같습니다.
참조 자료 문서 수명 주기: 참조 자료 문서 상태 변경
수명 주기 동안 참조 자료 문서는 다음 상태일 수 있습니다.
0: 초안(참조 자료 문서를 만든 후)
1: 승인됨(참조 자료 문서 승인)
2: 예약됨(참조 자료 문서가 게시 예약된 후)
3: 게시됨(참조 자료 문서를 게시한 후)
4: 만료됨(게시하는 동안 지정된 만료 날짜에 따라 참조 자료 문서가 만료된 후)
5: 보관됨(참조 자료 문서가 보관된 후)
6: 삭제됨(참조 자료 문서가 삭제된 후)
문서 상태를 변경하려면 참조 자료 문서 레코드의 Update
메시지를 사용하여 KnowledgeArticle.StateCode
특성을 업데이트합니다. 초기 바인딩 유형의 경우 KnowledgeArticleState
열거형을 사용하여 가능한 상태를 설정합니다. 추가 정보: 업데이트를 사용하여 특수화된 작업 수행.
다음 샘플 코드는 참조 자료 문서 레코드를 게시하는 방법을 보여 줍니다.
// Retrieve the knowledge article record
KnowledgeArticle myKnowledgeArticle = (KnowledgeArticle)_serviceProxy.Retrieve(
KnowledgeArticle.EntityLogicalName, knowledgeArticleId, new ColumnSet("statecode"));
// Update the knowledge article record
myKnowledgeArticle.StateCode = KnowledgeArticleState.Published;
UpdateRequest updateKnowledgeArticle = new UpdateRequest
{
Target = myKnowledgeArticle
};
_serviceProxy.Execute(updateKnowledgeArticle);
참조 자료 문서 레코드를 Dynamics 365 Customer Service 엔터티 인스턴스와 연결
웹 클라이언트를 사용하여 Dynamics 365 Customer Service에서 엔터티에 대한 내장된 참조 자료 검색을 활성화하면 다대다 관계인 msdyn_
<Entity_Name>_knowledgearticle
이 자동으로 만들어집니다. 이 관계를 사용하여 Dynamics 365 Customer Service 엔터티 인스턴스와 KnowledgeArticle
인스턴스를 프로그래밍 방식으로 연결할 수 있습니다.
KnowledgeArticle
인스턴스를 엔터티 인스턴스와 연결하면 관계 레코드가 msdyn_
<Entity_Name>_knowledgearticle
이라는 교차 엔터티가 만들어집니다. 예를 들어, 처음으로 KnowledgeArticle
인스턴스를 Account
인스턴스와 연결하면 msdyn_account_knowledgearticle
라고 하는 교차 엔터티가 만들어지고 연결 매핑이 있는 레코드가 이 교차 엔터티에 만들어집니다. 기본적으로 Incident
(서비스 케이스) 엔터티가 내장된 참조 자료 검색에 대해 활성화되고 KnowledgeArticle
레코드를 Incident
레코드에 연결하면 KnowledgeArticleIncident
교차 엔터티에 연결 레코드가 만들어집니다.
다음 샘플 코드는 KnowledgeArticle
인스턴스를 Account
인스턴스와 연결하는 방법을 보여줍니다.
// Associate the knowledge article record with an account record
// Step 1: Create a collection of knowledge article records that will be
// associated to the account. In this case, we have only a single
// knowledge article record to be associated.
EntityReferenceCollection relatedEntities = new EntityReferenceCollection();
relatedEntities.Add(new EntityReference(KnowledgeArticle.EntityLogicalName, knowledgeArticleId));
// Step 2: Create an object that defines the relationship between knowledge article record and account record.
// Use the many-to-many relationship name (msdyn_account_knowledgearticle) between knowledge article
// record and account record.
Relationship newRelationship = new Relationship("msdyn_account_knowledgearticle");
// Step 3: Associate the knowledge article record with the account record.
_serviceProxy.Associate(Account.EntityLogicalName, accountId, newRelationship, relatedEntities);
참조 자료 문서 보기 횟수 증가
IncrementKnowledgeArticleViewCountRequest 메시지를 사용하여 KnowledgeArticleViews
엔터티에서 지정된 날짜에 참조 자료 문서 레코드의 보기 개수를 증가시킵니다. 지정된 날짜의 참조 문서에 대한 레코드가 없으면 레코드를 생성한 다음 KnowledgeArticleViews
에 지정된 조회수 값을 설정합니다.
KnowledgeArticleView
특성. 지정된 날짜의 참조 문서에 대한 레코드가 이미 존재하는 경우 KnowledgeArticleViews
의 조회수만 증가합니다.
KnowledgeArticleView
기존 레코드의 특성.
전체 텍스트 검색을 사용하여 참조 자료 문서 검색
해당 버전과 번역을 포함하여 Dynamics 365 Customer Service의 참조 자료 문서는 전체 텍스트 인덱싱되어 있고 SQL Server 전체 텍스트 검색을 지원합니다. 전체 텍스트 검색에 대한 자세한 내용은 SQL Server: 전체 텍스트 검색을 참조하십시오.
FullTextSearchKnowledgeArticleRequest 메시지를 사용하여 응용 프로그램에서 참조 자료 문서를 검색하여 원하는 정보를 찾습니다. FullTextSearchKnowledgeArticleRequest 메시지를 사용하면 어형 변화의 어간 일치를 사용하고(검색 텍스트를 대체할 시제 또는 어형 변화 허용) 쿼리 기준을 지정(필터링, 순서 지정, 정렬 및 페이징을 지정하기 위해 FetchXML 또는 QueryExpression 사용)하여 지정된 텍스트가 있는 참조 자료 문서를 찾을 수 있습니다. 또한 검색 결과에서 동일한 문서의 여러 버전을 제거하고 텍스트를 검색하는 동안 참조 자료 문서 상태를 필터링할 수도 있습니다.
더 이상 사용되지 않는 참조 자료 엔터티
다음 레거시 엔터티는 사용되지 않습니다. 추가 정보: 사용되지 않는 참조 자료 엔터티
레거시 참조 자료 엔터티는 2020년 12월 1일부터 액세스할 수 없습니다. 참조 문서 엔터티로 이동하는 것을 강력히 권고합니다. 통합 인터페이스에서 참조 자료 문서 작성에 대한 자세한 내용은 참조 자료 문서 작성 및 관리를 참조하십시오.
마이그레이션에 도움이 필요하면 다음을 사용하십시오.
- 시나리오에 따라 SDK, WebAPI 또는 Microsoft Power Automate를 사용하십시오.
- 오픈 소스 마이그레이션 도구를 MIT 라이선스와 함께 사용합니다.
중요
- 오픈 소스 마이그레이션 도구는 Microsoft에서 지원하지 않으므로 시나리오에 맞게 수정해야 할 수도 있습니다.
- 프로덕션 환경에서 사용하기 전에 항상 테스트 환경을 실행하십시오.
- 도구를 사용하기 전에 라이선스 및 추가 정보를 확인하십시오.