다음을 통해 공유


Dynamics 365 채널 통합 프레임워크 2.0용 logAnalyticsEvent(JavaScript API 참조)

이 메서드를 호출하여 사용자 지정 이벤트에 대한 분석을 기록합니다.

Syntax

Microsoft.CIFramework.logAnalyticsEvent(data, eventName, correlationId).then(successCallback, errorCallback);

매개 변수

이름 유형 필수 Description
데이터 JSON 객체 Yes JSON 입력
이벤트 이름 String Yes 이벤트 이름
correlationId GUID 아니오 진단 원격 분석을 위해 모든 관련 API 호출을 함께 그룹화하는 데 사용됩니다.
success콜백 기능 아니오 promise가 성공적으로 반환될 때 호출하는 함수입니다.
error콜백 기능 아니오 promise를 반환하기 위한 요청이 실패할 때 호출하는 함수입니다.

JSON 매개 변수의 data 구조는 다음과 같습니다. 필드를 conversationIdproviderSessionId포함해야 합니다.

{
	"conversationId": "<Conversation identifier>",
	"providerSessionId": "<Channel Integration Framework Provider Id>",
	"clientSessionId":"<Client session identifier>",
	"participantId":"<Participant identifier>",
	"events": [
		{
			"kpiEventName": "<Name of the associated KPI event>",
			"kpiEventReason": "<Reason due to which the KPI event was created>",
			"eventTimestamp": "<Timestamp at which the event occurred>",
			"additionalData": "<Additional data related to the session>",
			"notificationResponseAction":"<Agent notification response action value>",
			"externalCorrelationId": "<External system correlation Id>",
			"customData": [
				{
					"attribute": "<name>",
					"value": "<value>"
				}
			]
		}
	]
}

반환 값

값을 문자열로 사용하는 약속

Example

//Success callback handler
const successCallback = (result) => {
  // result will indicate if the custom analytics event has been logged
  console.log(result);
};

//Failure callback handler
const errorCallback = (error) => {
  // handling failure
  console.error(error)
};

Microsoft.CIFramework.logAnalyticsEvent(data, eventName, correlationId).then(successCallback, errorCallback);

updateConversation 메서드
채널 분석