new_releases আপডেট : নতুন বৈশিষ্ট্য এবং পণ্য আপডেটের জন্য
রিলিজ নোট চেক করুন। ,
new_releases আপডেট : নতুন বৈশিষ্ট্য এবং পণ্য আপডেটের জন্য
রিলিজ নোট চেক করুন।
কথোপকথন প্রবাহিত হয়
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
বার্তা এবং ইভেন্টগুলি পাঠানো এবং গ্রহণ করা একটি এজেন্ট এবং ব্যবহারকারীর মধ্যে যোগাযোগের মূল দিক। এজেন্টরা RBM API-এ HTTP POST অনুরোধের মাধ্যমে ব্যবহারকারীদের বার্তা, ইভেন্ট এবং অনুরোধ পাঠায় কিন্তু কনফিগার করা ওয়েবহুকে ব্যবহারকারীর তৈরি বার্তা এবং ইভেন্টগুলি গ্রহণ করে।
নিম্নলিখিত কথোপকথন প্রবাহের একটি উদাহরণ যা বার্তা, ইভেন্ট এবং অনুরোধগুলি কীভাবে দরকারী এবং অর্থপূর্ণ মিথস্ক্রিয়া তৈরি করতে পারে তা বোঝাতে নমুনা ডেটা ব্যবহার করে।
হ্যালো, বিশ্ব!

এই উদাহরণে, এজেন্ট 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-তে বার্তা, যা ব্যবহারকারীর ডিভাইসে এটি পাস করে।
এজেন্ট পাঠায়:
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 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2024-11-18 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2024-11-18 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 ```"]]