Google Business Messages는 2024년 7월 31일에 지원 중단됩니다.
자세히 알아보기
봇에서 실시간 에이전트로 트랜스퍼
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
사용자가 상담사와 소통할 때 사용자의 기대치는 상담사의 지원 방식에 따라 설정됩니다.
스스로 표현하고 수신하는 메시지를 작성하는 사람을 파악할 수 있습니다. 상담사가
메시지를 보낼 때 자동 (BOT
) 상담사인지 아니면 실제 상담사인지 식별할 수 있습니다.
(HUMAN
)
담당자
만들었다고 합시다. 사용자는 대화 내에서 이 정보를 볼 수 있으며
사용자가 특정 상황에서 예상되는 상호작용 유형을 이해할 수 있도록
확인할 수 있습니다.
상담사가 BOT
및 HUMAN
담당자를 모두 지원하는 경우 다음 사항이 중요합니다.
둘을 전환할 때 컨텍스트를 제공합니다 BOT
에서
HUMAN
담당자, REPRESENTATIVE_JOINED
전송
다음 날짜 이전의 이벤트
HUMAN
담당자에게 메일을 보내면서 모든 계정에
HUMAN
담당자가 보낸 실제 상담사의 메시지를 팔로우합니다. 이
실제 상담사가 대화를 나가면 REPRESENTATIVE_LEFT
이벤트를 전송합니다. 이러한
프레이밍 이벤트는 사용자에게 더 복잡한 질문을 할 수 있고
더 많은 자유 형식 응답을 기대할 수 있습니다.
이 대화 흐름에서 사용자의 첫 번째 상호작용은 자동화된
BOT
담당자로서 메시지를 보냈지만 실제 상담사가 참여하는 응답자
HUMAN
담당자가 대화에 참여하고 메시지를 보냅니다. 라이브
에이전트의 메시지는 REPRESENTATIVE_JOINED
및 REPRESENTATIVE_LEFT
에 의해 프레이밍됩니다.
이벤트를 수신합니다.

- 사용자가 상담사와 대화를 시작합니다.
사용자가 응답을 입력하기 시작하면 입력 이벤트를
있습니다.
{
"agent": "brands/1111/agents/2222",
"conversationId": "3333",
"customAgentId": "live-agent-handoff",
"requestId": "1234567890",
"userStatus": {
"isTyping": "true",
"createTime": "2020-10-02T15:01:23.045123456Z",
},
"sendTime": "2020-10-02T15:01:24.045123456Z",
}
사용자가 '안녕하세요. 문제가 있습니다.'라고 보내는 경우 메시지를 보냅니다.
{
"agent": "brands/1111/agents/2222",
"conversationId": "3333",
"customAgentId": "live-agent-handoff",
"requestId": "123123123",
"message": {
"messageId": "4444",
"name": "conversations/12345/messages/67890",
"text": "Hi, I have a problem",
"createTime": "2020-10-02T15:05:23.045123456Z",
},
"context": {
"entryPoint": "PLACESHEET",
"userInfo": {
"displayName": "Michael",
"userDeviceLocale": "en",
},
"resolvedLocale": "en",
}
"sendTime": "2020-10-02T15:05:24.045123456Z",
}
상담사가 '문의해 주셔서 감사합니다. 라이브 스트리밍 시
"상담사와 채팅할 수 있습니다." BOT
님이 보낸 메시지로
담당자로 문의하시기 바랍니다.
curl -X POST "https://businessmessages.googleapis.com/v1/conversations/3333/messages" \
-H "Content-Type: application/json" \
-H "`oauth2l header --json path/to/service/account/key.json businessmessages`" \
-d "{
'messageId': '5555',
'text': 'Thanks for contacting us. I'll pass this along when a live agent is available to chat with you.',
'representative': {
'avatarImage': 'https://live.agent/bot-avatar.jpg',
'displayName': 'Hello World Agent',
'representativeType': 'BOT'
}
}"
실제 상담사가 응대할 수 있게 됩니다.
에이전트는 첫 번째 이벤트를 전송하기 전에 REPRESENTATIVE_JOINED
이벤트를 전송합니다.
메시지를 보냅니다.
curl -X POST "https://businessmessages.googleapis.com/v1/conversations/12345/events?eventId=6666" \
-H "Content-Type: application/json" \
-H "`oauth2l header --json /path/to/service/account/key.json businessmessages`" \
-d "{
'eventType': 'REPRESENTATIVE_JOINED',
'representative': {
'avatarImage': 'https://live.agent/human-avatar.jpg',
'displayName': 'Jane Doe',
'representativeType': 'HUMAN',
},
}"
상담사는 다음과 같이 보냅니다. "문제가 있는 것 같습니다. 무엇을 도와드릴까요?" 메시지로
HUMAN
담당자
curl -X POST "https://businessmessages.googleapis.com/v1/conversations/3333/messages" \
-H "Content-Type: application/json" \
-H "`oauth2l header --json path/to/service/account/key.json businessmessages`" \
-d "{
'messageId': '7777',
'text': 'I see you have a problem. How can I help?',
'representative': {
'avatarImage': 'https://live.agent/human-avatar.jpg',
'displayName': 'Jane Doe',
'representativeType': 'HUMAN'
}
}"
실제 상담사와 사용자는 사용자의 요청이
있습니다. 실제 에이전트가 작성한 모든 메시지는
HUMAN
담당자입니다.
실제 상담사가 채팅을 종료하면 상담사가 REPRESENTATIVE_LEFT
이벤트를 전송합니다.
있습니다.
curl -X POST "https://businessmessages.googleapis.com/v1/conversations/12345/events?eventId=6666" \
-H "Content-Type: application/json" \
-H "`oauth2l header --json /path/to/service/account/key.json businessmessages`" \
-d "{
'eventType': 'REPRESENTATIVE_LEFT',
'representative': {
'avatarImage': 'https://live.agent/human-avatar.jpg',
'displayName': 'Jane Doe',
'representativeType': 'HUMAN',
},
}"
상담사는 다음 경우가 아니면 BOT
담당자와 모든 후속 메시지를 전송합니다.
다른 실제 상담사가 대화에 참여합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-09-11(UTC)
[null,null,["최종 업데이트: 2024-09-11(UTC)"],[[["\u003cp\u003eBusiness Messages allows agents to specify whether a message is composed by a bot (\u003ccode\u003eBOT\u003c/code\u003e) or a human agent (\u003ccode\u003eHUMAN\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eWhen switching between bot and human representatives, agents should use \u003ccode\u003eREPRESENTATIVE_JOINED\u003c/code\u003e and \u003ccode\u003eREPRESENTATIVE_LEFT\u003c/code\u003e events to provide context to the user.\u003c/p\u003e\n"],["\u003cp\u003eThese events signal to users that a live agent is available and they can expect more complex interactions and freeform responses.\u003c/p\u003e\n"],["\u003cp\u003eUsing \u003ccode\u003eBOT\u003c/code\u003e and \u003ccode\u003eHUMAN\u003c/code\u003e representative types and framing events enhances user experience by setting clear expectations for the conversation flow.\u003c/p\u003e\n"]]],[],null,["# Handoff from bot to live agent\n\nWhen users communicate with agents, their expectations are set by how the agent\npresents itself and who composes the messages they receive. Each time an agent\nsends a message, it can identify whether an automated (`BOT`) or live agent\n(`HUMAN`)\n[representative](/business-communications/business-messages/guides/how-to/message/send#representatives)\ncomposed the message. Users see this information within the conversation, and it\nhelps users understand what sorts of interactions they might expect at any given\npoint in time.\n\nIf an agent supports both `BOT` and `HUMAN` representatives, it's important to\nprovide context when switching between the two. When switching from a `BOT` to a\n`HUMAN` representative, send a `REPRESENTATIVE_JOINED`\n[event](/business-communications/business-messages/guides/how-to/message/events) before\nsending messages from the `HUMAN` representative, and properly label all\nfollowing messages from live agents as from `HUMAN` representatives. When the\nlive agent leaves the conversation, send a `REPRESENTATIVE_LEFT` event. These\nframing events inform users that they can ask more complicated questions and can\nexpect more freeform responses.\n\nIn this conversation flow, the user's first interactions are with an automated\nresponder that sends messages as a `BOT` representative, but a live agent joins\nthe conversation and sends messages as a `HUMAN` representative. The live\nagent's messages are framed by `REPRESENTATIVE_JOINED` and `REPRESENTATIVE_LEFT`\nevents.\n\n1. The user begins the conversation with the agent.\n2. Once the user begins typing a response, they send a typing event to the\n agent.\n\n {\n \"agent\": \"brands/1111/agents/2222\",\n \"conversationId\": \"3333\",\n \"customAgentId\": \"live-agent-handoff\",\n \"requestId\": \"1234567890\",\n \"userStatus\": {\n \"isTyping\": \"true\",\n \"createTime\": \"2020-10-02T15:01:23.045123456Z\",\n },\n \"sendTime\": \"2020-10-02T15:01:24.045123456Z\",\n }\n\n3. The user sends \"Hi, I have a problem\" as a message.\n\n {\n \"agent\": \"brands/1111/agents/2222\",\n \"conversationId\": \"3333\",\n \"customAgentId\": \"live-agent-handoff\",\n \"requestId\": \"123123123\",\n \"message\": {\n \"messageId\": \"4444\",\n \"name\": \"conversations/12345/messages/67890\",\n \"text\": \"Hi, I have a problem\",\n \"createTime\": \"2020-10-02T15:05:23.045123456Z\",\n },\n \"context\": {\n \"entryPoint\": \"PLACESHEET\",\n \"userInfo\": {\n \"displayName\": \"Michael\",\n \"userDeviceLocale\": \"en\",\n },\n \"resolvedLocale\": \"en\",\n }\n \"sendTime\": \"2020-10-02T15:05:24.045123456Z\",\n }\n\n4. The agent sends \"Thanks for contacting us. I'll pass this along when a live\n agent is available to chat with you.\" as a message from a `BOT`\n representative.\n\n curl -X POST \"https://businessmessages.googleapis.com/v1/conversations/3333/messages\" \\\n -H \"Content-Type: application/json\" \\\n -H \"`oauth2l header --json path/to/service/account/key.json businessmessages`\" \\\n -d \"{\n 'messageId': '5555',\n 'text': 'Thanks for contacting us. I'll pass this along when a live agent is available to chat with you.',\n 'representative': {\n 'avatarImage': 'https://live.agent/bot-avatar.jpg',\n 'displayName': 'Hello World Agent',\n 'representativeType': 'BOT'\n }\n }\"\n\n5. A live agent becomes available.\n\n6. The agent sends a `REPRESENTATIVE_JOINED` event before sending the first\n message from the live agent.\n\n curl -X POST \"https://businessmessages.googleapis.com/v1/conversations/12345/events?eventId=6666\" \\\n -H \"Content-Type: application/json\" \\\n -H \"`oauth2l header --json /path/to/service/account/key.json businessmessages`\" \\\n -d \"{\n 'eventType': 'REPRESENTATIVE_JOINED',\n 'representative': {\n 'avatarImage': 'https://live.agent/human-avatar.jpg',\n 'displayName': 'Jane Doe',\n 'representativeType': 'HUMAN',\n },\n }\"\n\n7. The agent sends \"I see you have a problem. How can I help?\" as a message\n from a `HUMAN` representative.\n\n curl -X POST \"https://businessmessages.googleapis.com/v1/conversations/3333/messages\" \\\n -H \"Content-Type: application/json\" \\\n -H \"`oauth2l header --json path/to/service/account/key.json businessmessages`\" \\\n -d \"{\n 'messageId': '7777',\n 'text': 'I see you have a problem. How can I help?',\n 'representative': {\n 'avatarImage': 'https://live.agent/human-avatar.jpg',\n 'displayName': 'Jane Doe',\n 'representativeType': 'HUMAN'\n }\n }\"\n\n8. The live agent and the user exchange messages until the user's request is\n fulfilled. All messages composed by the live agent are sent from a\n `HUMAN` representative.\n\n9. The agent sends a `REPRESENTATIVE_LEFT` event when the live agent leaves the\n conversation.\n\n curl -X POST \"https://businessmessages.googleapis.com/v1/conversations/12345/events?eventId=6666\" \\\n -H \"Content-Type: application/json\" \\\n -H \"`oauth2l header --json /path/to/service/account/key.json businessmessages`\" \\\n -d \"{\n 'eventType': 'REPRESENTATIVE_LEFT',\n 'representative': {\n 'avatarImage': 'https://live.agent/human-avatar.jpg',\n 'displayName': 'Jane Doe',\n 'representativeType': 'HUMAN',\n },\n }\"\n\n10. The agent sends all subsequent messages with `BOT` representatives unless\n another live agent joins the conversation."]]