new_releases 업데이트:
출시 노트에서 새로운 기능 및 제품 업데이트를 확인하세요.
대화 흐름
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
메시지 및 이벤트를 보내고 받는 것은 상담사와 사용자 간의 커뮤니케이션의 핵심 요소입니다. 상담사는 RBM API에 대한 HTTP POST 요청을 통해 사용자에게 메시지, 이벤트, 요청을 전송하지만 구성된 Webhook에서 사용자가 만든 메시지와 이벤트를 수신합니다.
다음은 샘플 데이터를 사용하여 메시지, 이벤트, 요청이 유용하고 의미 있는 상호작용을 생성하는 방법을 보여주는 대화 흐름의 예입니다.
여러분, 안녕하세요?

이 예시에서 에이전트는 Hello, World!
를 사용자에게 메시지로 보내고 사용자는 Hello to you!
로 응답합니다.

상담사는 사용자의 기기가 RBM을 지원하는지 확인하기 위해 기능 확인 요청을 전송합니다.
상담사가 다음을 전송합니다.
GET
/v1/phones/+12223334444/capabilities?requestId=147547143069602483572&agentId=welcome-bot
HTTP/1.1
Host: us-rcsbusinessmessaging.googleapis.com
Content-Type: application/json
RBM 플랫폼은 사용자 기기가 RBM 메시지를 수신할 수 있음을 나타내는 기능 확인 응답을 상담사에게 전송합니다.
상담사는 다음을 받습니다.
{
"rbmEnabled": true,
"features": [
"REVOCATION",
"RICHCARD_STANDALONE",
"RICHCARD_CAROUSEL",
"ACTION_CREATE_CALENDAR_EVENT",
"ACTION_DIAL",
"ACTION_OPEN_URL",
"ACTION_SHARE_LOCATION",
"ACTION_VIEW_LOCATION"
]
}
에이전트는 Hello, World!
메시지를 RBM API로 전송하고 RBM API는 이를 사용자 기기로 전달합니다.
상담사가 다음을 전송합니다.
POST
/v1/phones/+12223334444/agentMessages?messageId=123&agentId=welcome-bot
HTTP/1.1
Host: us-rcsbusinessmessaging.googleapis.com
Content-Type: application/json
{
"contentMessage": {
"text": "Hello, World!",
}
}
RBM 플랫폼은 사용자의 기기에 메시지를 전송하고 DELIVERED
이벤트를 에이전트로 전송합니다.
상담사는 다음을 받습니다.
{
"senderPhoneNumber": "+12223334444",
"agentId": "welcome-bot@rbm.goog",
"eventType": "DELIVERED",
"eventId": "Ms6oOiEli6QS-fe8QFrmhfIg",
"messageId": "123"
}
사용자가 기기에서 메시지를 열면 상담사에게 READ
이벤트가 전송됩니다.
상담사는 다음을 수신합니다.
{
"senderPhoneNumber": "+12223334444",
"agentId": "welcome-bot@rbm.goog",
"eventType": "READ",
"eventId": "Ms6oOiEli6QS-ge9ZFsmgTj",
"messageId": "123"
}
사용자가 에이전트에게 답장을 작성하여 보냅니다.
상담사는 다음을 받습니다.
{
"senderPhoneNumber": "+12223334444",
"agentId": "welcome-bot@rbm.goog",
"messageId": "msg000999888777a",
"sendTime": "2018-12-31T15:01:23.045123456Z",
"text": "Hello to you!",
}
RBM 플랫폼은 사용자의 메시지를 수신하면 사용자 기기에 DELIVERED
이벤트를 자동으로 전송합니다.
상담사는 사용자의 메시지에 대한 응답으로 READ
이벤트를 전송하여 메시지가 수신되고 확인되었음을 알립니다.
상담사가 다음을 전송합니다.
POST
/v1/phones/+12223334444/agentEvents?eventId=1234&agentId=welcome-bot
HTTP/1.1
Host: us-rcsbusinessmessaging.googleapis.com
Content-Type: application/json
{
"eventType": "READ",
"messageId": "msg000999888777a"
}
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-11-09(UTC)
[null,null,["최종 업데이트: 2024-11-09(UTC)"],[[["\u003cp\u003eAgents communicate with users by sending messages, events, and requests via HTTP POST requests to the RBM API.\u003c/p\u003e\n"],["\u003cp\u003eUser-created messages and events are received by agents at a designated webhook.\u003c/p\u003e\n"],["\u003cp\u003eA capability check request is initially sent by the agent to determine if the user's device supports RBM.\u003c/p\u003e\n"],["\u003cp\u003eMessages sent by an agent trigger \u003ccode\u003eDELIVERED\u003c/code\u003e and \u003ccode\u003eREAD\u003c/code\u003e events back to the agent, confirming the message's status.\u003c/p\u003e\n"],["\u003cp\u003eWhen a user replies, the agent receives the message, and a subsequent \u003ccode\u003eREAD\u003c/code\u003e event can be sent by the agent to confirm receipt.\u003c/p\u003e\n"]]],[],null,["# Conversation flows\n\nSending and receiving messages and events are the core aspects of communication\nbetween an agent and a user. Agents send messages, events, and requests to users\nthrough HTTP POST requests to the RBM API but receive user-created messages and\nevents at the configured\n[webhook](/business-communications/rcs-business-messaging/guides/integrate/webhooks).\n\nFollowing is an example of conversation flow that uses sample data to illustrate\nhow messages, events, and requests can create useful and meaningful\ninteractions.\n\nHello, World!\n-------------\n\nIn this example, the agent sends `Hello, World!` as\na message to the user, and the user responds with `Hello to you!`.\n\n1. The agent sends a capability check request to verify that the user's device\n is RBM-capable.\n\n The agent sends: \n\n ```text\n GET\n /v1/phones/+12223334444/capabilities?requestId=147547143069602483572&agentId=welcome-bot\n HTTP/1.1\n Host: us-rcsbusinessmessaging.googleapis.com\n Content-Type: application/json\n ```\n2. The RBM platform sends the agent a capability check response indicating that\n the user's device can receive RBM messages.\n\n The agent receives: \n\n ```component-pascal\n {\n \"rbmEnabled\": true,\n \"features\": [\n \"REVOCATION\",\n \"RICHCARD_STANDALONE\",\n \"RICHCARD_CAROUSEL\",\n \"ACTION_CREATE_CALENDAR_EVENT\",\n \"ACTION_DIAL\",\n \"ACTION_OPEN_URL\",\n \"ACTION_SHARE_LOCATION\",\n \"ACTION_VIEW_LOCATION\"\n ]\n }\n ```\n3. The agent sends the `Hello, World!` message to the RBM API, which passes\n it to the user's device.\n\n The agent sends: \n\n ```text\n POST\n /v1/phones/+12223334444/agentMessages?messageId=123&agentId=welcome-bot\n HTTP/1.1\n Host: us-rcsbusinessmessaging.googleapis.com\n Content-Type: application/json\n {\n \"contentMessage\": {\n \"text\": \"Hello, World!\",\n }\n }\n ```\n4. The RBM platform sends the message to the user's device and sends a\n `DELIVERED` event to the agent.\n\n The agent receives: \n\n ```transact-sql\n {\n \"senderPhoneNumber\": \"+12223334444\",\n \"agentId\": \"welcome-bot@rbm.goog\",\n \"eventType\": \"DELIVERED\",\n \"eventId\": \"Ms6oOiEli6QS-fe8QFrmhfIg\",\n \"messageId\": \"123\"\n }\n ```\n5. The user opens the message on their device, which sends a `READ` event to\n the agent.\n\n The agent receives: \n\n ```transact-sql\n {\n \"senderPhoneNumber\": \"+12223334444\",\n \"agentId\": \"welcome-bot@rbm.goog\",\n \"eventType\": \"READ\",\n \"eventId\": \"Ms6oOiEli6QS-ge9ZFsmgTj\",\n \"messageId\": \"123\"\n }\n ```\n6. The user writes and sends a reply to the agent.\n\n The agent receives: \n\n ```transact-sql\n {\n \"senderPhoneNumber\": \"+12223334444\",\n \"agentId\": \"welcome-bot@rbm.goog\",\n \"messageId\": \"msg000999888777a\",\n \"sendTime\": \"2018-12-31T15:01:23.045123456Z\",\n \"text\": \"Hello to you!\",\n }\n ```\n7. The RBM platform automatically sends the user's device a `DELIVERED` event\n when it receives the user's message.\n\n8. The agent sends a `READ` event in response to the user's message to let them\n know it was received and acknowledged.\n\n The agent sends: \n\n ```text\n POST\n /v1/phones/+12223334444/agentEvents?eventId=1234&agentId=welcome-bot\n HTTP/1.1\n Host: us-rcsbusinessmessaging.googleapis.com\n Content-Type: application/json\n {\n \"eventType\": \"READ\",\n \"messageId\": \"msg000999888777a\"\n }\n ```"]]