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