セッション記録リストの取得
リクエストURL
リクエストパラメータ
リクエストフィールド
| Path |
Type |
Optional |
説明 |
| robotId |
Integer |
false |
ロボットID. |
| startTime |
DateTime |
false |
開始時間。形式は yyyy-MM-dd HH:mm:ss(例:2019-12-31 00:00:00)。開始時刻と終了時刻の間隔は365日を超えてはいけません。 |
| endTime |
DateTime |
false |
終了時間。形式は yyyy-MM-dd HH:mm:ss(例:2020-01-07 00:00:00)。開始時刻と終了時刻の間隔は365日を超えてはいけません。 |
| pageNum |
Integer |
true |
現在のページ。0より大きい値。デフォルトは1。 |
| pageSize |
Integer |
true |
ページサイズ。0より大きく100より小さい値。デフォルトは10。 |
| keywords |
String |
true |
検索キーワード。 |
| keywordsSource |
Integer |
true |
キーワード検索ソース:0.すべてのセッションメッセージ(デフォルト) 1.ロボットメッセージ 2.顧客メッセージ 3.サポートスタッフメッセージ 4.顧客ID 5.顧客外部ID |
| sortFlag |
Integer |
false |
ソートフラグ:0.降順(デフォルト) 1.昇順 |
| conditionList |
Array |
true |
フィルタ条件リスト |
| conditionList[].field |
String |
true |
フィルタ条件のフィールド名 |
| conditionList[].operator |
String |
true |
フィルタ条件の演算子 |
| conditionList[].value |
Object |
true |
フィルタ条件のフィールド値。異なるフィルタ条件は異なる値の型に対応します。 |
フィルタ条件の説明
| 名前 |
フィールド |
演算子 |
値 |
| チャネル |
platform |
is |
複数選択、Array型、使用可能な整数値。 0.web 1.微信 2.Android 3.iOS 4.微博 5.api 6.多店舗 7.微信ミニプログラム 8.企業微信 |
| シナリオ |
channelId |
is |
複数選択、Array型、シナリオのID |
| ソースプラグイン |
webPluginName |
is |
複数選択、Array型、プラグイン名 |
| ソース |
src |
is |
複数選択、Array型、ソース名 |
| アプリケーション名 |
appId |
is |
String、名前の値 |
| IP所在地 |
ipLocation |
is |
String、IP値 |
| 顧客メッセージ数 |
customerMsgCount |
greater_than,less_than,is,between |
Integer、数値、例:betweenの値の型は "0,8" |
| 直接回答数 |
directResponseCount |
同上 |
同上 |
| 選択を促す回答 |
suggestQuestionCount |
同上 |
同上 |
| 選択されなかった回答 |
unSuggestQuestionCount |
同上 |
同上 |
| ロボットメッセージ数 |
robotMsgCount |
同上 |
同上 |
| マッチした回答数 |
robotRepliedCount |
同上 |
同上 |
| 未知の回答 |
unknownQuestionCount |
同上 |
同上 |
| 有用な回答数 |
usefulResponseCount |
同上 |
同上 |
| 無用な回答数 |
uselessResponseCount |
同上 |
同上 |
| サポートスタッフへの転送有無 |
isSwitchStaff |
is |
Integer, 0.なし 1.あり |
| 評価 |
surveyOption |
is |
String、評価値をセミコロンで結合。 1.未評価 2.満足 3.普通 4.不満 例: "1,2,3" |
| ### リクエスト結果 |
|
|
|
| Path |
Type |
説明 |
|
| --- |
--------- |
--- |
|
| code |
Integer |
実行結果コード |
|
| message |
String |
実行結果の説明 |
|
| paging |
Object |
ページング情報 |
|
| paging.pageNum |
Integer |
ページ番号 |
|
| paging.pageSize |
Integer |
ページサイズ |
|
| paging.total |
Integer |
総数 |
|
| data |
Array |
セッション情報 |
|
| data[].id |
Integer |
セッションID |
|
| data[].robotId |
Integer |
ボットID |
|
| data[].startTime |
String |
対話開始時間 |
|
| data[].endTime |
String |
対話終了時間 |
|
| data[].totalCount |
Integer |
対話総数 |
|
| data[].ipLocation |
Integer |
IP値 |
|
| data[].customerMsgCount |
Integer |
顧客メッセージ数 |
|
| data[].robotMsgCount |
Integer |
ボットメッセージ数 |
|
| data[].robotRepliedCount |
Integer |
ボットマッチ回答数 |
|
| data[].unknownQuestionCount |
Integer |
未知回答数 |
|
| data[].usefulResponseCount |
Integer |
有用回答数 |
|
| data[].uselessResponseCount |
Integer |
無用回答数 |
|
| data[].surveyOption |
Integer |
評価 1.未評価 2.満足 3.普通 4.不満 |
|
| data[].surveyComment |
Integer |
コメント |
|
| data[].isSwitchStaff |
Integer |
オペレーターへの転送有無 0.無 1.有 |
|
| data[].appName |
String |
アプリケーション名 |
|
| data[].channelId |
Integer |
シナリオID |
|
| data[].channelName |
String |
シナリオ |
|
| data[].directResponseCount |
Integer |
直接回答数 |
|
| data[].suggestQuestionCount |
Integer |
ガイド選択回答数 |
|
| data[].unSuggestQuestionCount |
Integer |
ガイド未選択回答数 |
|
| data[].customer |
Object |
顧客情報オブジェクト |
|
| data[].customer.id |
Integer |
顧客ID |
|
| data[].customer.nickname |
String |
顧客名 |
|
| data[].customer.ip |
String |
IPアドレス |
|
| data[].customer.province |
String |
所在省 |
|
| data[].customer.city |
String |
所在都市 |
|
| data[].customer.email |
String |
顧客メールアドレス |
|
| data[].customer.tags |
String |
顧客タグ |
|
| data[].customer.desc |
String |
説明 |
|
| data[].customer.level |
String |
顧客レベル |
|
| data[].customer.platform |
String |
チャネル |
|
| data[].customer.src |
String |
ソース |
|
| data[].customer.srcUrl |
String |
ソースURL |
|
| data[].customer.webPluginName |
String |
ソースプラグイン |
|
| data[].customer.keyword |
String |
キーワード |
|
| data[].customer.loginUrl |
String |
訪問ランディングページ |
|
| data[].customer.sessionUrl |
String |
対話開始ページ |
|
| data[].customer.orgName |
String |
会社名 |
|
| data[].customer.phone |
String |
顧客電話番号 |
|
| data[].customer.generatedChannel |
String |
カスタムチャネル情報 |
|
| data[].customer.dialogueDesc |
String |
対話説明情報 |
|
| data[].im |
Object |
IM対話情報 |
|
| data[].im.agentEnable |
Boolean |
スイッチ |
|
| data[].im.agentNickName |
String |
オペレーター名 |
|
| data[].im.sessionCode |
String |
オペレーター対話ID |
|
| data[].im.customerMsgNum |
Integer |
オペレーターサービス顧客メッセージ数 |
|
| data[].im.agentMsgNum |
Integer |
オペレーターメッセージ数 |
|
| data[].callId |
String |
カスタマーサポートシステムID |
|
| data[].dialogueDesc |
String |
対話説明情報 |
|
| data[].surveyFlag |
Boolean |
フラグ |
|
| data[].customerId |
Integer |
顧客ID識別子, 企業検索同期用 |
|
| data[].customerName |
String |
顧客名, 企業検索同期用 |
|
| data[].robot |
Object |
robot 企業検索使用用 |
|
| data[].imSubSessionId |
Integer |
オペレーターセッションID(存在する場合、表示用) |
|
| data[].transferReason |
String |
オペレーター転送経路 |
|
| ### サンプル |
|
|
|
curl --location 'http://localhost:8083/v1/sessions?email=admin%40udesk.cn×tamp=1761284418964&sign=e4fb7fee3b2c7b79c1ccfb389376632b77160266' \
--header 'Content-Type: application/json' \
--data '{
"conditionList": [
{
"field": "searchTime",
"operator": "is",
"value": "2025-10-30 00:00:00,2025-11-06 23:59:59"
}
],
"startTime": "2025-10-30 00:00:00",
"endTime": "2025-11-06 23:59:59",
"robotId": 397,
"keywordsSource": 0,
"keywords": ""
}'
レスポンス
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false,
"paging": {
"pageNum": 1,
"pageSize": 10,
"total": 2523
},
"data": [
{
"id": 129861,
"robotId": 397,
"startTime": "2025-11-05 14:29:03",
"endTime": "2025-11-05 14:29:13",
"totalCount": 2,
"ipLocation": null,
"customerMsgCount": 1,
"robotMsgCount": 1,
"robotRepliedCount": 0,
"unknownQuestionCount": 1,
"usefulResponseCount": 0,
"uselessResponseCount": 0,
"surveyOption": 1,
"surveyComment": null,
"isSwitchStaff": 1,
"appName": "Udeskサポートプラットフォーム",
"channelId": 3368,
"channelName": "システムデフォルトシナリオ",
"customer": {
"id": 1887275877,
"nickname": "湖北武漢電信(1762323074)",
"ip": "58.49.51.214",
"province": "湖北",
"city": "武漢",
"email": "58.49.51.214_1762323074_1@temp.com",
"tags": "",
"desc": "IMユーザー:ip(58.49.51.214)",
"level": "normal",
"platform": "web",
"src": "テスト対話ソースカスタム",
"srcUrl": "http://111.com",
"webPluginName": "付学文テスト",
"keyword": "",
"loginUrl": "",
"sessionUrl": "https://demo.t2.tryudesk.com/im_client/?web_plugin_id=1181&agent_id=821&src_url=http://111.com"
},
"im": {
"agentEnable": false,
"agentNickName": "",
"sessionCode": "",
"customerMsgNum": 0,
"agentMsgNum": 0
},
"callId": null,
"dialogueDesc": null,
"surveyFlag": false,
"customerId": null,
"customerName": null,
"robot": null,
"imSubSessionId": 0,
"transferReason": "未知の言い回し回数が1に等しい-1759124659",
"directResponseCount": 0,
"suggestQuestionCount": 0,
"unSuggestQuestionCount": 0
}
]
}
対話記録詳細の取得
リクエストURL
- GET /v1/sessions/:id/logs
リクエストパラメータ
パスパラメータ
| Parameter |
Type |
Optional |
Description |
| id |
int |
false |
対話記録ID. |
クエリパラメータ
| Parameter |
Type |
Optional |
Description |
| pageNum |
Integer |
true |
現在のページ, 0より大きい, デフォルトは1 |
| pageSize |
Integer |
true |
ページサイズ, 0より大きく100より小さい, デフォルトは10 |
レスポンス結果
| Path |
Type |
Description |
| code |
Integer |
実行結果コード |
| message |
String |
実行結果の説明 |
| paging |
Object |
ページング情報 |
| paging.pageNum |
Integer |
ページ番号 |
| paging.pageSize |
Integer |
ページサイズ |
| paging.total |
Integer |
総数 |
| data |
Array |
対話記録メッセージ |
| data[].id |
Integer |
対話メッセージID |
| data[].userType |
Integer |
記録の発信者タイプ, 1.ボット 2.ユーザー |
| data[].content |
String |
記録内容 |
| data[].contentType |
Integer |
記録タイプ, 1.通常テキスト 2.リッチテキスト 3.webhook選択表 4.選択リスト 5.製品展示 6.製品選択 7.微信図文メッセージ 8.ナレッジベース 9.音声 10.リンク 11.画像 12.ナレッジベース属性 13.カスタムフォーム 14.カードメッセージ 15.音声テンプレート 16.ナレッジグラフ 17.タスクツリーボタン 18.地図 19.動画 20.iframeリンク 22.ミニアプリカード, 23 カスタムフォームSDKスタイル 24 複数メッセージ 25.ナレッジベース比較カード 26.WhatsAppボタン 27.WhatsAppリスト |
| data[].sessionId |
Integer |
対話ID |
| data[].createTime |
String |
記録作成時間 |
| data[].surveyOptionId |
Integer |
評価調査, 1.有用 2.無用 |
| data[].queryResult |
Integer |
クエリ結果, 1.回答を返す 2.回答と提案を返す 3.提案を返す 4.挨拶 5.質問を無視 6.失敗を返す 7.選択を誘導 8.センシティブワード 9.サードパーティ 10.ナレッジポイントを返す 11.タスク型対話 12.ナレッジベース対話 13.サイレント 14.ナレッジベース全属性返信 15.ナレッジグラフ 16.読解回答 17.読解提案 18.読解選択誘導 19.特殊メッセージ 20.データベースQ&A 21.人間対応への意図転換 22.新タスク型対話 23.能動的連絡要請 24.企業検索 25.インテリジェントプッシュ 26.ナレッジグラフ 27.ナレッジベース比較カード |
| data[].source |
Integer |
logのソース |
| data[].questionContent |
String |
質問内容 |
| data[].answerContent |
String |
回答またはプロセスの内容 |
| data[].leadingWord |
String |
誘導文 |
| data[].questionId |
Integer |
質問ID |
| data[].sessionLogSuggestFoundResponseList |
Array |
提案質問リスト |
| data[].sessionLogSuggestFoundResponseList[].id |
Integer |
ID |
| data[].sessionLogSuggestFoundResponseList[].logId |
Integer |
記録対話ID |
| data[].sessionLogSuggestFoundResponseList[].questionId |
Integer |
質問ID |
| data[].sessionLogSuggestFoundResponseList[].questionContent |
String |
質問内容 |
| data[].recommendationGuidance |
String |
推薦誘導文 |
| data[].tags |
Array |
タグリスト |
| data[].extraAnswerContent |
Array |
その他の追加メッセージ |
| data[].extraAnswerContent[].logId |
String |
対話メッセージIDと追加情報数の連結, 例:"720937747_2" |
| data[].extraAnswerContent[].ansContent |
Object |
回答の内容 |
| data[].extraAnswerContent[].msgType |
String |
メッセージタイプ |
| data[].extraAnswerContent[].tags |
Array |
タグリスト |
| data[].extraAnswerContent[].ansType |
Integer |
クエリ結果 |
| data[].extraAnswerContent[].delayMillis |
Integer |
遅延返信時間 |
| data[].extraAnswerContent[].kmDelayMillis |
Integer |
km遅延返信時間 |
| data[].extraAnswerContent[].createTime |
String |
km遅延返信時間 |
| data[].robotId |
Integer |
ボットID |
| data[].createUserId |
Integer |
作成者ID |
| data[].logType |
Integer |
logタイプ 1:ウェルカムメッセージ,2:ボットの返信,3:プロセス,4:ユーザーが提出した質問 5.タスク型対話の返信 6.ナレッジベース 7.音声サイレント 8.能動的質問 9.満足度自動プッシュ 10.AI推薦質問 |
| ### サンプル |
|
|
$ curl 'https://km.udesk.cn/api/v1/sessions/720937747/logs?email=admin@brazil.udesk.cn×tamp=1734946080&sign=b10dcc38a34a348ad4d8b4ee07a9ae3323facf0b' -i -H 'Accept: application/json'
レスポンス
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false,
"paging": {
"pageNum": 1,
"pageSize": 10,
"total": 3
},
"data": [
{
"id": 2296218439,
"userType": 1,
"content": "你好,曹丽娜测试用机器人很高兴为您服务S1!",
"sessionId": 720937747,
"createTime": "2024-12-20 23:28:38",
"leadingWord": "猜你想问",
"tags": [
"常驻入口转人工"
],
"extraAnswerContent": [],
"robotId": 6291,
"createUserId": 4271,
"logType": 1
},
{
"id": 2296218671,
"userType": 2,
"content": "如何长生不老",
"sessionId": 720937747,
"createTime": "2024-12-20 23:29:13",
"queryResult": 1,
"source": 1,
"tags": [],
"extraAnswerContent": [],
"robotId": 6291,
"createUserId": 4271,
"logType": 4
},
{
"id": 2296218677,
"userType": 1,
"content": "找太上老君要一颗长生不老药\n吃唐僧肉\n吃人参果",
"contentType": 2,
"sessionId": 720937747,
"createTime": "2024-12-20 23:29:14",
"queryResult": 1,
"questionContent": "如何长生不老",
"answerContent": "找太上老君要一颗长生不老药\n吃唐僧肉\n吃人参果",
"questionId": 4417283,
"sessionLogSuggestFoundResponseList": [
{
"id": 647194600,
"logId": 2296218677,
"questionId": 5606105,
"questionContent": "富文本问题",
"answerContent": null,
"hitFlag": 0
},
{
"id": 647194601,
"logId": 2296218677,
"questionId": 5606106,
"questionContent": "语音问题",
"answerContent": null,
"hitFlag": 0
}
],
"recommendationGuidance": "<p>Hello, would you like to inquire about the following questions?</p>",
"tags": [],
"extraAnswerContent": [],
"robotId": 6291,
"createUserId": 4271,
"logType": 2
}
]
}