ユーザーがエージェントとの会話を開始する前に、 ビジネス メッセージでのエージェントのメッセージ機能の対応状況を確認できます。
対応可能な時間帯にユーザーがエージェントにメッセージを送信した場合、エージェントはユーザーに挨拶します ウェルカム メッセージと会話のきっかけを生成します。会話が始まった場合 営業時間外には、エージェントのオフライン メッセージが表示されます。詳しくは、開始 会話 をご覧ください。
bot と人間の利用状況
bot および人間と bot を別々に指定し、 代表 可用性。
メッセージを自動作成できるよう (自動化が自動応答でユーザーの位置をユーザーに通知する機能か) 自然言語理解エージェントのキューであり、 ユーザーの詳細など、bot メッセージングの利用可否を指定します。
Google が管理する環境でエージェントを起動する場合、人間による対応は不可欠 などのエントリ ポイント(位置情報ベースのエントリ ポイントや ローカル以外のエントリ ポイント(Google 広告を除く)。人間による対応の場合は、人間のエージェントが質問に回答できる曜日と時間のみを指定します。
bot 担当者が 24 時間対応できる場合 午前 8 時から午後 8 時まで人間の担当者が対応できます。時間を指定できます。 見ていきましょう
さらに、bot と人間による対応の両方を指定した場合、 ライブ対応のエージェントによるリクエストや 候補 bot 担当者が対応できない場合に、人間のエージェントをリクエストするようユーザーに促す 提供します。
メッセージ機能の対応状況を更新する
メッセージ機能の対応状況を更新するには、Business に PATCH リクエストを行います。
Communications API を使用して、エージェントの primaryAgentInteraction
と
additionalAgentInteractions
フィールド。
これらのフィールドを更新するときは、
SupportedAgentInteraction オブジェクトです。更新リクエストによって、すべての
すべての子フィールドが含まれます。たとえば、kubectl の「get pods」
hours
にインスタンスを追加するには、以前の hours
をすべて含める必要があります。
そうしないと、更新によって上書きされます。
前提条件
メッセージ機能の対応状況を更新する前に、次のものが必要です。
- 開発マシン上の GCP プロジェクトのサービス アカウント キーのパス
エージェントの
name
(例:brands/12345/agents/67890)エージェントの
name
がわからない場合は、エージェントの全エージェントを一覧表示する ブランド。bot を利用できるタイムゾーン、曜日、時間帯
人間が対応可能なタイムゾーン、曜日、時間帯
現在の primaryAgentInteraction
が不明な場合、
additionalAgentInteractions
の値については、エージェントの取得をご覧ください。
をご覧ください。
更新リクエストを送信する
エージェントを更新するには、次のコマンドを実行します。変数を値に置き換える 前提条件で特定した条件を満たす必要があります。
bot と人間によるメッセージの両方を利用できる場合は、bot の可用性を指定します
primaryAgentInteraction
で、インスタンスの
additionalAgentInteractions
。
# This code updates the agent interaction of a bot and human representatives. # Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.agents/patch # Replace the __BRAND_ID__ and __AGENT_ID__ # Make sure a service account key file exists at ./service_account_key.json curl -X PATCH \ "https://businesscommunications.googleapis.com/v1/brands/__BRAND_ID__/agents/__AGENT_ID__?updateMask=businessMessagesAgent.primaryAgentInteraction,businessMessagesAgent.additionalAgentInteractions" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/business-communications" \ -H "$(oauth2l header --json ./service_account_key.json businesscommunications)" \ -d '{ "businessMessagesAgent": { "primaryAgentInteraction": { "interactionType": "BOT", "botRepresentative": { "botMessagingAvailability": { "hours": [ { "startTime": { "hours": 20, "minutes": 0 }, "endTime": { "hours": 8, "minutes": 0 }, "timeZone": "America/Los_Angeles", "startDay": "MONDAY", "endDay": "SUNDAY" } ] } } }, "additionalAgentInteractions": [ { "interactionType": "HUMAN", "humanRepresentative": { "humanMessagingAvailability": { "hours": [ { "startTime": { "hours": 8, "minutes": 0 }, "endTime": { "hours": 20, "minutes": 0 }, "timeZone": "America/Los_Angeles", "startDay": "MONDAY", "endDay": "SUNDAY" } ] } } } ] } }'
# This code updates the primary agent interaction of a bot representative # Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.agents/patch # Replace the __BRAND_ID__ and __AGENT_ID__ # Make sure a service account key file exists at ./service_account_key.json curl -X PATCH \ "https://businesscommunications.googleapis.com/v1/brands/__BRAND_ID__/agents/__AGENT_ID__?updateMask=businessMessagesAgent.primaryAgentInteraction" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/business-communications" \ -H "$(oauth2l header --json ./service_account_key.json businesscommunications)" \ -d '{ "businessMessagesAgent": { "primaryAgentInteraction": { "interactionType": "BOT", "botRepresentative": { "botMessagingAvailability": { "hours": [ { "startTime": { "hours": 20, "minutes": 0 }, "endTime": { "hours": 8, "minutes": 0 }, "timeZone": "America/Los_Angeles", "startDay": "MONDAY", "endDay": "SUNDAY" } ] } } } } }'
# This code updates the primary agent interaction of a human representative # Read more: https://developers.google.com/business-communications/business-messages/reference/business-communications/rest/v1/brands.agents/patch # Replace the __BRAND_ID__ and __AGENT_ID__ # Make sure a service account key file exists at ./service_account_key.json curl -X PATCH \ "https://businesscommunications.googleapis.com/v1/brands/__BRAND_ID__/agents/__AGENT_ID__?updateMask=businessMessagesAgent.primaryAgentInteraction" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/business-communications" \ -H "$(oauth2l header --json ./service_account_key.json businesscommunications)" \ -d '{ "businessMessagesAgent": { "primaryAgentInteraction": { "interactionType": "HUMAN", "humanRepresentative": { "humanMessagingAvailability": { "hours": [ { "startTime": { "hours": 20, "minutes": 0 }, "endTime": { "hours": 8, "minutes": 0 }, "timeZone": "America/Los_Angeles", "startDay": "MONDAY", "endDay": "SUNDAY" } ] } } } } }'
書式設定と値のオプションについては、以下をご覧ください。
brands.agents.patch
および
SupportedAgentInteraction
。