다단계 워크플로

컴패니언 에이전트는 실시간 대화 중에 인간 상담사가 여러 단계가 포함된 복잡한 작업을 탐색할 수 있도록 실시간 안내를 제공합니다. 다단계 워크플로 기능은 필수 단계를 추적하고 컨텍스트 기반 작업 세부정보를 제공하여 상담사 생산성을 높이고, 직무 교육을 가속화하며, 일관된 서비스 품질과 규정 준수를 유지합니다. 이 기능은 대화 진행 상황에 따라 적절한 단계를 자동으로 감지합니다.

주요 특징

컴패니언 에이전트의 다단계 워크플로 기능은 다음과 같은 이점을 제공합니다.

  • 표준화된 프로세스: 모든 상담사가 정확히 동일한 단계를 따르도록 지원하여 규정 준수 오류를 줄이고 교육 시간을 단축합니다.
  • 세부정보 추출: 주문 번호, 날짜, 선호도와 같은 고객 메시지의 주요 세부정보를 자동으로 캡처합니다.
  • 자동 도구 시작: 대화 중에 시스템 도구를 자동으로 실행하거나 중요한 작업을 완료하기 전에 인간 상담사의 승인을 기다립니다.
  • Human-in-the-loop: 인간 상담사가 각 단계를 제어합니다. 워크플로를 시작하거나 닫고, 저장된 정보를 수정하고, 작업을 완료로 표시하고, 이전 단계로 돌아갈 수 있습니다.

작동 방식

상담사가 대화를 시작하고 주제가 특정 워크플로와 일치하면 Companion agent가 다단계 워크플로를 시작합니다. 다단계 워크플로에는 제목과 안내가 포함된 상위 3개 워크플로 카드가 표시됩니다. 예를 들어 고객이 기술자 약속에 대해 문의하는 경우 상위 3개 워크플로 카드는 다음과 같습니다.

  • 상담 문의
  • 상담 취소
  • 약속 예약

상담 문의 안내에는 다음과 같은 단계가 포함됩니다.

  • 고객 유효성 검사
  • 약속 정보 가져오기
  • 상담 세부정보 확인

다단계 워크플로는 사전 대응 모드로 작동합니다. 어시스턴트 상담사는 각 고객 메시지를 읽고 최대 3개의 관련 워크플로를 제안합니다. 인간 상담사가 워크플로를 시작하면 안내 모드에서 단계 완료를 추적하고 활성 단계에 대한 추천 답장과 다음 작업을 생성합니다.

워크플로 단계

워크플로는 다음 5가지 핵심 단계로 구성됩니다.

  1. 고객에게 알림: 상담사가 고객과 공유할 수 있는 안내와 추천 응답을 표시합니다.
  2. 정보 수집: 상담사가 고객으로부터 수집해야 하는 구체적인 세부정보를 정의합니다.
  3. 직접 조치: 외부 도구 또는 데스크톱 애플리케이션에서 작업을 실행하고 출력 변수를 기록하도록 사람 에이전트에게 지시합니다.
  4. 도구 호출: 컴패니언 에이전트가 자동화된 시스템 도구를 시작하고 워크플로 변수에 응답 세부정보를 저장합니다.
  5. 워크플로 종료: 워크플로 브랜치의 완료를 표시합니다.

워크플로 예시

손상된 상품 반품 및 교체의 다음 예에서는 완전한 분기 워크플로를 만들고, 활성 라이브 버전으로 게시하고, 동반 에이전트에 연결하는 방법을 보여줍니다.

1단계: 워크플로 만들기

다음 JSON 객체는 워크플로 초안의 전체 구조를 정의합니다.

POST /v2beta1/projects/my-project/locations/global/companionAgentWorkflows

{
  "displayName": "Damaged Item Return and Replacement",
  "description": "Use this workflow when a customer reports receiving a damaged, broken, or defective item and requests a replacement or refund.",
  "rootStepId": "step_1_collect_details",
  "steps": [
    {
      "id": "step_1_collect_details",
      "title": "Collect Order ID and Resolution Preference",
      "type": "INFORMATION_COLLECTION",
      "actions": [
        {
          "humanAgentAction": {
            "informationCollectionAction": {
              "displayDetails": {
                "content": "Ask the customer for their **Order ID** and whether they prefer a **Replacement** or a **Refund**.",
                "enableMarkdown": true
              },
              "messageSuggestionConfig": {
                "content": "Ask the customer for their order number and whether they would like a free replacement or a full refund.",
                "verbatim": false
              },
              "variables": [
                {
                  "name": "order_id",
                  "description": "The customer's alphanumeric order identifier (for example, ORD-5510).",
                  "stringType": {}
                },
                {
                  "name": "resolution_preference",
                  "description": "Whether the customer wants a replacement unit or a refund.",
                  "enumType": {
                    "values": ["REPLACEMENT", "REFUND"]
                  }
                }
              ]
            }
          }
        }
      ],
      "transitions": [
        {
          "targetStepId": "step_2_check_eligibility"
        }
      ]
    },
    {
      "id": "step_2_check_eligibility",
      "title": "Verify Order Return Eligibility",
      "type": "SYSTEM_ACTION",
      "actions": [
        {
          "systemAction": {
            "cesToolSpec": {
              "cesTool": "projects/my-project/locations/global/apps/order-app/tools/lookup-order",
              "confirmationRequirement": "NOT_REQUIRED"
            },
            "outputVariableMappings": [
              {
                "variable": {
                  "name": "order_eligible",
                  "description": "Whether the order is within the 30-day return window.",
                  "booleanType": {}
                },
                  "fieldPaths": [
                  {"path": "order.returnEligible"},
                  {"path": "data.isEligible"}
                ]
              }
            ]
          }
        }
      ],
      "transitions": [
        {
          "targetStepId": "step_3a_log_replacement",
          "condition": {
            "variableCondition": "order_eligible == true && resolution_preference == 'REPLACEMENT'"
          }
        },
        {
          "targetStepId": "step_3b_refund_disclosure",
          "condition": {
            "variableCondition": "order_eligible == true && resolution_preference == 'REFUND'"
          }
        },
        {
          "targetStepId": "step_3c_explain_ineligible"
        }
      ]
    },
    {
      "id": "step_3a_log_replacement",
      "title": "Create Replacement Shipment in Warehouse Portal",
      "type": "MANUAL_ACTION",
      "actions": [
        {
          "humanAgentAction": {
            "manualExternalSystemAction": {
              "displayDetails": {
                "content": "Open the **Warehouse Portal**, select **Expedited Replacement**, and enter the new tracking number below.",
                "enableMarkdown": true
              },
              "variables": [
                {
                  "name": "replacement_tracking_id",
                  "description": "The tracking number generated in the Warehouse Portal.",
                  "stringType": {}
                }
              ]
            }
          }
        }
      ],
      "transitions": [
        {
          "targetStepId": "step_4_end"
        }
      ]
    },
    {
      "id": "step_3b_refund_disclosure",
      "title": "Read Mandatory Refund Disclosure",
      "type": "INFORMATIONAL_MESSAGE",
      "actions": [
        {
          "humanAgentAction": {
            "informationalResponseAction": {
              "displayDetails": {
                "content": "Read the required refund policy disclosure verbatim to the customer.",
                "enableMarkdown": false
              },
              "messageSuggestionConfig": {
                "content": "Your full refund has been approved. Please note that refunds take 3 to 5 business days to post to your original payment method, and the damaged item must be dropped off using the prepaid return label within 14 calendar days.",
                "verbatim": true
              }
            }
          }
        }
      ],
      "transitions": [
        {
          "targetStepId": "step_4_end"
        }
      ]
    },
    {
      "id": "step_3c_explain_ineligible",
      "title": "Explain Return Window Expiration",
      "type": "INFORMATIONAL_MESSAGE",
      "actions": [
        {
          "humanAgentAction": {
            "informationalResponseAction": {
              "messageSuggestionConfig": {
                "content": "Politely inform the customer that the 30-day return window has expired and offer a 15% courtesy discount toward a replacement.",
                "verbatim": false
              }
            }
          }
        }
      ],
      "transitions": [
        {
          "targetStepId": "step_4_end"
        }
      ]
    },
    {
      "id": "step_4_end",
      "title": "Complete Workflow",
      "type": "END_WORKFLOW"
    }
  ]
}

2단계: 게시 및 라이브로 승격

다음 예와 같이 초안 워크플로를 게시하고 상태를 live로 설정하는 요청을 보냅니다.

POST /v2beta1/projects/my-project/locations/global/companionAgentWorkflows/damaged-item-return:publish

{
  "markLive": true
}

3단계: 워크플로를 컴패니언 에이전트에 연결하기

다음 JSON 객체는 워크플로를 연결하기 위한 동반 에이전트 구성 및 트리거 설정을 지정합니다.

PATCH /v2beta1/projects/my-project/locations/global/companionAgents/my-companion-agent?updateMask=companionAgentWorkflowSpecs,skillConfigs

{
  "companionAgentWorkflowSpecs": [
    {
      "workflow": "projects/my-project/locations/global/companionAgentWorkflows/damaged-item-return",
      "proactiveEnabled": true
    }
  ],
  "skillConfigs": [
    {
      "skillTriggeringEvent": "END_OF_UTTERANCE",
      "guidanceSkillConfig": {}
    }
  ]
}