NiCE CXone Bot Builder 会話 API

Conversations APIを使用すると、NiCE CXone Bot Builder 会話データをエクスポートできます。 コンタクトの名前、会話ID、チャネルClosed コンタクトセンターにおいて顧客とのやり取りを可能にする、音声およびデジタルによる様々なコミュニケーション手段。、インテントClosed コンタクトが話す、または入力する内容の後にある意味や目的のことで、コンタクトが伝えたいこと、または達成したいことを指します。、メッセージの内容などのデータが抽出されます。 エクスポートされたデータを分析やその他のサードパーティーのプロセスに投入できます。

URL

https://bot-builder-de-[region].niceincontact.com/api/public/conversations

URLで、[region]をNiCE CXoneシステムが実行されるリージョン(na1など)に置き換えます。 NiCE CXone開発者ポータルのドキュメントでは、お使いのリージョンを確認するAn icon of a square with an arrow  pointing from the center out to the upper right corner.方法について説明しています。

方式

GET

認証

Bot Builderの[設定]で、会話データを抽出したいボットについて、[環境設定] > [インポートとエクスポート] タブにあるトークンを使用します。 トークンは会話セクションにあります。

成功応答

コード:200OK

パラメーター

キー 定義
token

Bot Builderから取得した認証トークン。

query

結果をフィルターするためのクエリ文字列です。Bot Builder でサポートされているクエリパラメーターを使用して、クエリを作成します。

perPage

ページごとに表示される結果の数。

デフォルトは50です。 最大は200です。これはオプションのパラメーターです。

timezone

応答内のタイムスタンプのデフォルトのタイムゾーンはUTCです。 タイムスタンプを別のタイムゾーンに変換するには、このパラメーターを使用して新しいタイムゾーンを指定します。 これはオプションのパラメーターです。

応答ヘッダー

キー 定義
Host リクエストの送信先のドメイン名。

Date

応答が送信された日時。
Connection 現在の応答が完了したときにネットワーク接続が開いたままになるか、閉じられるかを示します。
X-Powered-By 使用されているソフトウェアなどのサーバーに関する情報。
Cache-Control リクエストと応答におけるブラウザのキャッシュポリシーを指定します。
Content-Type 応答本文で送信されるリソースのメディアタイプ。
Set-Cookie 応答を受信するシステムにCookieを作成します。

応答フィールド

キー サブキー タイプ 定義
data   配列 詳細については、Data 配列を参照してください。
per_page   数値 perPageリクエストパラメーターで指定されたページあたりのレコード数。
total   数値 エクスポート内の会話の合計数。
count   数値 現在のページ上の会話の数。
path   文字列 呼び出されるAPIのURL。
next_page_url   文字列 データの次のページへのURL(ある場合)。
scroll_id   文字列 1回の検索リクエストから追加の結果バッチを取得するために使用されるID。

データ配列

会話データを保持するオブジェクトの配列。

キー サブキー タイプ 定義
timestamp   数値 会話が行われた時刻。
conversationId   文字列 Bot Builder内の会話のID。
customer   オブジェクト コンタクトに関するデータを保持します。
  id 数値ですか? Bot Builder会話データ内のコンタクトのID。
  name 文字列 コンタクトの名前。
channel   オブジェクト 会話が行われたチャネルに関するデータを保持します。
  id 数値 会話が行われたチャネルのID。
  name 文字列 会話が行われたチャネルの名前。
  icon   会話が行われたチャネルに関連付けられたアイコン。
isReviewed   ブーリアン 会話がBot Builderの会話タブで確認されたかどうかを示します。
dfo   オブジェクト Digital Experience (DX)中の会話のケースと投稿IDを保持します。
  caseId 数値ですか? Digital Experience (DX)からのケース。
  postId 数値ですか? Digital Experience (DX)からの投稿ID。
conversationNumber   数値 Bot BuilderのInsights > 会話タブで会話に割り当てられた数値IDです。
tags   配列 会話に適用されたタグの配列。
notes   文字列 会話に関連付けられたメモ。
msgCount   数値 会話内のメッセージの数。
tracker   オブジェクト 会話の間に発生したイベントに関するデータを含むオブジェクトです。 イベントの正確な内容は会話ごとに異なります。

リクエスト例

curl --location 'https://chatbot-eu1.brandembassy.com/api/public/conversations?token=YOUR TOKEN HERE&perPage=50'

応答例

ヘッダー

キー 値の例
Host chatbot.test

Date

59}>
Connection close
X-Powered-B PHP/7.4.28
Cache-Control no-cache, private
Content-Type application/json
Set-Cookie laravel_session=eyJpdiI6IkQwalVTazhOaGNmanBkK3R0cXJ3S1E9PSIsInZhbH
VlIjoiY2ZkRkM3M1FINWQ4VE5tQmo2WkY3VXZhZlVmQ0xXUWJFNWFxbmtKZ1N2ai83dW
grNWpCQ25sejh5MmRNYUpxelhUTmlSTkJraUF4M0hBRFd1Qk1SREFNTjZpNFZySDREc
WsrK0xkOVNOSGwwT042Y3AwcGROaTRUOHh6RjVsRnoiLCJtYWMiOiJlMDRjYmFiYmUw
ZjkyNWZhZmU0MTM0OThjYTI3NDc2ZGIxMjZlNjNkOWJmNTgxOTRiOWRkMTcxNWI1MTRl
NzllIiwidGFnIjoiIn0%3D; expires=Thu, 31-Mar-2022 11:03:14 GMT; Max-Age=7200; path=/; httponly

本文

{
"data": [
 {
  "timestamp": 1719943426916,
  "conversationId": "chat;wOT4JjXiVYwsgqUaOX3VHpCQd3OzYpXZqJfCK7yzIQzTofYJh4BvD6RuB4De;df3323db2a5ca2b95767dba4fdafbeb1e31ed899",
  "customer": {
   "id": "Anne Shirley",
   "name": "Anne Shirley"
  },
  "channel": {
   "id": "",
   "name": "Talk to your bot",
   "icon": ""
  },
  "isReviewed": true,
  "dfo": {
   "caseId": "",
   "postId": ""
  },
  "conversationNumber": 13,
  "tags": [],
  "notes": "",
  "msgCount": 8,
  "customerMsgCount": 4,
  "botMsgCount": 4,
  "tracker": {
   "name": "1327-chat;wOT4JjXiVYwsgqUaOX3VHpCQd3OzYpXZqJfCK7yzIQzTofYJh4BvD6RuB4De;df3323db2a5ca2b95767dba4fdafbeb1e31ed899",
   "events": [
    {
	 "metadata": {
	  "model_id": "e3446bf187254f30b008e14cd2c003fa"
	 },
	 action_text": null,
	 "hide_rule_turn": false,
	 "confidence": 1,
	 "name": "action_session_start",
	 "event": "action",
	 "type": "session_start",
	 "timestamp": 1719943427.00903,
	 "policy": null
	},
	{
	 "metadata": {
	  "model_id": "e3446bf187254f30b008e14cd2c003fa"
	 },
	 "event": "session_started",
	 "timestamp": 1719943427.00907
    },
    {
    "metadata": {
	 "model_id": "e3446bf187254f30b008e14cd2c003fa"
    },
    "action_text": null,
    "hide_rule_turn": false,
    "confidence": null,
    "name": "action_listen",
    "event": "action",
    "type": "listen",
    "timestamp": 1719943427.00909,
    "policy": null
   },
   {
    "metadata": {
	 "model_id": "e3446bf187254f30b008e14cd2c003fa"
	},
	"name": "last customer message",
	"event": "slot",
	"value": "Hi",
	"timestamp": 1719943426
   },
   {
    "input_channel": "rest",
	"metadata": {
	 "model_id": "e3446bf187254f30b008e14cd2c003fa"
	},
	"parse_data": {
	 "metadata": [],
	 "entities": [],
	 "intent_ranking": [
	 {
	  "confidence": 0.999254524707794,
	  "name": "greetings"
	 },
	 {
	  "confidence": 0.000439087860286235,
	  "name": "disagree"
	 },
     {
	  "confidence": 0.000150558917084708,
	  "name": "Password_reset"
	 },
	 {
	  "confidence": 0.0000576797829126,
	  "name": "account_trouble"
	 },
	 {
	  "confidence": 0.000042040039261337,
	  "name": "relief"
	 },
	 {
	  "confidence": 0.000033947151678148,
	  "name": "thanks"
	 },
	 {
	  "confidence": 0.000020435854821698,
	  "name": "agree"
	 },
	 {
	  "confidence": 0.000001789070665836,
	  "name": "goodbyes"
	 }
	],
	"message_id": "454bd66a26b740bebf01b6cbb8ea055f",
	"text": "Hi",
	"text_tokens": [
	 [0, 2]
	],
	"intent": {
	 "confidence": 0.999254524707794,
	 "name": "greetings"
	},
	"response_selector": {
	 "default": {
	  "response": {
	   "confidence": 0,
	   "responses": null,
	   "utter_action": "utter_None",
	   "intent_response_key": null
	  },
	  "ranking": []
	 },
	 "all_retrieval_intents": []
	}
   },
   "message_id": "454bd66a26b740bebf01b6cbb8ea055f",
   "text": "Hi",
   "event": "user",
   "timestamp": 1719943427.02725
  },
  {
   "metadata": {
    "model_id": "e3446bf187254f30b008e14cd2c003fa"
   },
   "name": "yesOrno",
   "event": "slot",
   "value": "Hi",
   "timestamp": 1719943427.02793
  },
  {
   "metadata": {
    "model_id": "e3446bf187254f30b008e14cd2c003fa"
   },
   "use_text_for_featurization": false,
   "event": "user_featurization",
   "timestamp": 1719943427.07373
  },
  {
   "metadata": {
    "model_id": "e3446bf187254f30b008e14cd2c003fa"
   },
   "action_text": null,
   "hide_rule_turn": true,
   "confidence": 1,
   "name": "utter_eyJoYXNoIjoiYmE2ZGM2OTJjNDc1YmNkNTA0NjEyZjZiZjdkMTg5M2E3MmJiMmQ2NiIsInRpZCI6Mjc0MjAsInR5cGUiOiJtZXNzYWdlIn0=",
   "event": "action",
   "timestamp": 1719943427.07374,
   "policy": "RulePolicy"
  },
  {
   "metadata": {
    "model_id": "e3446bf187254f30b008e14cd2c003fa",
	"utter_action": "utter_eyJoYXNoIjoiYmE2ZGM2OTJjNDc1YmNkNTA0NjEyZjZiZjdkMTg5M2E3MmJiMmQ2NiIsInRpZCI6Mjc0MjAsInR5cGUiOiJtZXNzYWdlIn0="
   },
  "data": {
   "image": null,
   "buttons": null,
   "attachment": null,
   "elements": null,
   "quick_replies": null,
   "custom": {
    "payload": {
	 "buttons": [],
	 "text": "Hi, what can I help with?"
	},
   "fallback_text": ""
  }
 },
 "text": null,
 "event": "bot",
 "timestamp": 1719943427.07381
},
{
 "metadata": {
  "model_id": "e3446bf187254f30b008e14cd2c003fa"
 },
 "action_text": null, 
 "hide_rule_turn": true,
 "confidence": 1,
  "name": "action_listen",
  "event": "action",
  "type": "listen",
  "timestamp": 1719943427.07791,
  "policy": "RulePolicy"
 },
 {
  "metadata": {
   "model_id": "e3446bf187254f30b008e14cd2c003fa"
  },
  "name": "last customer message",
  "event": "slot",
  "value": "I'm at the Columbus office.",
  "timestamp": 1719943437
 },
 {
  "input_channel": "rest",
  "metadata": {
   "model_id": "e3446bf187254f30b008e14cd2c003fa"
  },
  "parse_data": {
   "metadata": [],
   "entities": [],
   "intent_ranking": [
    {
	 "confidence": 0.99,
	 "name": "nlu_fallback"
	},
	{
	 "confidence": 0.838853657245636,
	 "name": "relief"
	},
	{
	 "confidence": 0.0788173228502274,
	 "name": "thanks"
	},
	{
	 "confidence": 0.0539873205125332,
	 "name": "account_trouble"
	},
	{
	 "confidence": 0.0121194049715996,
	 "name": "agree"
	},
	{
	 "confidence": 0.00501278694719076,
	 "name": "disagree"
	},
	{
	 "confidence": 0.00474171573296189,
	 "name": "goodbyes"
	},
	{
	 "confidence": 0.00369063019752502,
	 "name": "Password_reset"
	},
	{
	 "confidence": 0.00277714524418116,
	 "name": "greetings"
	}
   ],
   "message_id": "f57ad5efaabc49e9b80a5ad5d1c54e40",
   "text": "I'm at the Columbus office.",
   "text_tokens": [
    [0, 1],
	[2, 3],
	[4, 6],
	[7, 10],
	[11, 19],
	[20, 26]
   ],
   "intent": {
	"confidence": 0.99,
	"name": "nlu_fallback"
   },
   "response_selector": {
    "default": {
	 "response": {
	   "confidence": 0,
	   "responses": null,
	   "utter_action": "utter_None",
	   "intent_response_key": null
	  },
	 "ranking": []
    },
    "all_retrieval_intents": []
   }
  },
  "message_id": "f57ad5efaabc49e9b80a5ad5d1c54e40",
  "text": "I'm at the Columbus office.",
  "event": "user",
  "timestamp": 1719943437.68959
 },
 {
  "metadata": {
   "model_id": "e3446bf187254f30b008e14cd2c003fa"
  },
  "name": "yesOrno",
  "event": "slot",
  "value": "I'm at the Columbus office.",
  "timestamp": 1719943437.6898
 },
 {
  "metadata": {
   "model_id": "e3446bf187254f30b008e14cd2c003fa"
  },
  "use_text_for_featurization": false,
  "event": "user_featurization",
  "timestamp": 1719943437.73715
 },
 {
  "metadata": {
   "model_id": "e3446bf187254f30b008e14cd2c003fa"
  },
  "action_text": null,
  "hide_rule_turn": false,
  "confidence": 1,
  "name": "action_eyJ0aWQiOjI3NDIwLCJ0eXBlIjoiYXNrX2FmZmlybWF0aW9uIn0=",
  "event": "action",
  "type": "ask_affirmation",
  "timestamp": 1719943437.73716,
  "policy": "AugmentedMemoizationPolicy"
 },
 {
  "metadata": {
   "model_id": "e3446bf187254f30b008e14cd2c003fa"
  },
  "data": {
   "custom": {
	 "payload": {
      "quick_replies": [
	   {
	    "payload": "/relief",
	    "title": "Yes"
	   },
	   {
	    "payload": "/advanced_nlu_fallback",
	    "title": "No"
	   }
	  ],
	  "text": "I am not quite sure what you are saying. Are you talking about relief?"
	 },
	"script_typing": 0,
	"msgid": "5bb71974-522f-4e3c-80a5-ebf9e23f6fbf",
	"fallback_text": ""
   }
  },
  "text": null,
  "event": "bot",
  "timestamp": 1719943437.73722
 },
 {
  "metadata": {
  "model_id": "e3446bf187254f30b008e14cd2c003fa"
 },
 "action_text": null,
 "hide_rule_turn": false,
 "confidence": 1,
 "name": "action_listen",
 "event": "action",
 "type": "listen",
 "timestamp": 1719943437.74102,
 "policy": "AugmentedMemoizationPolicy"
},
{
 "metadata": {
  "model_id": "e3446bf187254f30b008e14cd2c003fa"
 },
 "name": "last customer message",
 "event": "slot",
 "value": "I'm in the New York office.",
 "timestamp": 1719943447
},
{
 "input_channel": "rest",
 "metadata": {
  "model_id": "e3446bf187254f30b008e14cd2c003fa"
 },
 "parse_data": {
  "metadata": [],
  "entities": [],
  "intent_ranking": [
   {
    "confidence": 0.99,
    "name": "nlu_fallback"
   },
   {
    "confidence": 0.432721138000488,
	"name": "relief"
   },
  {
   "confidence": 0.401632755994797,
   "name": "account_trouble"
  },
  {
   "confidence": 0.061856634914875,
   "name": "thanks"
  },
  {
   "confidence": 0.0409050695598125,
   "name": "Password_reset"
  },
  {
   "confidence": 0.0317919477820396,
   "name": "agree"
  },
  {
   "confidence": 0.0194509346038103,
   "name": "disagree"
  },
  {
   "confidence": 0.00719568505883217,
   "name": "greetings"
  },
  {
   "confidence": 0.00444584107026458,
   "name": "goodbyes"
  }
],
"message_id": "ceff2630054d4fe4adc9cb147150d5e6",
"text": "I'm in the New York office.",
 "text_tokens": [
  [0, 1],
  [2, 3],
  [4, 6],
  [7, 10],
  [11, 14],
  [15, 19],
  [20, 26]
 ],
 "intent": {
  "confidence": 0.99,
  "name": "nlu_fallback"
 },
 "response_selector": {
  "default": {
   "response": {
    "confidence": 0,
    "responses": null,
    "utter_action": "utter_None",
    "intent_response_key": null
   },
   "ranking": []
  },
  "all_retrieval_intents": []
 }
},
"message_id": "ceff2630054d4fe4adc9cb147150d5e6",
"text": "I'm in the New York office.",
"event": "user",
"timestamp": 1719943447.09339
},
{
 "metadata": {
  "model_id": "e3446bf187254f30b008e14cd2c003fa"
 },
 "name": "yesOrno",
 "event": "slot",
 "value": "I'm in the New York office.",
 "timestamp": 1719943447.0936
},
{
 "metadata": {
  "model_id": "e3446bf187254f30b008e14cd2c003fa"
 },
 "use_text_for_featurization": false,
 "event": "user_featurization",
 "timestamp": 1719943447.15005
},
{
 "metadata": {
  "model_id": "e3446bf187254f30b008e14cd2c003fa"
 },
 "action_text": null,
 "hide_rule_turn": false,
 "confidence": 1,
 "name": "action_eyJ0aWQiOjI3NDIwLCJ0eXBlIjoiYXNrX2FmZmlybWF0aW9uIn0=",
 "event": "action",
 "type": "ask_affirmation",
 "timestamp": 1719943447.15007,
 "policy": "AugmentedMemoizationPolicy"
},
{
 "metadata": {
  "model_id": "e3446bf187254f30b008e14cd2c003fa"
 },
"data": {
 "custom": {
  "payload": {
   "quick_replies": [
    {
     "payload": "/relief",
	 "title": "Yes"
	},
	{
	 "payload": "/advanced_nlu_fallback",
	 "title": "No"
	}
   ],
   "text": "I am not quite sure what you are saying. Are you talking about relief?"
  },
  "script_typing": 0,
  "msgid": "37a3b57b-7e88-4627-ac58-4d957efcca96",
  "fallback_text": ""
 }
},
"text": null,
"event": "bot",
"timestamp": 1719943447.15014
},
{
 "metadata": {
  "model_id": "e3446bf187254f30b008e14cd2c003fa"
 },
 "action_text": null,
 "hide_rule_turn": false,
 "confidence": 1,
 "name": "action_listen",
 "event": "action",
 "type": "listen",
 "timestamp": 1719943447.15575,
 "policy": "AugmentedMemoizationPolicy"
},
{
 "metadata": {
  "model_id": "e3446bf187254f30b008e14cd2c003fa"
 },
 "name": "last customer message",
 "event": "slot",
 "value": "I report to the NYC office",
 "timestamp": 1719944386
},
{
 "input_channel": "rest",
 "metadata": {
  "model_id": "e3446bf187254f30b008e14cd2c003fa"
 },
 "parse_data": {
  "metadata": [],
  "entities": [],
  "intent_ranking": [
   {
    "confidence": 0.99,
    "name": "nlu_fallback"
   },
   {
    "confidence": 0.551150023937225,
    "name": "relief"
   },
   {
    "confidence": 0.177890375256538,
	"name": "account_trouble"
   },
   {
    "confidence": 0.0891190320253372,
    "name": "thanks"
   },
   {
    "confidence": 0.0731835886836052,
    "name": "disagree"
   },
   {
    "confidence": 0.0399214811623097,
    "name": "greetings"
   },
   {
    "confidence": 0.0349704623222351,
    "name": "Password_reset"
   },
   {
    "confidence": 0.0223926920443773,
	"name": "goodbyes"
   },
   {
    "confidence": 0.0113723818212748,
	"name": "agree"
   }
  ],
  "message_id": "77c21edc1bf14f43941af49a62a25d83",
  "text": "I report to the NYC office",
  "text_tokens": [
    [0, 1],
	[2, 8],
	[9, 11],
	[12, 15],
	[16, 19],
	[20, 26]
   ],
   "intent": {
    "confidence": 0.99,
    "name": "nlu_fallback"
   },
   "response_selector": {
     "default": {
      "response": {
	   "confidence": 0,
	   "responses": null,
	   "utter_action": "utter_None",
	   "intent_response_key": null
	  },
	  "ranking": []
	 },
	 "all_retrieval_intents": []
	}
   },
   "message_id": "77c21edc1bf14f43941af49a62a25d83",
   "text": "I report to the NYC office",
   "event": "user",
   "timestamp": 1719944386.09162
  },
  {
   "metadata": {
    "model_id": "e3446bf187254f30b008e14cd2c003fa"
   },
   "name": "yesOrno",
   "event": "slot",
   "value": "I report to the NYC office",
   "timestamp": 1719944386.09182
  },
  {
   "metadata": {
    "model_id": "e3446bf187254f30b008e14cd2c003fa"
   },
   "use_text_for_featurization": false,
   "event": "user_featurization",
   "timestamp": 1719944386.15238
  },
  {
   "metadata": {
    "model_id": "e3446bf187254f30b008e14cd2c003fa"
   },
   "action_text": null,
   "hide_rule_turn": false,
   "confidence": 1,
   "name": "action_eyJ0aWQiOjI3NDIwLCJ0eXBlIjoiYXNrX2FmZmlybWF0aW9uIn0=",
   "event": "action",
   "type": "ask_affirmation",
   "timestamp": 1719944386.1524,
   "policy": "AugmentedMemoizationPolicy"
  },
  {
   "metadata": {
    "model_id": "e3446bf187254f30b008e14cd2c003fa"
   },
   "data": {
    "custom": {
     "payload": {
       "quick_replies": [
        {
         "payload": "/relief",
         "title": "Yes"
        },
        {
         "payload": "/advanced_nlu_fallback",
         "title": "No"
        }
       ],
       "text": "I am not quite sure what you are saying. Are you talking about relief?"
      },
      "script_typing": 0,
      "msgid": "7ca4a2f2-e4c7-45b7-b90c-aee47e818e62",
      "fallback_text": ""
     }
    },
    "text": null,
    "event": "bot",
    "timestamp": 1719944386.15245
   },
   {
    "metadata": {
     "model_id": "e3446bf187254f30b008e14cd2c003fa"
    },
    "action_text": null,
    "hide_rule_turn": false,
    "confidence": 1,
    "name": "action_listen",
    "event": "action",
    "type": "listen",
    "timestamp": 1719944386.15873,
    "policy": "AugmentedMemoizationPolicy"
    }
   ]
  },
  "lastMessageAt": 1719944386159,
  "journey": "start__1-\u003Egreetings__2-\u003Enlu_fallback__3-\u003Eend",
  "transitions": [
   {
    "name": "start__1-\u003Egreetings__2"
   },
   {
    "name": "greetings__2-\u003Enlu_fallback__3"
   },
   {
    "name": "nlu_fallback__3-\u003Eend"
   }
  ]
 }
],
 "per_page": 1,
 "total": 13,
 "count": 1,
 "path": "https://bot-builder-de-na1.niceincontact.com/api/public/conversations",
 "next_page_url": "https://bot-builder-de-na1.niceincontact.com/api/public/conversations?scrollId=FGluY2x1ZGVfY29udGV4dF91dWlk[truncated]",
 "scroll_id": "FGluY2x1ZGVfY29udGV4dF91dWlk[truncated]"
}