この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

Live Agent REST API のレスポンスボディ

Live Agent REST API リソースへの要求では、応答コードが返されます。リソース要求の実行が成功すると、JSON 形式でレスポンスボディが返される場合もあります。

Availability

応答プロパティ
プロパティ名 説明 使用可能なバージョン
results Result オブジェクトの配列 エージェントやチャットボタンに対応する Salesforce ID と、新しいチャット要求を受信できるかどうかのリスト。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-0", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18"results":{
19            "type":"array",
20            "description":"List of ids and their availability",
21            "items":{
22               "name":"result",
23               "type":"object",
24               "properties":{
25                   "id":{
26                       "type":"string",
27                       "description":"The id of the entity",
28                       "required":true,
29                       "version":29.0
30                   },
31                   "isAvailable":{
32                       "type":"boolean",
33                       "description":"Whether or not the entity is available for chat",
34                       "required":true,
35                       "version":29.0
36                   }
37               }
38            },
39            "required":true,
40            "version":29.0
41        }
42}

ChasitorSessionData

応答プロパティ
プロパティ名 説明 使用可能なバージョン
queuePosition integer チャットキュー内のチャット訪問者の位置。 29.0
geoLocation GeoLocation オブジェクト 要求が開始された IP アドレスに基づく、チャット訪問者の場所。 29.0
url String チャット訪問者がアクセスしている URL。 29.0
oref String チャット要求の開始元の URL。 29.0
postChatUrl String チャットの終了後にチャット訪問者がリダイレクトされる URL。 29.0
sneakPeekEnabled Boolean チャットを受け入れたエージェントのプレビューが有効になっているかどうか。 29.0
chatMessages TranscriptEntry オブジェクトの配列 agent.js ファイルと chasitor.js ファイルで同期するチャットメッセージの構造。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        queuePosition: 1,
19        geoLocation: {
20                countryCode: "US",
21                countryName: "United States of America",
22                region: "CA",
23                city: "San Francisco",
24                organization: Salesforce.com,
25                latitude: 37.793880,
26                longitude: -122.395114
27        },
28        url: "http://yoursite",
29        oref: "http://www.google.com?q=yoursite",
30        postChatUrl: "http://yoursite/postchat",
31        sneakPeekEnabled: true,
32        chatMessages: [
33                {
34                        type: "Agent",
35                        name: "Andy L.",
36                        content: "Hello, how can I help you?",
37                        timestamp: 1376596367548,
38                        sequence: 1
39                },
40                {
41                        type: "Chasitor",
42                        name: "Jon A.",
43                        content: "I have a question for you.",
44                        timestamp: 1376596349132
45                        sequence: 2
46                }
47        ]
48}

ChatEstablished

応答プロパティ
プロパティ名 説明 使用可能なバージョン
name String チャットに参加しているエージェントの名前。 29.0
userId String チャットに参加しているエージェントのユーザ ID。 29.0
sneakPeekEnabled Boolean チャットを受け入れたエージェントのプレビューが有効になっているかどうか。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-2", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        name: "Andy L.",
19        userId: "f1dda237-57f8-4816-b8e8-59775f1e44c8",
20        sneakPeekEnabled: true
21}

ChatMessage

応答プロパティ
プロパティ名 説明 使用可能なバージョン
name String チャットに参加しているエージェントの名前。 29.0
text String エージェントがチャット訪問者に送信したチャットメッセージのテキスト。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-3", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        name: "Andy L."
19        text: "Hello, how can I help you?"
20}

ChatRequestFail

応答プロパティ
プロパティ名 説明 使用可能なバージョン
reason String チャット要求が失敗した理由 (どのエージェントもチャットすることができなかった、内部エラーが発生したなど)。 29.0
postChatUrl String チャットの終了後にチャット訪問者がリダイレクトされる事後チャットページの URL。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-4", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        reason: "Unavailable",
19        postChatUrl: "http://yoursite/postChat"
20}

ChatRequestSuccess

応答プロパティ
プロパティ名 説明 使用可能なバージョン
queuePosition integer チャットキュー内のチャット訪問者の位置。 29.0
geoLocation GeoLocation オブジェクト 要求が開始された IP アドレスに基づく、チャット訪問者の場所。 29.0
url String チャット訪問者がアクセスしている URL。 29.0
oref String チャット要求の開始元の URL。 29.0
postChatUrl String チャットの終了後にチャット訪問者がリダイレクトされる URL。 29.0
customDetails CustomDetail オブジェクトの配列 チャット要求が開始されたリリースのカスタム詳細。 29.0
visitorId String チャット訪問者の ID。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-5", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17"{
18        queuePosition: 1,
19        geoLocation: {
20                countryCode:"US",
21                countryName: "United States of America",
22                region: "CA",
23                city: "San Francisco",
24                organization: Salesforce.com,
25                latitude: 37.793880,
26                longitude: -122.395114
27        },
28        url: "http://yoursite",
29        oref: "http://www.google.com?q=yoursite",
30        postChatUrl: "http://yoursite/postchat",
31        customDetails: [
32                {
33                        label: "E-mail Address",
34                        value: "jon@example.com",
35                        transcriptFields: [
36                                 "c__EmailAddress"
37                         ],
38                        displayToAgent: true
39                }                        
40
41        ],
42        visitorId: "acd47048-bd80-476e-aa33-741bd5cb05d3"
43}"

ChatTransferred

応答プロパティ
プロパティ名 説明 使用可能なバージョン
name String チャットの転送先のエージェントの名前。 29.0
userId String チャット訪問者の ID。 29.0
sneakPeekEnabled Boolean チャットの転送先のエージェントのプレビューが有効になっているかどうか。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-6", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        name: "Ryan S.",
19        userId: "edacfa56-b203-43d5-9e1b-678278b61263",
20        sneakPeekEnabled: false
21}

CustomEvent

応答プロパティ
プロパティ名 説明 使用可能なバージョン
type String 発生したカスタムイベントのタイプ。チャット訪問者側のイベントリスナーを追加するために使用されます。 29.0
data String チャット訪問者に送信されたイベントに関連するデータ。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-7", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        type: "CreditCardEntered",
19        data: "5105105105105100"
20}

Messages

応答プロパティ
プロパティ名 説明 使用可能なバージョン
messages Message オブジェクトの配列 チャット中に送信されたメッセージ。 29.0
sequence integer チャット中に受信したメッセージの順序。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-8", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        messages: [
19                {
20                        type: "ChatEstablished",
21                        message: {
22                                name: "Andy L.",
23                                userId: "f1dda237-57f8-4816-b8e8-59775f1e44c8",
24                                sneakPeekEnabled: true
25                        }
26                }
27        ],
28        sequence: 1
29}

NewVisitorBreadcrumb

応答プロパティ
プロパティ名 説明 使用可能なバージョン
location String チャット訪問者が表示している Web ページの URL。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-9", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        location: "http://yoursite/page2"
19}

QueueUpdate

応答プロパティ
プロパティ名 説明 使用可能なバージョン
position integer チャットキュー内のチャット訪問者の更新された位置。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-10", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        position: 3
19}

ResyncSession

応答プロパティ
プロパティ名 説明 使用可能なバージョン
isValid Boolean セッションが有効か (true)、否か (false) を示します。 29.0
key String 古いセッションが再確立された後の新しいセッションのセッションキー。 29.0
affinityToken String 今後のすべての要求のヘッダーで渡される、セッションのアフィニティトークン。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-11", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        isValid: true,
19        key: "dd19849c-26df-4e21-b4cf-3aada410f35d",
20        affinityToken: "73061fa0"
21}

SessionId

応答プロパティ
プロパティ名 説明 使用可能なバージョン
id String 新しいセッションのセッション ID。 29.0
key String 新しいセッションのセッションキー。 29.0
affinityToken String 今後のすべての要求のヘッダーで渡される、セッションのアフィニティトークン。 29.0
clientPollTimeout integer Messages 要求の実行期限 (秒数)。この期限内に実行しないと、Messages long polling ループがタイムアウトして終了します。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-12", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        id: "241590f5-2e59-44b5-af89-9cae83bb6947",
19        key: 
20        "f6c1d699-84c7-473f-b194-abf4bf7cccf8!b65b13c7-f597-4dd2-aa3a-cbe01e69f19c",
21        affinityToken: "73061fa0"
22        clientPollTimeout: "30"
23}

Settings

応答プロパティ
プロパティ名 説明 使用可能なバージョン
pingrate number Live Agent 訪問者セッションを維持するために訪問者がサーバに ping する必要のある頻度。 29.0
contentServerUrl String コンテンツサーバの URL。 29.0
buttons button オブジェクトの配列 Settings 要求の実行時に指定した、チャットボタンとその設定情報のリスト。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-13", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17{
18        "pingRate":{
19            "type":"number",
20            "description":"The rate at which the visitor should ping the server to maintain presence",
21            "required":true,
22            "version":29.0
23        },
24        "contentServerUrl":{
25            "type":"string",
26            "description":"The content server URL",
27            "required":true,
28            "version":29.0
29        },
30        "buttons":{
31            "type":"array",
32            "description":"The list of buttons",
33            "items":{
34               "name":"button",
35               "type":"object",
36               "properties":{
37                   "id":{
38                       "type":"string",
39                       "description":"The id of the button",
40                       "required":true,
41                       "version":29.0
42                   },
43                   "type":{
44                       "type":"string",
45                       "description":"The type of the button",
46                       "required":true,
47                       "version":29.0,
48                       "enum":["Standard","Invite","ToAgent"]
49                   },
50                   "endpointUrl":{
51                       "type":"string",
52                       "description":"The custom chat window url of the button",
53                       "required":false,
54                       "version":29.0
55                   },
56                   "prechatUrl":{
57                       "type":"string",
58                       "description":"The prechat url of the button",
59                       "required":false,
60                       "version":29.0
61                   },
62                   "language":{
63                       "type":"string",
64                       "description":"The language setting of the button",
65                       "required":false,
66                       "version":29.0
67                   },
68                   "isAvailable":{
69                       "type":"boolean",
70                       "description":"Whether or not the button is available for chat",
71                       "required":true,
72                       "version":29.0
73                   },
74                   /* Invite related settings */
75                   "inviteImageUrl":{
76                       "type":"string",
77                       "description":"The image of the button",
78                       "required":false,
79                       "version":29.0
80                   },
81                   "inviteImageWidth":{
82                       "type":"number",
83                       "description":"The width of the button image",
84                       "required":false,
85                       "version":29.0
86                   },
87                   "inviteImageHeight":{
88                       "type":"number",
89                       "description":"The height of the button image",
90                       "required":false,
91                       "version":29.0
92                   },
93                   "inviteRenderer":{
94                       "type":"string",
95                       "description":"The animation option of the invite",
96                       "required":false,
97                       "version":29.0,
98                       "enum":["Slide","Fade","Appear","Custom"]
99                   },
100                   "inviteStartPosition":{
101                       "type":"string",
102                       "description":"The start position of the animation",
103                       "required":false,
104                       "version":29.0,
105                       "enum":["TopLeft","TopLeftTop","Top","TopRightTop","TopRight",
106                               "TopRightRight","Right","BottomRightRight","BottomRight",
107                               "BottomRightBottom","Bottom","BottomLeftBottom","BottomLeft",
108                               "BottomLeftLeft","Left","TopLeftLeft"]
109                   },
110                   "inviteEndPosition":{
111                       "type":"string",
112                       "description":"The end position of the animation",
113                       "required":false,
114                       "version":29.0,
115                       "enum":["TopLeft","Top","TopRight","Left","Center","Right","BottomLeft","Bottom","BottomRight"]
116                   },
117                   "hasInviteAfterAccept":{
118                       "type":"boolean",
119                       "description":"Whether or not invite will trigger after accepting",
120                       "required":false,
121                       "version":29.0
122                   },
123                   "hasInviteAfterReject":{
124                       "type":"boolean",
125                       "description":"Whether or not invite will trigger after rejecting",
126                       "required":false,
127                       "version":29.0
128                   },
129                   "inviteRejectTime":{
130                       "type":"number",
131                       "description":"The auto reject setting of the invite",
132                       "required":false,
133                       "version":29.0
134                   },
135                   "inviteRules":{
136                       "type":"object",
137                       "description":"The rules of the invite",
138                       "required":false,
139                       "version":29.0
140                   }
141                   /* Invite related settings */
142               }
143            },
144            "required":true,
145            "version":29.0
146        }
147    }

VisitorId

応答プロパティ
プロパティ名 説明 使用可能なバージョン
sessionId String 新しいセッションのセッション ID。 29.0
レスポンスボディ
1swfobject.registerObject("clippy.codeblock-14", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17"sessionId":{
18            "type":"string",
19            "description":"The session id of the visitor",
20            "required":true,
21            "version":29.0
22        }