Unified Service Desk
Scope
Unified Service Desk is highly customizable and in conjunction with the Integration API integrators, customers and partners can implement customer specific requirements. This page helps you to start using the Integration API functionality in order to extend and customize USD, by providing examples and ideas.
For more information please refer to the documentation of the Integration API.
The usage of the integrationapi
event in RaiseCifClientEvent
is discouraged and onclicktoact
should be used instead. The integrationapi
event can still be used but customizations should be updated to use onclicktoact
.
Prerequisites
b+s Connects is configured and ready for use in Unified Service Desk. For more information please refer to the installation instructions. Knowledge of USD customization is required (how to create Action Calls, Events, Forms etc.). These examples assume the Channel Integration Framework component is called "bsConnects".
Sample: Show call notification
Level: Simple
With this USD customization, an alert is shown when a call is routed to the agent. The integrator can control what information is shown on the alert. In this example the ani, callVariable10, ECC variable user.eccVariable1 and the callType is shown.
Step 1: Create the Event "workitemCreate" on Hosted Application "bsConnects".
Step 2: Create Action Call "Show workitemCreate notification".
Property | Value |
---|---|
Name | Show workitemCreate notification |
Hosted Control | bsConnects |
Action | RunScript |
Data (copy&paste):
var eventData = [[data]];
var data = "formName=CallForm " + "%0D%0A";
data += "top=10 " + "%0D%0A";
data += "left=60" + "%0D%0A";
data += "timeout=30 " + "%0D%0A";
data += "callType=" + encodeURIComponent(eventData.ctiData.callType) + " %0D%0A";
data += "ecc1=" + encodeURIComponent(eventData.ctiData["user.eccVariable1"] || '') + " %0D%0A";
data += "ani=" + encodeURIComponent(eventData.ani) + " %0D%0A";
data += "callVariable10=" + encodeURIComponent(eventData.ctiData.callVariable10) + " %0D%0A";
if (eventData.classification === 'Customer') {
window.open("http://uii/GlobalNotification/Show?" + data);
}
Step 3: Create Hosted Control "GlobalNotification".
Property | Value |
---|---|
Name | GlobalNotification |
Unified Service Desk Component Type | Popup Notification |
Application is Global | checked |
Application is Dynamic | Yes |
Step 4: Create a Form called "CallForm" with the following XAML definition.
Property | Value |
---|---|
Name | CallForm |
Markup (copy&paste):
<Border xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:CCA="clr-namespace:Microsoft.Crm.UnifiedServiceDesk.Dynamics;assembly=Microsoft.Crm.UnifiedServiceDesk.Dynamics"
xmlns:Converters="clr-namespace:USDConverters;assembly=USDConverters"
BorderBrush="Blue" Background="#FF1B3680">
<Grid Height="auto" Width="280" Margin="1.5" Background="#666666">
<Grid.Resources>
<Converters:CommandParameterConverter x:Key="CommandParameterConverter" />
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid Background="#444444" Grid.Row="0" Height="auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60*"/>
<ColumnDefinition Width="40*"/>
</Grid.ColumnDefinitions>
<TextBlock Foreground="White" Grid.Column="0" Margin="9,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="20" TextWrapping="Wrap" FontFamily="Calibri">
<Run Text="Workitem created" />
</TextBlock>
<TextBlock Foreground="White" x:Name="lblElapsedTime" Margin="0,0,9,0" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="20" Grid.Column="1" Text="{Binding TimeoutProperty}" FontFamily="Calibri" />
</Grid>
<Grid Grid.Row="1" Height="auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Foreground="White" Margin="9,0,0,0" Grid.Column="0" TextWrapping="Wrap" FontFamily="Calibri">
<Run FontWeight="Bold" FontSize="16" Text="Data" />
<LineBreak />
<Run FontSize="16" Text="ani = [[ani]]" />
<LineBreak />
<Run FontSize="16" Text="callVariable10 = [[callVariable10]]" />
<LineBreak />
<Run FontSize="16" Text="ECC (user.eccVariable1) = [[ecc1]]" />
<LineBreak />
<Run FontSize="16" Text="Call Type = [[callType]]" />
<LineBreak />
</TextBlock>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="65*"/>
<ColumnDefinition Width="35*" />
</Grid.ColumnDefinitions>
<Button Grid.Column="1" Margin="10,9,9,9" Height="22" Width ="80" Background="Red" Foreground="Black" Command="CCA:ActionCommands.UIIEvent" CommandParameter="Cancel" AutomationProperties.Name="No">
<Button.Content>
<Bold>OK</Bold>
</Button.Content>
</Button>
</Grid>
</Grid>
</Border>
Sample: Set agent state to READY via a USD toolbar button
Level: Simple
Using this USD customization, a button can be clicked to set the currently logged in agent from NotReady to Ready on the voice channel.
Step 1: Identify your Finesse site peripheralId: https://<yourfinesseServer>/finesse/api/SystemInfo
For voice (CCE): If your peripheralId is 5075, your resulting channelId is "voice_5075". Alternatively you can provide only the starting characters "voice", to match all channels starting with channelId "voice", this will make your integration more independent of the configured Finesse Server.
Step 2: Create Action Call "Raise READY event on bsConnects".
Property | Value |
---|---|
Name | Raise READY event on bsConnects |
Hosted Control | bsConnects |
Action | RaiseCifClientEvent |
Data (copy&paste):
event = 'onclicktoact'
data = '{"request": "setAgentState", "channelId": "voice_5075", "state":"Ready", "requestId": "r123_ready"}'
Step 3: Create a Toolbar button in the Main Toolbar and add the Action Call "Raise READY event on bsConnects" as the action.
Sample: Set agent state to NOTREADY with reason code via a USD toolbar button
Level: Simple
With this USD customization a button can be clicked to set the currently logged in agent from Ready to NotReady (with a reason code) on the voice channel.
Step 1: Identify the peripheralId of your Finesse site: https://<yourfinesseServer>/finesse/api/SystemInfo
For voice (CCE): If your peripheralId is 5075, your resulting channelId is "voice_5075". Alternatively you can provide only the starting characters "voice", to match all channels starting with channelId "voice". This will make your integration more independent of the configured Finesse Server.
Step 2: Identify the Not Ready reason code you want to set. Login to https://<yourfinesseServer>/cfadmin
and navigate to Reasons. In this example the reason code is 2.
Step 3: Create Action Call "Raise NOTREADY event on bsConnects".
Property | Value |
---|---|
Name | Raise NOTREADY event on bsConnects |
Hosted Control | bsConnects |
Action | RaiseCifClientEvent |
Data (copy&paste):
event = 'onclicktoact'
data = '{"request": "setAgentState", "channelId": "voice_5075", "state": "NotReady", "reasonCode": "2", "requestId": "r456_notready"}'
Step 4: Create a Toolbar button in the Main Toolbar and add the Action Call "Raise NOTREADY event on bsConnects" as the action.