REST Resource: brands.agents.integrations

資源:整合

整合的相關資訊。

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

  // Union field integration_info can be only one of the following:
  "dialogflowEsIntegration": {
    object (DialogflowEsIntegration)
  },
  "dialogflowCxIntegration": {
    object (DialogflowCxIntegration)
  }
  // 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

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/knowledgebases/1111」。

displayName

string

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

documents[]

object (DialogflowDocument)

知識庫文件。

選用

updateTime

string (Timestamp format)

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

RFC3339 世界標準時間「Zulu」格式的時間戳記,採用奈秒解析度,且最多 9 個小數位數。範例:"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/base/document12/knowledge2/knowledge2/knowledge2/將它 1.

displayName

string

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

updateTime

string (Timestamp format)

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

RFC3339 世界標準時間「Zulu」格式的時間戳記,採用奈秒解析度,且最多 9 個小數位數。範例:"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 整合的作業狀態相關資訊。

方法

create

建立整合。

delete

刪除整合。

get

取得整合。

list

列出整合功能。

patch

更新整合項目。