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)
  }
  // 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/5678/integrations/912.document21.1234/integrations/90921.

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

更新整合項目。