No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
preChatInit
preChatInit メソッドは、addCustomDetail リリース API メソッドを使用してチャットに渡されたカスタム詳細にアクセスするために使用します。
構文
liveagent.details.preChatInit(String chatUrl, function detailCallback, (optional) String chatFormName)
パラメータ
| 名前 | 型 | 説明 | 使用可能なバージョン |
|---|---|---|---|
| chatUrl | String | カスタム詳細を取得するチャットの URL。 | API バージョン 29.0 以降で使用できます。 |
| detailCallback | String | メソッドの完了時にコールされる JavaScript 関数の名前。 | API バージョン 29.0 以降で使用できます。 |
| (省略可能) chatFormName | String | カスタム詳細を取り込む事前チャットフォームの HTML form タグの名前。 | API バージョン 29.0 以降で使用できます。 |
応答
| 名前 | 型 | 説明 | 使用可能なバージョン |
|---|---|---|---|
| details | Object | preChatInit メソッドを使用して事前チャットフォームに格納されたすべてのカスタム詳細を含むオブジェクト。 | API バージョン 29.0 以降で使用できます。 |
details オブジェクトの構造は、次のオブジェクト例のようになります。
1{
2 "geoLocation":{
3 "countryCode":"US",
4 "countryName":"United States",
5 "longitude":-122.4294,
6 "organization":"SALESFORCE.COM",
7 "latitude":37.764496,
8 "region":"CA",
9 "city":"San Francisco"
10
11 },
12 "customDetails":[
13 {
14 "label":"Email",
15 "value":"sonic@sega.com",
16 "transcriptFields":["Email__c"],
17 "entityMaps":[
18 {
19 "fieldName":"Email",
20 "isAutoQueryable":true,
21 "entityName":"Contact",
22 "isExactMatchable":true,
23 "isFastFillable":false
24 }]
25 },
26 {
27 "label":"Name",
28 "value":"Sonic H.",
29 "transcriptFields":[],
30 "entityMaps":[]
31 }
32 ],
33 "visitorId":"251a5956-bcbc-433d-b822-a87c062e681c"
34}detailCallback
detailCallback メソッドは、preChatInit メソッドが details オブジェクトを返した後に発生する動作を指定します。
| 構文 | パラメータ | 説明 | 使用可能なバージョン |
|---|---|---|---|
|
details | preChatInit メソッドを使用してカスタム詳細が取得された後に実行されるアクションを指定します。 | API バージョン 29.0 以降で使用できます。 |