getServicePresenceStatusChannels
オムニチャネルユーザのプレゼンス状況に関連付けられたサービスチャネルを取得します。API バージョン 32.0 以降で使用できます。
構文
1sforce.console.presence.getServicePresenceStatusChannels((optional) callback:function)引数
| 名前 | 型 | 説明 |
|---|---|---|
| callback | function | プレゼンス状況に関連付けられたチャネルが取得されたときにコールする JavaScript メソッド。 |
サンプルコード – Visualforce
1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17<apex:page>
18
19 <apex:includeScript value="/support/console/32.0/integration.js"/>
20
21 <a href="#" onClick="testGetChannels();return false;">
22 Get Channels Associated with a Presence Status</a>
23
24 <script type="text/javascript">
25
26 function testGetChannels() {
27
28 //These values are for example purposes only.
29
30 sforce.console.presence.getServicePresenceStatusChannels(function(result) {
31 if (result.success) {
32 alert('Retrieved channels successfully');
33 var channels = JSON.parse(result.channels);
34 //just to retrieve the first channel for example
35 alert('First channel ID is: ' + channels[0].id);
36 alert('First channel developer name is:
37 ' + channels[0].developerName);
38 } else {
39 alert('Get channels failed');
40 }
41 });
42 }
43
44 </script>
45
46</apex:page>