추가 응답 유형
Interact에서 Interact API의 postEvent 메소드를 사용하여 오퍼에 대한 "수락" 또는 "거부" 작업을 로그하는 이벤트를 트리거할 수 있습니다. postEvent 호출로 탐색, 고려, 커미트 또는 이행과 같은 추가 응답 유형을 레코딩하도록 시스템을 기능 보강할 수도 있습니다. 이 모든 응답 유형은 Campaign 시스템 테이블의 UA_UsrResponseType 테이블에 존재해야 합니다. postEvent 메소드에 특정 이벤트 매개변수를 사용하여 추가 응답 유형을 레코딩하고 학습에 수락을 포함해야 하는지 여부를 정의할 수 있습니다.
추가 응답 유형을 로그하려면 다음 이벤트 매개변수를 추가해야 합니다.
*
UACIResponseTypeCode — 응답 유형 코드를 나타내는 문자열입니다. 이 값은 UA_UsrResponseType 테이블의 올바른 항목이어야 합니다.
UA_UsrResponseType의 올바른 항목이려면 CountsAsResponse를 포함하여 테이블의 모든 열을 정의해야 합니다. CountsAsResponse의 유효한 값은 0, 1 또는 2입니다. 0은 응답 없음, 1은 응답, 2는 거부를 나타냅니다. 이 응답은 보고에 사용됩니다.
*
UACILogToLearning — 1 또는 0 값이 있는 숫자입니다. 1은 Interact가 학습에 대한 수락으로 이벤트를 로그해야 함을 나타냅니다. 0은 Interact가 학습에 대한 이벤트를 로그하면 안됨을 나타냅니다. 이 매개변수를 사용하여 학습에 영향을 주지 않고 여러 응답 유형을 로깅하는 몇 개의 postEvent 메소드를 작성할 수 있습니다. UACILogToLearning을 정의하지 않으면 Interact는 기본값 0을 가정합니다.
로그하려는 각 응답 유형마다 하나씩 오퍼 수락 로그 작업으로 여러 이벤트를 작성하거나 개별 응답 유형을 로그하기 위해 사용하는 모든 postEvent 호출에 사용할 오퍼 수락 로그 작업으로 단일 이벤트를 작성할 수 있습니다.
예를 들어 각 응답 유형마다 오퍼 수락 로그 작업으로 하나의 이벤트를 작성하십시오. UA_UsrResponseType 테이블에 [이름(코드)]로 사용자 정의 응답을 정의합니다(예: 탐색(EXP), 고려(CON), 커미트(CMT)). 그런 다음 세 개의 이벤트를 작성하고 이름을 LogAccept_Explore, LogAccept_Consider, LogAccept_Commit으로 지정합니다. 세 가지 모든 이벤트는 정확히 동일하지만(오퍼 수락 로그 작업이 있음) API에 대해 작업하는 사용자가 구별할 수 있도록 이름은 서로 다릅니다.
또는 모든 사용자 정의 응답 유형에 사용하는 오퍼 수락 로그 작업으로 단일 이벤트를 작성할 수 있습니다. 예를 들어, 이름을 LogCustomResponse라 지정하십시오.
API에 대해 작업할 때에는 이벤트 간에 기능적 차이는 없지만 이름 지정 규칙으로 코드를 명확히 할 수 있습니다. 각 사용자 정의 응답에 별도의 이름을 부여하는 경우에는 채널 이벤트 활동 요약 보고서에 보다 정확한 정보가 표시됩니다.
먼저 모든 이름-값 쌍을 설정하십시오.
//Define name value pairs for the UACIResponseTypeCode 
// Response type Explore
NameValuePair responseTypeEXP = new NameValuePairImpl();
responseTypeEXP.setName("UACIResponseTypeCode");
responseTypeEXP.setValueAsString("EXP");
responseTypeEXP.setValueDataType(NameValuePair.DATA_TYPE_STRING);

// Response type Consider
NameValuePair responseTypeCON = new NameValuePairImpl();
responseTypeCON.setName("UACIResponseTypeCode");
responseTypeCON.setValueAsString("CON");
responseTypeCON.setValueDataType(NameValuePair.DATA_TYPE_STRING);

// Response type Commit
NameValuePair responseTypeCMT = new NameValuePairImpl();
responseTypeCMT.setName("UACIResponseTypeCode");
responseTypeCMT.setValueAsString("CMT");
responseTypeCMT.setValueDataType(NameValuePair.DATA_TYPE_STRING);

//Define name value pairs for UACILOGTOLEARNING
//Does not log to learning
NameValuePair noLogToLearning = new NameValuePairImpl();
noLogToLearning.setName("UACILOGTOLEARNING");
noLogToLearning.setValueAsString("0");
noLogToLearning.setValueDataType(NameValuePair.DATA_TYPE_NUMERIC);

//Logs to learning
NameValuePair LogToLearning = new NameValuePairImpl();
LogToLearning.setName("UACILogToLearning");
LogToLearning.setValueAsString("1");
LogToLearning.setValueDataType(NameValuePair.DATA_TYPE_NUMERIC);
이 첫 번째 예는개별 이벤트 사용을 보여줍니다.
//EXAMPLE 1: This set of postEvent calls use the individually named events 
//PostEvent with an Explore response
NameValuePair[] postEventParameters = { responseTypeEXP, noLogToLearning };
response = api.postEvent(sessionId, LogAccept_Explore, postEventParameters);

//PostEvent with a Consider response
NameValuePair[] postEventParameters = { responseTypeCON, noLogToLearning };
response = api.postEvent(sessionId, LogAccept_Consider, postEventParameters);

//PostEvent with a Commit response
NameValuePair[] postEventParameters = { responseTypeCOM, LogToLearning };
response = api.postEvent(sessionId, LogAccept_Commit, postEventParameters);
이 두 번째 예는이벤트를 하나만 사용하는 경우를 보여줍니다.
//EXAMPLE 2: This set of postEvent calls use the single event 
//PostEvent with an Explore response
NameValuePair[] postEventParameters = { responseTypeEXP, noLogToLearning };
response = api.postEvent(sessionId, LogCustomResponse, postEventParameters);

//PostEvent with a Consider response
NameValuePair[] postEventParameters = { responseTypeCON, noLogToLearning };
response = api.postEvent(sessionId, LogCustomResponse, postEventParameters);

//PostEvent with a Commit response
NameValuePair[] postEventParameters = { responseTypeCOM, LogToLearning };
response = api.postEvent(sessionId, LogCustomResponse, postEventParameters);
두 예 모두 정확히 동일한 작업을 수행하지만 한 버전이 다른 버전에 비해 읽기 쉬울 수 있습니다.