QM 通話工作階段事件資料

本頁面說明 Contact Center AI Platform (CCAI Platform) 可匯出至品質管理 (QM) 應用程式的通話工作階段事件資料。如要進一步瞭解如何將 CCAI Platform 與 QM 應用程式整合,請參閱「QM、SIPREC 和 WFM 整合」。

如要瞭解即時通訊工作階段事件資料,請參閱「QM 即時通訊工作階段事件資料」。

呼叫工作階段事件和觸發條件

特定通話工作階段事件會觸發通話工作階段資料匯出至 QM 應用程式。本節列出通話事件類型,以及觸發各類型的動作。此外,每個工作階段事件類型也包含工作階段事件酬載範例。

代理程式登入

下列動作會觸發這項事件:

  • 客服人員使用 Contact Center AI 平台入口網站登入客服人員介面卡。

  • 服務專員使用 CRM 登入服務專員轉接程式。

以下程式碼範例顯示事件酬載:

{
 "type" : "AgentState",
 "item" : {
  "ParticipantID" : "1234",
  "Email" : "some.email@domain.com",
  "State" : "login"
 }
}

服務專員登出

下列動作會觸發這項事件:

  • 服務專員使用 Contact Center AI 平台入口網站登出服務專員介面卡。

  • 服務專員使用 CRM 登出服務專員轉接程式。

以下程式碼範例顯示事件酬載:

{
 "type" : "AgentState",
 "item" : {
  "ParticipantID" : "1234",
  "Email" : "some.email@domain.com",
  "State" : "logout"
 }
}

預計來電

使用者撥打電話給聯絡中心,且電話轉接給服務專員時,系統會觸發這個事件。

只有在通話投影至 Deltacast 時,才會觸發這項事件。多點傳播投影不會觸發事件。只有連鎖群組中呼叫的第一個 deltacast 投影會觸發事件。

這類事件包括透過轉接、重新導向和轉移接聽的通話預測。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "ringing",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "connected"
   },
   {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "ringing"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

接聽來電

當服務專員接聽預計來電時,系統會觸發這項事件。

無論是 delta 投射或多播投射,只要服務專員接聽電話,就會觸發這個事件。這項事件適用於透過來電轉接和轉移接聽的來電。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "connected",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "connected"
   },
  {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "connected"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

撥出的電話正在響鈴

下列動作會觸發這項事件:

  • 代理程式撥打新的外撥電話,使用者正在接聽電話。

  • 服務專員撥打新增參與者電話,且電話正在響鈴。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "e9dd62bb",
  "State" : "dialing",
  "Direction" : "outgoing",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "connected"
   },
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "connected"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

外撥電話已接通

下列動作會觸發這項事件:

  • 使用者接聽撥出電話。

  • 第三方接聽新增的通話。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "e9dd62bb",
  "State" : "connected",
  "Direction" : "outgoing",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "connected"
   },
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "connected"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

通話已保留

下列動作會觸發這項事件:

  • 服務專員將使用者設為暫緩執行。

  • 代理人將第三方暫時保留。

以下程式碼範例顯示事件酬載:

 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "held",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "held"
   },
  {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "connected"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

通話已取消保留

下列動作會觸發這項事件:

  • 服務專員將使用者從保留狀態移除。

  • 服務專員將第三方從暫停通話狀態移除。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "connected",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "connected"
   },
  {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "connected"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

啟動並接受冷轉接

下列動作會觸發這項事件:

  • 服務專員向其他服務專員發起無預警轉接通話,且轉接要求已獲接受。

  • 服務專員向其他佇列發起冷轉接通話,且該佇列的服務專員接受轉接。

  • 服務專員冷邀請另一位服務專員加入電話會議,而另一位服務專員接受並加入電話會議。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "transferred",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "connected"
   },
  {
    "ParticipantID" : "4321",
    "Type" : "agent",
    "State" : "connected"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

發起並接受溫轉

下列動作會觸發這項事件:

  • 服務專員向其他服務專員發起溫和轉接通話,且轉接要求已獲接受。

  • 服務專員撥打溫和轉接電話給其他佇列,而該佇列的服務專員接受轉接。

  • 服務專員向其他服務專員發出通話會議邀請,對方接受並加入通話會議。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "conferenced",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "connected"
   },
  {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "connected"
  },
  {
    "ParticipantID" : "4321",
    "Type" : "agent",
    "State" : "connected"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

服務專員退出電話會議

當通話會議中的服務專員離開通話會議,但未結束會議時,系統會觸發這項事件。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "participantDisconnect",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "connected"
   },
  {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "disconnected"
  },
  {
    "ParticipantID" : "4321",
    "Type" : "agent",
    "State" : "connected"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

通話已設為靜音

下列動作會觸發這項事件:

  • 服務專員將通話設為靜音。

  • 服務專員將通話中的其他參與者設為靜音。

這項事件適用於所有通話。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "connected",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,\
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "connected"
   },
  {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "muted"
  },
  {
    "ParticipantID" : "4321",
    "Type" : "agent",
    "State" : "muted"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

通話已取消靜音

下列動作會觸發這項事件:

  • 服務專員取消通話靜音。

  • 服務專員在通話中取消其他參與者的靜音。

這項事件適用於所有通話。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "connected",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "connected"
   },
  {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "unmuted"
  },
  {
    "ParticipantID" : "4321",
    "Type" : "agent",
    "State" : "unmuted"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

通話已編輯

當服務專員編輯通話內容時,系統會觸發這項事件。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "connected",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "redacted"
   },
  {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "redacted"
  }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

通話未經過編輯

當服務專員取消通話內容的遮蓋時,就會觸發這項事件。

以下程式碼範例顯示事件酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "connected",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "unredacted"
   },
  {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "unredacted"
  }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

通話已結束

下列動作會觸發這項事件:

  • 使用者結束通話。

  • 服務專員結束通話。

這項事件適用於所有通話。

以下程式碼範例顯示來電事件的酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "846802bf90d1",
  "State" : "disconnected",
  "Direction" : "incoming",
  "Initiator" : "+123456789",
  "Queue_path_ids": "1/2/3",
  "Queue_path_names" : "support/orders/status",
  "Language" : "en",
  "Queue_uuid" : 3,
  "Recording_permitted" : true,
  "Participants" :
  [
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "disconnected"
   },
   {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "disconnected"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

以下程式碼範例顯示撥出電話事件的酬載:

{
 "type" : "CallState",
 "item" : {
  "CallID" : "e9dd62bb",
  "State" : "disconnected",
  "Direction" : "outgoing",
  "Initiator" : "1234",
  "Participants" :
  [
   {
    "ParticipantID" : "1234",
    "Type" : "agent",
    "State" : "disconnected"
   },
   {
    "ParticipantID" : "+123456789",
    "Type" : "external",
    "State" : "disconnected"
   }
  ],
  "MediaID" : "208188811_124248155@67.231.1.110"
 }
}

通話工作階段事件欄位

下表說明 Contact Center AI Platform 匯出至 QM 應用程式的通話記錄資料欄位。

一般欄位

欄位名稱 允許值 說明 效果
type
  • AgentState
  • CallState

整體 JSON 酬載的事件類型。

  • 代理程式相關事件的傳遞 AgentState
  • 傳遞與通話相關事件的 CallState

item

含有活動資訊的物件。

代理程式狀態欄位

欄位名稱 說明 行為

ParticipantID

服務專員 ID

可在 item 物件中使用。

Contact Center AI 平台系統中的服務專員 ID。

  • 在 Contact Center AI Platform 會議中繼資料的 agent_info 物件中,傳遞 ID 欄位的值。

Email

電子郵件地址

可在 item 物件中使用。

服務專員的電子郵件地址。

  • 在工作階段中繼資料的 agent_info 物件中,傳遞電子郵件欄位的值。

State

  • login
  • logout

可在 item 物件中使用。

事件發生時代理程式的狀態。

  • 代理商登入時會傳遞 login
  • 代理登出時會傳遞 logout

通話狀態欄位

欄位名稱 說明 行為

CallID

通話 ID

可在 item 物件中使用。

Contact Center AI 平台系統中的通話工作階段 ID。

  • 在 Contact Center AI Platform 會議中繼資料中,傳遞主要物件的 ID 欄位值。

State

  • dialing
  • waiting
  • ringing
  • connected
  • redirected
  • deflected
  • transferred
  • conferenced
  • disconnected

可在 item 物件中使用。

通話工作階段的目前狀態。

  • 當代理人或使用者撥打的出站電話處於鈴響狀態時,會傳遞 dialing
  • 通話排入佇列,準備轉接給服務專員時,會傳遞 waiting
  • 當來電/轉接電話處於代理程式的投影狀態時,會傳遞 ringing
  • 當服務專員或使用者連上電話會議時,會傳遞 connected
  • 如果系統自動重新導向通話,且未將通話轉接給服務專員,則為 redirected
  • 當通話從服務專員冷轉移給另一位服務專員時,系統會傳遞 transferred
  • 通話從一位服務專員轉接給另一位時,會傳遞 conferenced
  • 當服務專員或使用者離開電話會議時,系統會傳遞 disconnected

Direction

  • incoming
  • outgoing

可在 item 物件中使用。

從聯絡中心角度來看,通話工作階段的方向。

  • 通話工作階段為撥入時,會傳遞 incoming
  • 通話工作階段為撥出時,會傳遞 outgoing

Initiator

  • 服務專員 ID
  • 虛擬服務專員 ID
  • 使用者的電話號碼

可在 item 物件中使用。

初始化通話狀態的當事人 ID。

  • 真人服務專員

    在工作階段中繼資料的 agent_info 物件中,傳遞 ID 欄位的值。

  • 虛擬服務專員

    在工作階段中繼資料的參與者物件中,傳遞 virtual_agent_id 欄位的值。

  • 使用者專用

    傳遞使用者的電話號碼 (如有)。

    否則,請在工作階段中繼資料的 end_user 物件中傳遞 ID 欄位的值。

Queue_path_ids

佇列 ID 路徑

可在 item 物件中使用。

通話轉接給第一位服務專員前,使用者瀏覽的佇列路徑。

這個值是使用導覽佇列的佇列 ID 建構而成。

這項功能僅適用於接聽來電。

Queue_path_names

佇列名稱路徑

可在 item 物件中使用。

通話轉接給第一位服務專員前,使用者瀏覽的佇列路徑。

這個值是使用導覽佇列的佇列名稱建構而成。

這項功能僅適用於接聽來電。

Language

語言代碼

可在 item 物件中使用。

使用者所選語言的語言代碼。

這項功能僅適用於接聽來電。

Queue_uuid

佇列 ID

可在 item 物件中使用。

通話抵達佇列的 UUID。

這項功能僅適用於來電和轉接至佇列的通話。

Recording_permitted

一個布林值

可在 item 物件中使用。

指出是否允許錄製特定通話

  • 如果允許通話錄音,則會傳遞 true
  • 如果系統不允許錄音,則會傳遞 false

Custom_headers

自訂標頭

可在 item 物件中使用。

這個欄位用於傳遞自訂資料,例如 SIP 標頭

Participants

這個物件會巢狀內嵌在 item 物件中。

包含通話參與者資訊的物件。

ParticipantID

  • agent_id
  • virtual_agent_id
  • consumer_phoneNumber
  • thirdParty_phoneNumber

可在 Participants 物件中使用。

通話參與者的 ID。

  • 真人服務專員
  • 在 Contact Center AI Platform 工作階段中繼資料的 agent_info 物件中,傳遞 ID 欄位的值。

  • 虛擬服務專員
  • 在 Contact Center AI Platform 會議中繼資料的參與者物件中,傳遞 virtual_agent_id 欄位的值

  • 使用者專用
  • 傳遞使用者的電話號碼 (如有)。

    否則,會將 end_user object 中的 id 欄位值傳遞至 Contact Center AI Platform 會議中繼資料。

  • 第三方
  • 傳遞第三方電話號碼 (如有)。

    否則,會傳遞值:null

Type

  • agent
  • external

可在 Participants 物件中使用。

通話參與者類型。

  • 如果通話參與者是 Contact Center AI 平台服務專員,則會通過 agent
  • 如果通話參與者是使用者或第三方,則會傳遞 external

State

  • dialing
  • ringing
  • connected
  • held
  • disconnected
  • callback
  • deflected
  • transferred
  • redacted
  • unredacted
  • muted
  • unmuted

可在 Participants 物件中使用。

參與者在電話會議中的目前狀態。

  • 當外撥電話區隔處於代理商、使用者或第三方鈴響狀態時,會傳遞 dialing
  • 當來電或轉接的通話片段處於代理商的投影狀態時,會傳遞 ringing
  • 當服務專員、使用者或第三方連線至電話會議時,會傳遞 connected
  • 當代理程式在電話會議中暫停使用者或第三方時,會傳遞 held
  • 當服務專員、使用者或第三方離開電話會議時,系統會傳遞 disconnected
  • 在代理程式、使用者或第三方通話區隔中啟用通話內容編輯功能時,傳遞 redacted
  • 如果代理人、使用者或第三方通話區隔停用通話內容編輯功能,則會傳遞 unredacted
  • 代理設為靜音時,會傳遞 muted
  • 代理人解除靜音時,會傳遞 unmuted

MediaID

  • twilio_mediaID
  • nexmo_mediaID

可在 Participants 物件中使用。

電信業者提供的通話工作階段媒體 ID。

  • 當發起者撥打或接聽 Twilio 號碼的電話時,會傳遞 twilio_mediaID
  • 當發起者撥打或接聽 Nexmo 號碼的電話時,會傳遞 nexmo_mediaID