Agentforce 대한 컨텍스트 전달 설정
Consumer Goods Cloud 모바일 앱에서 컨텍스트 데이터를 분석하여 에이전트가 더 빠르고 정확하게 작업할 수 있도록 돕습니다. 사용자 정의 프로젝트에서 프로세스 및 비즈니스 논리 계약을 설정하여 앱이 이 컨텍스트를 구축하고 전송하는 방법을 정의할 수 있습니다.
필수 Edition
| 지원 제품: Consumer Goods Cloud가 활성화된 Enterprise 및 Unlimited Edition |
| 필요한 사용자 권한 | |
|---|---|
| Agentforce 대한 컨텍스트 전달 구성 | 개발자, 사용자 정의 프로그램 |
노트 컨텍스트 전달은 물리적 모바일 장치에서 Consumer Goods Cloud 모바일 앱에서 Agentforce 사용할 때 작동합니다. 모델러 시뮬레이터 앱에서는 작동하지 않습니다.
예를 들어 매장 콕핏에서 방문 ID를 전달하려면 다음 단계를 수행합니다.
- Visual Studio 코드 기반 모델러에서 사용자 정의 프로젝트를 엽니다.
-
필요한 경우 프로세스 계약에서
Action논리를 정의합니다.- 관련 프로세스 계약을 엽니다.
-
Action에 데이터를 전달하거나 이미 사용 가능한 객체에서 데이터를 가져오는 논리를 구현합니다. 이 예에서는 개체 이름 및 레코드 ID를 입력 매개 변수로 사용하는 논리Action를 만들어 사용자 정의 비즈니스 논리를 호출합니다.<Action actionType="LOGIC" name="LaunchAgentforce" call="ProcessContext::CardController.launchAgentforce"> <Parameters> <Input name="objectName" type="Literal" value="Visit" /> <Input name="recordId" type="Binding" value="ProcessContext::mainBO.PKey" /> </Parameters> </Action> -
agentforceLaunchEvent외부 이벤트를 추가하고 작업에 바인딩합니다.<ExternalEvent name="agentforceLaunchEvent" action="LaunchAgentforce" />
다음은 프로세스 계약 구성의 예제입니다.
<!-- Define the Action to call the Business Logic function --> <Action actionType="LOGIC" name="LaunchAgentforce" call="ProcessContext::CardController.launchAgentforce"> <Parameters> <!-- Pass the Object API Name --> <Input name="objectName" type="Literal" value="Visit" /> <!-- Pass the Record ID dynamically from the current Business Object --> <Input name="recordId" type="Binding" value="ProcessContext::mainBO.PKey" /> </Parameters> </Action> <!-- Define the External Event to intercept the header button click --> <ExternalEvent name="agentforceLaunchEvent" action="LaunchAgentforce" /> -
논리를 구현하여 페이로드를 구성하고 네이티브 패싯을 호출합니다.
- 프로세스 작업에서 참조된 비즈니스 논리 계약을 엽니다.
-
Action호출에 정의된 이름과 일치하는 함수를 구현합니다. -
objectApiName및 속성을 포함하는 JSON 페이로드를 구성합니다. -
Facade.launchAgentForce()함수를 호출합니다.
다음은 비즈니스 논리 구현의 예제입니다.
function launchAgentforce(objectName, recordId){ var me = this; ////////////////////////////////////////////////////////////////////////////// // Add your customizing javaScript code below. // ////////////////////////////////////////////////////////////////////////////// var promise; let payload = { "objectAPIName": objectName, "attributes": { "recordId": recordId } }; Facade.launchAgentForce(payload); promise = Promise.resolve(); ////////////////////////////////////////////////////////////////////////////// // Add your customizing javaScript code above. // ////////////////////////////////////////////////////////////////////////////// return promise; }
긴급으로 표시된 특정 방문 레코드의 샘플 페이로드 구조입니다.
{
"objectApiName": "Visit",
"attributes": {
"recordId": "a00xx0000012345AAA",
"pageType": "standard_recordPage",
"actionName": "view"
},
"additionalAttributes": [
{
"name": "customStatus",
"value": "urgent",
"type": "String"
}
]
}매개 변수 세부 사항:
objectApiName: (문자열) 필수 항목입니다. Salesforce 개체 컨텍스트의 API 이름입니다.attributes: (개체) 필수 항목입니다. 특히 recordId인 레코드 식별자를 위한 컨테이너입니다.additionalAttributes: (어레이) 옵션입니다. 추가 컨텍스트의 키-값 쌍입니다.
이 기사를 통해 문제를 해결했습니까?
개선을 위한 의견을 보내주세요.

