REST Resource: brands.agents.integrations

資源:Integration

整合相關資訊。

JSON 表示法
{
  "name": string,
  "status": enum (IntegrationStatus),

  // Union field integration_info can be only one of the following:
  "dialogflowEsIntegration": {
    object (DialogflowEsIntegration)
  },
  "dialogflowCxIntegration": {
    object (DialogflowCxIntegration)
  },
  "agentWebhookIntegration": {
    object (AgentWebhookIntegration)
  }
  // End of list of possible types for union field integration_info.
}
欄位
name

string

僅供輸出。整合項目的專屬 ID。唯讀。由平台定義,

status

enum (IntegrationStatus)

僅供輸出。整合狀態。

聯集欄位 integration_info。整合的詳細資訊。integration_info 只能是下列其中一項:
dialogflowEsIntegration

object (DialogflowEsIntegration)

相關聯 Dialogflow ES 專案的相關資訊。https://cloud.google.com/dialogflow/es/docs

dialogflowCxIntegration

object (DialogflowCxIntegration)

相關聯 Dialogflow CX 專案的相關資訊。https://cloud.google.com/dialogflow/cx/docs/basics

agentWebhookIntegration

object (AgentWebhookIntegration)

代理程式的 Webhook 相關資訊。如果是在代理程式層級設定 Webhook,則會覆寫合作夥伴層級的 Webhook。

IntegrationStatus

整合狀態。

列舉
INTEGRATION_STATUS_UNSPECIFIED 未指定整合狀態。
ENABLED 已啟用。
DISABLED 已停用。

DialogflowEsIntegration

Business Messages 代理程式和 Dialogflow ES 專案關聯相關資訊。

JSON 表示法
{
  "dialogflowProjectId": string,
  "autoResponseStatus": enum (AutoResponseStatus),
  "dialogflowServiceAccountEmail": string,
  "operationInfo": {
    object (OperationInfo)
  },
  "dialogflowKnowledgeBases": [
    {
      object (DialogflowKnowledgebase)
    }
  ]
}
欄位
dialogflowProjectId

string

必要欄位。Dialogflow 專案 ID。

不開放編輯。如要變更這個值,您必須先從這個代理程式刪除 Dialogflow 專案,然後建立新的整合。

autoResponseStatus

enum (AutoResponseStatus)

必要欄位。如果設為 ENABLED,Business Messages 就會自動傳送 Dialogflow 回應給使用者。

dialogflowServiceAccountEmail

string

僅供輸出。您必須在 Dialogflow 專案中設定成「Dialogflow 主控台代理程式編輯者」和「Dialogflow API 用戶端」角色的服務帳戶。您必須先執行這些動作,才能提供 Dialogflow API 存取權。

operationInfo

object (OperationInfo)

僅供輸出。Dialogflow 整合的作業狀態相關資訊。

dialogflowKnowledgeBases[]

object (DialogflowKnowledgebase)

與 Dialogflow 專案相關聯的知識庫。

選用

AutoResponseStatus

Dialogflow 自動回應狀態。

列舉
AUTO_RESPONSE_STATUS_UNSPECIFIED 未指定自動回應。
ENABLED 自動回覆已啟用。
DISABLED 已停用自動回覆。

OperationInfo

Dialogflow 作業資訊。

JSON 表示法
{
  "operationName": string,
  "operationType": enum (OperationType),
  "operationState": enum (OperationState),
  "error": {
    object (Status)
  }
}
欄位
operationName

string

僅供輸出。伺服器指派的名稱 (作業 ID),只有在最初傳回此名稱的服務中不重複。

operationType

enum (OperationType)

僅供輸出。Dialogflow 作業類型。

operationState

enum (OperationState)

僅供輸出。Dialogflow 作業狀態

error

object (Status)

僅供輸出。錯誤結果 (如果有的話)。

OperationType

Dialogflow 作業類型。

列舉
OPERATION_TYPE_UNSPECIFIED 未指定類型。
ASSOCIATE_DIALOGFLOW 建立 Dialogflow 關聯
DISSOCIATE_DIALOGFLOW 取消連結 Dialogflow。
ADD_DOCUMENT_TO_KNOWLEDGEBASE 將文件新增至知識庫。
DELETE_DOCUMENT_FROM_KNOWLEDGEBASE 從知識庫中刪除文件。

OperationState

Dialogflow 中的作業狀態。

列舉
OPERATION_STATE_UNSPECIFIED 未指定狀態。
PROCESSING 正在處理。
COMPLETED 已完成。
FAILED 失敗。

狀態

Status 類型會定義適用於不同程式設計環境 (包含 REST API 和遠端程序呼叫 (RPC) API) 的邏輯錯誤模型。gRPC 會使用這個模型。每個 Status 訊息包含三部分的資料:錯誤代碼、錯誤訊息和錯誤詳細資料。

如要進一步瞭解這個錯誤模型,以及如何使用這個錯誤模型,請參閱 API 設計指南

JSON 表示法
{
  "code": integer,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
欄位
code

integer

狀態碼,應為 google.rpc.Code 的列舉值。

message

string

向開發人員顯示的錯誤訊息,應以英文呈現。向使用者顯示的錯誤訊息都應經過本地化並透過 google.rpc.Status.details 欄位傳送,或由用戶端進行本地化。

details[]

object

包含錯誤詳細資料的訊息清單。這是供 API 使用的一組常用訊息類型。

包含任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。例如:{ "id": 1234, "@type": "types.example.com/standard/id" }.

DialogflowKnowledgebase

知識庫資訊。一個知識庫可以有多個常見問題網址。

JSON 表示法
{
  "name": string,
  "displayName": string,
  "documents": [
    {
      object (DialogflowDocument)
    }
  ],
  "updateTime": string
}
欄位
name

string

僅供輸出。知識庫 ID。

建立知識庫後,Dialogflow 服務傳回的專屬 ID。如果品牌 ID 為「1234」,代理程式 ID 為「5678」,整合 ID 為「9092」,知識庫 ID 為「1111」,則這個參數會解析為「brands/1234/agents/5678/integrations/9092/agents/1111」。

displayName

string

必要欄位。知識庫顯示名稱。

documents[]

object (DialogflowDocument)

知識庫文件。

選用

updateTime

string (Timestamp format)

僅供輸出。建立或更新知識庫的時間。

採用 RFC3339 世界標準時間「Zulu」格式的時間戳記,採用奈秒解析度和最多九個小數位數。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

DialogflowDocument

知識庫文件。文件可以是網站網址,也可以是 CSV 檔案的網址。網址必須公開。CSV 檔案必須包含一或多個問題/答案組合,每組配對一列。

JSON 表示法
{
  "name": string,
  "displayName": string,
  "updateTime": string,
  "operationInfo": {
    object (OperationInfo)
  },

  // Union field content can be only one of the following:
  "faqUrl": string,
  "rawContent": string
  // End of list of possible types for union field content.
}
欄位
name

string

系統產生的文件 ID。

如果品牌 ID 為「1234」,代理程式 ID 為「5678」,整合 ID 為「9092」,知識庫 ID 為「1111」,文件 ID 為「2222」,則這個參數會解析為「brands/1234/agents/5678/integrations/90912learn.2/base2.12%"

displayName

string

必要欄位。常見問題文件的顯示名稱。

updateTime

string (Timestamp format)

僅供輸出。文件的建立/更新時間。

採用 RFC3339 世界標準時間「Zulu」格式的時間戳記,採用奈秒解析度和最多九個小數位數。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

operationInfo

object (OperationInfo)

僅供輸出。只有在文件新增至現有的知識庫時,才會填入作業資訊。

聯集欄位 content。文件內容。content 只能是下列其中一項:
faqUrl

string

常見問題文件的網址。

rawContent

string (bytes format)

文件的原始內容。

Base64 編碼的字串。

DialogflowCxIntegration

Business Messages 代理程式和 Dialogflow CX 專案關聯相關資訊。

JSON 表示法
{
  "dialogflowProjectId": string,
  "dialogflowAgentId": string,
  "autoResponseStatus": enum (AutoResponseStatus),
  "dialogflowServiceAccountEmail": string,
  "operationInfo": {
    object (OperationInfo)
  }
}
欄位
dialogflowProjectId

string

必要欄位。Dialogflow 專案 ID。

不開放編輯。如要變更這個值,您必須先從這個代理程式刪除 Dialogflow 專案,然後建立新的整合。

dialogflowAgentId

string

必要欄位。Dialogflow 代理程式 ID。

autoResponseStatus

enum (AutoResponseStatus)

必要欄位。如果設為 ENABLED,Business Messages 就會自動傳送 Dialogflow 回應給使用者。

dialogflowServiceAccountEmail

string

僅供輸出。您必須在 Dialogflow 專案中設定成「Dialogflow 主控台代理程式編輯者」和「Dialogflow API 用戶端」角色的服務帳戶。您必須先執行這些動作,才能提供 Dialogflow API 存取權。

operationInfo

object (OperationInfo)

僅供輸出。Dialogflow 整合的作業狀態相關資訊。

AgentWebhookIntegration

Business Messages 代理程式的 Webhook 相關資訊。

JSON 表示法
{
  "webhookUri": string,
  "verificationToken": string
}
欄位
webhookUri

string

必要欄位。訊息傳遞的 Webhook 網址。

verificationToken

string

僅限輸入。驗證權杖。

方法

create

建立整合。

delete

刪除整合。

get

取得整合。

list

列出整合項目。

patch

更新整合作業。