Quantcast
Channel: USD – Configuration – Microsoft Dynamics 365 and Unified Service Desk
Viewing all 109 articles
Browse latest View live

USD – Phone call, closeWindow

$
0
0

I am going to start this post with a big thank you. Thanks Srikanth your idea worked a treat. Srikanth is a good friend and fellow USD fan! Check out his blog here.

The problem I faced was connected with mark as complete on the phone call within Unified Service Desk (USD) for Microsoft Dynamics 365. The issue being that you need the form to refresh after completing a phone call as only then is the user presented with the read-only / completed version of the phone call. I describe the solution in this post.

I have attempted a few variations around this previously but none have been 100%. This variation seems to be the best solution so far. My previous attempts can be found here.

The change is simple. The steps involved are this;

  1. Create an Action
  2. Add to BrowserDocumentComplete on phone call

Step One – Create an Action

You can use a RunScript action to substitute the normal close window function with one that will close the tab “nicely” in USD. The function will need to look like this;

function closeWindow(focus) {
       location.reload();
}

My action looked like this.


Step Two – Add to BrowserDocumentComplete on phone call

Next we need to call the action, this is done from the BrowserDocumentComplete event on phone call. As shown below;

The result of this change is that after you make the phone call as complete the screen will refresh and you will then see the completed phone call.

Hopefully you will find this change useful is you face issues with mark as complete on phone call.


Filed under: USD - Configuration Tagged: Dynamics 365, Unified Service Desk

USD – Email Templates

$
0
0

I recently needed to configure my USD application to send an email based on a template. Here is how I achieved this.

The situation I faced was that I wanted a toolbar button that would send an email to a customer associated with a case. This email was to contain details of a support case I have found in the knowledge base.

I am going to assume you’re a USD “expert”! By that I mean you already have the required logic to open the case and knowledge base article. In this post I will focus only on how the email template operates.

I will present the logic of using email templates using the example I have mentioned, hopefully you will be able to review and adapt to other purposes.

For my example, I needed five actions, a toolbar button and of course an email template.

I will break this change down into the following steps;

  1. Create email template.
  2. Create action, clear data parameter.
  3. Create action, to get email template.
  4. Create action, to open new email.
  5. Create action, to inject the template details into the email.
  6. Create action, ExecuteOnDataAvailable, to pause.
  7. Create toolbar button.

Step One – Create email template

The first step was to create an email template, well I say create. I actually copied this one from the Microsoft USD sample package! The important thing to notice is how I have inserted several USD style replacement parameters into my email template.

Step Two – Create Action, clear data parameter

So why do I need this? I found that my logic could fail it I sent multiple emails within one session. The reason relates to the ExecuteOnDataAvailable action we will see in a second. What I am doing here is clearing any existing data relating to a previous email. I am effectively clearing the stage ready for this new email.

Item Description
Name CRM Global Manager – Clear Data Parameter (email)
Order 5 (The order is significant!)
Hosted Control CRM Global Manager
Action ClearDataParameter
Data name=email

Here we are simply listing the name of the parameters I want to clear from the context.

Step Three – Create action, to get email template

The next step is to create an action that will copy the email template details into the context. My action looked like this;

Item Description
Name CRM Global Manager – Get Template (SendLinkInEmailFromKM)
Order 10 (The order is significant!)
Hosted Control CRM Global Manager
Action GetTemplate
Data name=SendLinkInEmailFromKM

id=[[incident.Id]+]

Here we are providing the email template name and the ID of the entity to associate with this template for the merge operation.

At this point it might be worth considering the result of this action! Having run it we will have copied some details, they show as replacement parameters in USD. These parameters are “under” CRM Global Manager#template, so [[CRM Global Manager#template.description]] etc.

Step Four – Create action, to open new email

Now we need an action to create an email. Mine is shown below, I used a New_CRM_Page action.

Item Description
Name Email – New CRM Page (Regarding case, to customer)
Order 20 (The order is significant!)
Hosted Control Email
Action New_CRM_Page
Data LogicalName=email

regardingobjectid=[[Incident.Id]]

regardingobjectidname=[[Incident.title]]

regardingobjecttypecode=incident

Here we I am providing the name of the entity to open and the regarding details. As I will want my email to be regarding the current case / incident.

Notice that I’m not setting the “to” field. There is a reason, I will mention later!

Step Five – Create action, to inject the template details into the email

Now we need an action to use the replacement parameters we grabbed from the template. [[CRM Global Manager#template.description]].

NOTE:
When I use these I add +v into them! [[CRM Global Manager#template.description]+v]. The “v” means that we expect the template description to contain replacement parameters of it’s own and they should also be replaced.

But the code below does more than just add the template in the subject and description of the email. I am also setting the “to” field. I could have set the “to” field in my “New_CRM_Page” action, so didn’t I? The reason is connected with entity type. As on the case I have the name of the entity for the customer field. That being “account” or “contact”. But the New_CRM_Page action need the entity number, so 1 for account etc. To get round this I decide to set the “to” field using the code below.

Item Description
Name Email – RunXrmCommand (Complete Template Details)
Order Blank, I don’t care about the order on this one!
Hosted Control Email
Action RunXrmCommand
Data Some code! (Shown below)

// ** Update the subject and description of the email
Xrm.Page.getAttribute("subject").setValue('[[CRM Global Manager#template.subject]+v]');
Xrm.Page.getAttribute("description").setValue('[[CRM Global Manager#template.description]+v]');

// ** Set the email to be to the "customer", which can be a contact or an account
var toLookupValue = new Array();
toLookupValue[0] = new Object();
toLookupValue[0].id = "{[[incident.customerid.Id]+]}";
toLookupValue[0].name = "[[incident.customerid.name]+]";
toLookupValue[0].entityType = "[[incident.customerid.LogicalName]+]";
var toObject = Xrm.Page.getAttribute("to");
if(toObject != null) {
  toObject.setValue(toLookupValue);
}

Step Six – Create action, ExecuteOnDataAvailable, to pause

The RunXrmCommand I have created needs to be run only once the email page is loaded. I therefore use an ExecuteOnDataAvailable action to wait for this to happen. The value I wait for can be any replacement parameter from the email. So I opted for [[email.Id]].

Item Description
Name CRM Global Manager – Execute On Data Available (Email, ready for Template!)
Order 30 (The order is significant!)
Hosted Control CRM Global Manager
Action ExecuteOnDataAvailable
Data Milliseconds=500

[[email.Id]]

The milliseconds wait time might be optional. I just added it to hopefully be confident I’d waited long enough!

Once created you will need to add a sub-action to this action! So select sub action calls from the navigation.

Then add the RunXrmCommand action we created earlier to this ExecuteOnDataAvailable action. The result is we are simply saying execute the RunXrmCommand action after waiting for the email to load.

Step Seven – Create toolbar button

The final step is to create a toolbar button and add the actions we’ve created. My toolbar button looked like this ….

I used an image for my toolbar button. It happens to be an email icon that I thought was appropriate. You could use a different image or simply opt to have some button text.

Notice the order of the actions we’ve created. This is significant!

Also notice I have a condition on my button. As I don’t want the button to show until I have selected a knowledge base article and an incident.

In my application the final result looked like this. Clicking on the email icon loaded the email. Populated the “to” and “regarding” fields. Plus filled in the subject line and description of the email. Complete with personalised data based on the information found in the case and knowledge base article.

Hopefully you will have found this post useful. I am confident I will be adding more email templates into my application as they really help to make the agents job easier.


Filed under: USD - Configuration Tagged: Dynamics 365, Unified Service Desk

USD – Toolbar Positions

$
0
0

Until recently I have always only had my toolbars show in very specific areas of my Unified Service Desktop, but what if you’d like a toolbar to appear in the status bar or even floating your second monitor?

Normally when we create a toolbar container its display group might typically be “AboutPanel”, “CtiPanel” or “ToolbarPanel”. You can see in my USD interface below that I have pretty standard toolbars positioned in these commonly used locations.

But what other positions do we have? Maybe you could position a toolbar at the bottom of the screen in your status panel. (So StatusPanel) I quite like this one!

Or how about in the left panel (LeftPanelFill) or right panel (RightPanel).

Or maybe even you’d like a floating toolbar. Possibly one that you could position (automatically) on a second monitor. When you use the FloatingToolPanel location you may wish to resize the window, position on the screen and even move to a second monitor. (More on those things in a second.)

Tip:
FloatingToolPanel and FloatingPanel seem to be interchangeable terms!

I can even position my toolbar in a tab next to my agent scripts! By using the display group “WorkflowPanel”.

Meaning we have the following possible options (and maybe more);

  • ToolbarPanel
  • CtiPanel
  • AboutPanel
  • StatusPanel
  • LeftPanelFill
  • RightPanel
  • WorkflowPanel
  • FloatingToolPanel (or FloatPanel)

Technically you could also use “MainPanel” but I suspect that might be a little strange!! (In that circumstance, you’d be much better using a navigation toolbar rather than one linked to a toolbar container!)

Below you can see my hosted control for my main toolbar that I show in the ToolbarPanel. So the simplest way to create a toolbar in an alternative location is create a new toolbar and add which ever display group you feel works well.

But we also have a few actions that can be used to help position toolbars.

MoveToPanel

Your toolbar containers will not have a UII Action called MoveToPanel. At least not out of the box. Simply navigate to its UII Actions and add a new action called “MoveToPanel”. You can then create actions to move the location of a toolbar. Or simply run actions directly in the debugger to test the art of the possible! Below you can see me experimenting by moving my “About toolbar” to the status panel.

ReAlignWindow

The ReAlignWindow action might be useful if you use floating panels. For toolbars or anything else for that matter! As with this action I can control which display the panel shows in and its size.

See below that I have used a ReAlignWindow command to set the position and size of my floating toolbar.

Notice that I have given values for screen, top, left, width and height.

Tip:
A word of warning! I found this action works great but depending on your interface you could find the floating panel gets “hidden” behind your main USD screen. You might want to think about that as it could be confusing for the end user.

ShowToolbar / HideToolbar

These actions might be useful! They allow you to hide and show toolbars. Possibly you don’t just want a button to be hidden but everything on a toolbar. In these circumstances this action can help.

Notice that the name I give is the name of a specific toolbar not the toolbar container!

Hopefully you can see the setting toolbar locations is pretty simple. It is just a matter of you experimenting on what works well for you. I hope this has given you some ideas on how to be more creative with the placing of your toolbars.


Filed under: USD - Configuration Tagged: Unified Service Desk

USD – Loading Dynamics 365 Outside

$
0
0

Microsoft’s Unified Service Desk (USD) is a great tool for your agents but occasionally they might want to work with the Dynamics 365 full web client or in the Interactive Service Hub outside of USD. In this post I will show you how to create a button to allow agents to quickly jump from USD into Dynamics 365.

In my USD solution I have implemented a simple but effective button to allow the agents to quickly load Dynamics 365. Below you can see that I have added a Dynamics icon to my status panel. Clicking the icon will open Dynamics 365 web client in Internet Explorer outside of USD. Or opening the menu gives them the option to pick between the web client and the interactive service hub.

Note: I could have opted for other locations in my USD interface. But using the status panel was useful for several reasons. Firstly I liked the position! But more importantly the window navigation rules we will create are unlikely to clash with any existing rules.

In this post I will show you the steps involved in this simple but useful change.

  1. Upload a web resource (the icon)
  2. Create a toolbar hosted control that will display in your status panel.
  3. Create two pop up actions.
  4. Create your toolbar and buttons.
  5. Create two window navigation rules.

Tip: Obviously, you might not use the ISH. If not then adjust this logic by simple missing the actions / toolbar buttons for that out! Also, keep in mind that ISH will load in IE. I don’t know about you but I prefer to use ISH in Chrome! Again that might mean you want to skip the ISH parts of this change.

Step One – Upload a web resource (the icon)

You will first need to find and upload a suitable icon. I used this one …

Simply use customizations in Dynamics 365 to upload your icon as a web resource. (Don’t forget to publish it!)

I called mine “neil_Dynamics365_32x32_grey” you will obviously use another name!!

Step Two – Create a toolbar hosted control

Next we will want a hosted control. This is a toolbar that we are going to display in the status panel. Mine is shown below.

Field Description
Name Toolbar (StatusPanel)
Display Name Blank
Unified Service Desk Component Type Toolbar Container
Display Group StatusPanel

Once you have saved this hosted control we are going to want to add a new action. So navigation to actions and click new. Simply enter a name for your action as “Popup”. Then save it. You’ll end up with a list of UII Actions that look like this.

Step Three – Create two pop up actions

Now we need a couple of actions to load either the web client or ISH.

My first action looked like this;

Field Description
Name Toolbar (StatusPanel) – Pop Up (Dynamics 365)
Hosted Control Toolbar (StatusPanel)
Action Popup
Data url=main.aspx

My second action looked like this;

Field Description
Name Toolbar (StatusPanel) – Pop Up (ISH)
Hosted Control Toolbar (StatusPanel)
Action Popup
Data url=/nga/engagementhub.aspx

Step Four – Create your toolbar and buttons

You are now ready to build your toolbar.

In the toolbars area of USD, click new. Create your toolbar. I called mine StatusPanel Toolbar.

Having saved your toolbar you will need to navigate to hosted controls and add the hosted control we created earlier.

Now you are ready to toolbar buttons. Use the “+” to add your button.

My main button look like this. Notice that I have added the name of the image we imported in step one. (Your name will be different!)

And also, once saved, I have added the action to pop up Dynamics 365. Doing this will mean if someone clicks the icon with opening the toolbar menu then Dynamics will load in the web client.

If you don’t want to implement the ISH part of this change, you can skip to the next step! If you do then navigate to the tool bar buttons option on the button you’ve just created.

Here you now add two toolbar buttons.

My first button looked like this …. Notice that it has an order 10 and included the action to load the web client version of Dynamics 365.

My second button looked like this …. Notice that it has an order 20 and included the action to load the ISD version of Dynamics 365.

Step Five – Create two window navigation rules

The final step in this change is to create window navigation rules to force these pop ups to load outside of USD. Meaning they load in the full IE browser and are not connected to USD in any way. My first rule looked like this….

Field Description
Name Dynamics 365 from Toolbar (StatusPanel)
From Toolbar (StatusPanel)
Url Main.aspx

Note: I almost opted for just one rule. You could enter “*” here and have just one rule. Then anything that loads from the status panel will load outside of USD. That would be fine if you don’t plan on adding any additional buttons!

Route Type Popup
Destination Tab
Action Show Outside

If you are implementing ISH then a second navigation rule maybe needed. (Or use “*” for your url!) My second rule looked like this. It is essentially the same! Except the url is “nga/engagementhub.aspx”.

I hope you think this is a simple change but one you users might like.


Filed under: USD - Configuration Tagged: Unified Service Desk

USD – Enhanced Forms, Views etc.

$
0
0

Microsoft’s Unified Service Desk (USD) is a great product but I do often find I like to enhance the views and forms for editing my USD configuration. In this post I provide a link to a managed solution designed to give an improved experience when editing hosted controls, actions, toolbars etc.

My USD solution is pretty big! Meaning I often find benefit in these improvements, as they help me navigate my solution and make changes quicker. Below you will find a link to the solution I’ve created to give me that enhanced navigation.

This is a managed solution, meaning you can import it, try it and remove if you’d like to return to the out of the box navigation.

To install it, first ensure you have USD installed and then simply import.

Note: The solution below is for Dynamics 365 v8.2;

NeilsUSDConfig_1_3_0_15_managed

I have detailed some of my UI enhancements below.

Enhanced Views

On most of the USD entities I have created views which include additional columns. Also I have enabled editable grids, making quick changes easier. Below you can see an example of my view for Window Navigation Rules.

Enhanced Forms

I have “improved” most of the forms we use for editing the Unified Service Desk entities.

I have also added sub-grids for other entities. For example, on the hosted control form we can see all the action calls that use this hosted control. Or on actions I show all the toolbar buttons that use this action etc.

Below you can see my hosted controls form and how I present actions on the form. (Also notice that they are in an editable grid!)

Tip: By default you will see the out of the box information form. Use the form selector to select my form.

Quick Create Forms

I have enabled several of the USD config entities for quick create. Below you can see an example of how I have a quick create form for actions. (In the example below I am adding a new action whilst editing a toolbar button.)

Charts

I make use of charts, as an aid to filtering. For example when viewing window navigation rules I use a chart to quickly filter based on action. Or, as shown below, I filter hosted controls based on the hosting type.

Configurations

Anyone who works on a USD implementation with multiple configurations will know that their flexibility comes with a maintenance overhead. To help with this I have added configurations sub-grid on all USD entities.

For example, below you can see configurations sub-grid on my entity search form.

I have also added details and editable grids on all of the USD entities shown on the configuration form.

Hopefully you will gain some benefit from this simple solution. If you have any suggestions for further enhancement please let me know. I might try to include them!!


Filed under: USD - Configuration Tagged: Unified Service Desk

USD – Multiple Tabs and ScanForDataParameters

$
0
0

Within Unified Service Desk (USD) for Microsoft Dynamics 365 typically each entity in a session loads into one tab but we can use the allow multiple pages option to hold several pages in one tab. However, the data we will be holding will always be the last record loaded into the tab.

In many circumstances this is fine. But what if you have an agent script that runs on whatever case is selected. It is actually going to run on the last one loaded not the selected one. This can cause confusion with users! (Or worse, I could accidently create cases for the wrong customer etc.)

If you haven’t used the multiple tabs option before than I write about them here.

To resolve this “issue” what we need to do is scan for updated replacement parameters each time the content of the tab is changed. But how do we know the selection has changed and how do we avoid accidently loading the tab! (Because if we scan for data parameters and the tab isn’t open it will open!)

The solution to this issue turned out to be quite simple …. Lets look at an example.

In my USD solution I can open multiple live assist chat activities in a tab. I will use this the basis for my example. But we could be looking at a tab that supports multiple phone calls, cases or anything. The approach would be the same.

The steps involved are;

  1. Create an event (if you haven’t got it)
  2. Create an action.
  3. Add the action to your event.

Step One – Create an Event

The first thing we need is an event that will be triggered each time the chat activity being displayed is changed. Actually the event in question will be triggered every time any tab in my session is changed!

Navigate to your panel layout hosted control. Mine is called “Main Layout” yours could be called “Custom Layout”, “Panel Layout” etc!

Now under events check you have an event called “SelectedAppChanged”. If you don’t have this event simply click the “ADD NEW EVENT” button and add it.

Step Two – Create an Action

Now we need an action that will scan for changes in data parameters, mine is shown below;

Importantly my action also has a condition;

The details of my action are below;

Field Description
Name CRM Global Manager – Call Do Action (on Selected App Changed)

You could use any name!

Order I didn’t care!
Hosted Control CRM Global Manager

The name of my global manager!

Action CallDoAction
Data application=Related Chat Activity

action=ScanForDataParameters

The application will need to be set to the name of whatever tab you want to work with. Yours might be called “Case”, “Phonecall” etc etc.

“action” is set to the event we just created, “ScanForDataParameters”.

Condition “[[Selection]]”==”Related Chat Activity” && “[[Related Chat Activity.HostedControlStatus]+]”==”open”

This condition is firstly checking that “my” tab has been selected. (I don’t want to do this on every tab!). Then I check that my tab is already open, as I don’t want to trigger it loading if it isn’t open.

Step Three – Add The Action to Your Event

The final step is simple, we simply add our newly created action to the event we created earlier. As shown below.

Now each time the tab containing my related chat activities is changed the replacement parameters will be updated. Meaning any agent scripts or toolbar buttons would be running against the record the user is currently looking at not the last one loaded. You can see this highlighted from my debugger output below. Notice that the action doesn’t run when I selected a contact or account. But does fire when I change the selected Related Chat Activity. (Plus checking my replacement parameters after each change confirms that are correctly updating as expected.)

A simple change but one I hope you agree will be quite useful when using multiple tabs.


Filed under: USD - Configuration Tagged: Unified Service Desk

USD – Open Regarding Automatically

$
0
0

I was recently commuting into London when I received a message on LinkedIn. It was a Unified Service Desk question from a student at Madrid University. The question was about opening a related tab when loading a phone call. My answer is here, I hope this helps them …

You might often want to open a regarding entity when starting sessions in USD. Some examples would include;

1. Opening a regarding entity on an activity, such as opening a contact when a phone call opens.

2. Opening the customer associated with a case when we open an incident.

3. Opening the primary contact when an account loads.

In my USD application I commonly do all of these things!

The question I was asked focused on phone call, so I will explain how to achieve this using phone call as my example.

In the question the suggestion was to open the “from” or “to” record. This might work in some circumstances! But we could have multiple entries in these fields which might break the approach.  (Any activity could be “to” multiple people, uncommon with a phone call but technically possible.) Hence why I focus on the reagrdingobectid field instead. As each phone call will always be regarding just one thing! (But if required you could adapt this idea to use the first activity party in the to / from party list.)

Our next challenge is that the regarding object could be an account, lead, contact or almost anything else for that matter. We probably can’t be expected to cope with every combination but handling more than one entity will be common.

Timing will be another challenge. If we trigger an action to load the regarding before the phone call has loaded we’ll get an error. So we’ll need to ensure our action to open the regarding record is fired at the right moment.

Below you can see that in my USD system I have opened an account and phone call. The open of the account record happened automatically because the phone call loaded!

The steps involved are;

  1. Create an action to open “any” regarding entity.
  2. Create an execute on data available action
  3. Add you actions to “correct” window navigation rule.

Step One – Action to open “any” regarding entity

When I say any entity I actual mean, contact, lead or account. But you could do any is you really wanted!

My action is shown below;

Importantly I aslo added this condition;

The details of my action are;

Field Description
Name Phonecall – Open CRM Page (Regarding Phonecall – Account, Contact or Lead)
Hosted Control Phonecall
Action Open_CRM_Page
Data LogicalName=[[phonecall.regardingobjectid.type]+]

id=[[phonecall.regardingobjectid.id]+]

Condition “[[phonecall.regardingobjectid.type]+]”==”account” || “[[phonecall.regardingobjectid.type]+]”==”contact” || “[[phonecall.regardingobjectid.type]+]”==”lead”

This limits the entities I want to load!

Step Two – Execute on Data Available Action

When I run my Open_CRM_Page action I’ll need to know that the phone call has actually loaded. SO that the required replacement parameters are available to me. My execute on data available action is shown below. Notice that the data field says “[[phonecall.regardingobjectid.type]]”, I picked this field as I was going to use it in my action but to be honest any field from the phonecall entity would have worked!

Having saved your action , navigate to sub actions and add the action we created in step one.

Step Three – Add to Window Navigation Rule

I already had an window navigation rule that was used to create my phone call session. So I simply added the ExeccuteOnDataAvailable action to that. So load your navigation rule, open the actions and add. Simples!

Below you can see mine, in which I have my excute on data available action and other actions I want to run whilst my session starts!

I hope this post has answered the question I was asked. You’ll need to amend to fit your specific scenario but I hope the principle is clear.


Filed under: USD - Configuration Tagged: Unified Service Desk

USD – Customization Files

$
0
0

I was recently asked a question about Unified Service Desk! This time it was how to use customization files. In this post I will answer that question.

Customization files can be used to push custom hosted controls (etc) out to the desktop without needing to “manually” copy files to the programs directory.

The process is quite simple.

First let’s consider what happens when we create a customization file. Normally you copy any custom dll or executable files to the programs directory of Unified Service Desk. This can be quite a pain! As you may need to request system admins to copy the files for you. Plus your users may need local admin permissions to complete the copy. And ensuring the correct versions of custom files are installed in the programs directory creates a new “unnecessary” admin task.

A much cleaner solution is to use customization files. Basically your changes are included in your USD configuration, by way of a zip file. These are cached down and extracted as the USD client loads. The files are placed in AppData.

Typically your directory will be something like “c:\Users\<>\AppData\Local\Microsoft\UnifiedServiceDesk\<>\<<GUID!>>\files”. An example of one of mine is shown below.

The steps in creating a customizations file are …

  1. Zip the files.
  2. Load them into you USD configuration.

Step One – Zip the files

Copy any custom files to a suitable location. And also create an xml file called [Content_Types].xml. An example of this file is shown below. (You can create this using notepad or something!)

<?xml version="1.0" encoding="UTF-8"?>

-<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">

<Default ContentType="application/zip" Extension="xml"/>

<Default ContentType="application/zip" Extension="zip"/>

<Default ContentType="application/zip" Extension="css"/>

<Default ContentType="application/zip" Extension="htm"/>

<Default ContentType="application/zip" Extension="gif"/>

<Default ContentType="application/zip" Extension="dll"/>

</Types>

This file will define the types of files that are going to be included in the customization.zip file.

Now select the content_types file and your custom controls and create a zip file.

Step Two – Upload the Customization file into your config

Now in USD select the customization files option.

I have shown one example for a customization file in USD below. Your screen will probably look slightly different to mine! As I have customized by form!

Basically you give your file a name, version and optionally enter a description. You can then attach the zip file.

I have shown my version of the customization file form for a reason, as this will help to highlight a couple of things. IF you are using USD configurations don’t forget to add the customization file into the required configurations. (I say this as this is a step I always seem to forget!)

Secondly I wanted to point out that attaching the file is simply creating a note with an attachment. You shouldn’t directly amend this note record! But it is worth being aware of that a note is used. As the notes entity is not included in the uii schema we use with the configuration migration tool to move USD configurations from one organisation to another. Meaning you’ll probably need to upload the customizations file in each of your organisations!

After creating the customizations file your custom controls will be downloaded and extracted automatically when USD loads.

Hopefully this short post has answered the question I received on how to use customization files. Enjoy.


Filed under: USD - Configuration Tagged: Unified Service Desk

USD – Pre-fetch

$
0
0

Unified Service Desk for Dynamics 365 now includes a pre-fetch feature. But what does this do and when would we use it?

USD 3.0 introduces a pre-fetch feature. The idea being that you can display data faster by pre-fetching the entity data into the context before the “CRM” form finishes loading. We can also trigger related actions sooner by using a new event called “DataReady”.

Essentially your entity data is loaded into the context prior to the entity page actually loading. Say you load multiple tabs when a session starts, currently you will load the additional information in BrowserDocumentComplete or maybe as additional actions in a window navigation rule. This happens after the form is loaded. By enabling pre-fetch we should be able to speed the load of sessions by starting the load of related data earlier.

In my application, when an account session starts, I load the account and additionally I load a view of associated cases and the primary contact. The primary contact is loaded from my window navigation rule and the associated view of cases is from the BrowserDocumentComplete event on account. So by way of an example, let’s see if this new feature will speed the start of my sessions.

Before I started any changes I timed a few sessions opening and obtained an average time of 12 seconds. Giving me a target to improve on.

Next I altered my account, contact and associated case tabs to enable pre-fetch. This is simple enough simply open each hosted control and update the pre-fetch data option. (A new option with USD 3.0, if you can’t see the pre-fetch data option that you may need to upgrade your version of USD!)

I now re-tested my application with no more changes.

At this point I didn’t expect any improvement! As my actions hadn’t been revised in any way. But I seemed to consistently open my sessions 2 seconds faster. Happy with my sessions now opening in 10 seconds I decided to see what else I could improve!

I am running multiple actions from my window navigation rules. To move these to the DataReady event I would need to re-work the logic of my application. So I decided to focus on the actions being directly called in my BrowserDocumentComplete event.

In my account tab I had actions that were running on BrowserDoucmentComplete. I added a new event called DataReady. (As you can see below.) Simply use the “ADD NEW EVENT” button and add the DataReady event.

Next I removed my actions from BrowserDoucmentComplete and added them to DataReady instead. Meaning my new DataReady event looked like this;

Tip: If you are using USD configurations, don’t forget to add this new event into your configuration!

I then ran my application again and repeated my timings. I was surprised at the results. My sessions now took 15 seconds to load. So slower! These results surprised me so much that I removed all of my changes and tried again. Again my sessions with no changes took 12 seconds to load. With just the pre-fetch data option set I achieved 10 seconds. With the actions on my account moved from BrowersDocumentComplete to DataReady I achieved 15 seconds.

I also repeated my tests on opening my contact session. Again I had similar results to the start of account sessions. Meaning my results were consistent.

I can however see the DataReady event debugger and I have observed that the actions were being triggered sooner. Meaning we do have an additional event to associate to actions. In my example this didn’t give me a performance gain. BUT, I would stress that this is one example. Meaning you should probably test the application performance with actions in BrowserDocumentComplete and DataReady to see which works best for your specific circumstance.

Having said that using the DataReady event didn’t provide a benefit in my circumstance, I did see enabling the pre-fetch option achieve a 2 second improvement on my session load times. A 20% increase. Which was very nice!


Filed under: USD - Configuration Tagged: Unified Service Desk

USD – RunAsync on CreateEntity

$
0
0

A new version of Microsoft’s Unified Service Desk (USD) for Dynamics 365 has recently been released, V3.0. This new version contains a feature to run CreateEntity actions asynchronously. I will explore this new capability in this post.

The CreateEntity action is used to create records in Dynamics 365 from USD. This can be used for many purposes, if you haven’t used this action before you can find an example here. In my example I create a phone call and then load the newly created activity record. This is possibly a great example of when we’d want the CreateEntity action to run synchronously! As I will need to capture the GUID of the newly created record to allow me to open it.

But there are times when all I want to do is insert a new record and waiting for the create action to complete will therefore needlessly add an overhead. Granted the impact of a CreateEntity action can be quite minimal. Although I did recently discuss the need to create records in an entity with many millions of rows and multiple alternate keys. An insert to a table like that could have serious performance implications.

To explain this action, let’s consider a different example. In my application I also create “audit” records. These simply contain details of the session and are created when I close sessions. In this example I would quite happily fire and forget the create action, as I don’t need to interact with the newly created records.

To alter my CreateEntity action to run asynchronously I simply add “RunAsync=True” to the action. As shown below.

Great so now my CreateEntity action will run without potentially slowing the start of the next action.

But I would like to point out the important difference in the results. Below you can see a similar CreateEntity action without the “RunAsync=True” setting. Notice that the results column contains the GUID of the record it just created.

Now lets look at the results from my action using “RunAsync=True“. Below you can see that the results column does not contain the GUID of the newly created record. Also notice that the duration is “significantly” smaller. Actually in my application I doubt anyone would notice this change! Although in other examples the create might take longer or if you need to execute large numbers then the impact would be noticeable.

One final observations, Microsoft’s technical details contain the following note. It explains that the associated sub-actions and subsequent actions do not wait for the CreateEntity action to complete. Perfect, as that is exactly what I needed. It is suggested that you could use an ExecuteOnDataAvailable action if you need to wait for the create. That would certainly work, although I would suggest a better approach would be simply not to use “RunAsync=True“!

Even though the performance gains maybe minimal I will be adding “RunAsync=True” to all my creates that don’t need interaction with the created record. Multiple small gains can really help to make the entire solution feel more responsive. Enjoy.


Filed under: USD - Configuration Tagged: Unified Service Desk

USD – Toolbar Shortcut Keys

$
0
0

Unified Service Desk (USD) for Microsoft Dynamics 365 has recently been updated. The new version (v3.0) includes a new feature to add shortcut keys to toolbar buttons. I will demonstrate this feature in this post.

We have had the capability to add shortcut keys to actions for some time! This new release extends this capability to toolbars buttons. Something I think is really useful and intuitive for end users.

Below you can see how I’ve used this new feature on all of my toolbar buttons.

For example, In my application I have a button which loads a list of cases an agent is currently managing. They can now select this option by clicking on it from the menu or as the tooltip suggests they can simply type Crtl+Alt+c.

Achieving this is incredibly simple! Below you can see my toolbar button and the new Shortcut Key field. I have simply entered the keys I wanted. I have then added them into my tooltip field, so the user can easily see what key combination has been applied to this button.

This might be an incredibly simple change but adding shortcut keys can greatly aid operators select options quickly.

One of the advantages, in my opinion, to adding shortcuts to toolbar buttons rather than actions is one button will normally run multiple actions.

Note:
One limitation I have found is that once a “CRM” form has focus the shortcut keys do not operate. They only operate as you navigate around USD outside of your forms.

This is a usability change I would encourage anyone who is upgrading to USD v3.0 to include into their application. Enjoy.


Filed under: USD - Configuration Tagged: Unified Service Desk

USD – Outbound Phone Calls From a List

$
0
0

This week I gave a presentation in Dublin about Microsoft’s Unified Service Desk (USD) for Dynamics 365. At the end of the presentation I was asked a great question about how to automatically pop the next phone call for an agent making a list of outbound calls. I love great USD questions! So during my flight home I started to design a solution to this problem. In this post I will document the approach I’ve now implemented.

I already had a tab called “My Work”. In this I display lists of items that need to be worked on. Such as “My Phone Calls” or “My Cases” etc. Operators should ideally open the first item in the list and once completed progress to the next. Initially in my application this involved the operator repeatedly selecting the top item.

But what I now wanted to implement was a “batch” approach, when the first phone call in the list would be presented to the operator. And once that phone call  was closed the next phone call would load and so on. Until either the agent decides to stop making calls or the list is complete. This problem presented me with several challenges, firstly how to repeatedly get the first item from the list. And secondly how to load the selected record. (This was actually the easy bit!) Next I needed to give the operator an easy way to exit the batch mode. As otherwise they’d be stuck in an endless loop and never be able to take a break!

This is not a simple USD change! I am going to assume you already have a good understanding of how USD works, sorry. But to aid my explanation of how this change operates I have created a short demo video. Hopefully seeing this may give you ideas on how to adapt / improve this for your own applications! My intention here is to provide some guidelines on how you might use entity searches to automate the process of making outbound phone calls. (But the same concept could be adapted for any list of “work” that need to be processed, For example, maybe you could adapt this idea for agents who have lists of cases to action!)

Important Note: As already mentioned I already have a tab called “My Work”. In this tab I show a view of “My Phone” calls. Clicking on a phone call will open it in a session. I am not going to explain how to create that functionality in this post! I am therefore assuming that you can already open phone calls manually one by one. (This means I already have the required window navigation rules to open phone call sessions, load the required agent script etc.)

The parts of my solution include;

  1. Entity Search
  2. Actions
    1. Action One – Do Search for next phone call
    2. Action Two – Pop phone call found with search
    3. Action Three – Display message when batch is complete
    4. Action Four – Set Batch Mode, False
    5. Action Five – Set Batch Mode, True
    6. Action Six – Refresh my work tab
    7. Action Seven – Close My Work Tab
  3. Toolbar Buttons
    1. Toolbar Button One – My Phone Calls List
    2. Toolbar Button Two – Start Batch Mode
    3. Toolbar Button Three – End Batch Mode
  4. Events
    1. Event One – DeskTopReady
    2. Event Two – Session Closed

Entity Search

First of all I needed an entity search, this would be used to find the first phone call in my phone calls view. If you haven’t used an entity search before, these are simply fetchXML queries that can be run from USD actions. My search is shown below.

Tip:
One simple way to get the FetchXML for an entity search is to create your query using advanced find and then use the “Download XML” button. (To create my query I opened the “My Phone Calls” view in advanced find and downloaded the FetchXML!)

My entity search looked like this …

Here is a copy of my fetch command;

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" >
<entity name="phonecall">
<attribute name="activityid"/>
<order descending="false" attribute="scheduledend"/>
<filter type="and">
<condition attribute="statecode" value="0" operator="eq"/>
</filter>
<link-entity name="activityparty" alias="aa" to="activityid" from="activityid">
<filter type="and">
<condition attribute="participationtypemask" operator="in">
<value>2</value>
<value>1</value>
<value>9</value>
</condition>
<condition attribute="partyid" operator="eq-userid"/>
</filter>
</link-entity>
</entity>
</fetch>

Actions

Several new actions where required, I will describe each one in detail below. Afterwards I will then explain how these were added to events and toolbar buttons to achieve the results shown in my demo video.

Action One – Do Search for next phone call

The first action you will need is used to trigger the entity search I described above. My action is shown below.

Notice the line “maxcount=1”. This is important as I only ever want to return the first record, hence I will always return one or zero records.

The table below give details of each field in this action;

Field Details
Name CRM Global Manager – Do Search (MyPhoneCallsBatchMode)
Order 20
The order is significant. (It should make sense later in this post! When I describe which toolbar buttons / events will include these actions.)
Hosted Control CRM Global Manager
Action DoSearch
Data name=MyPhoneCallsBatchMode
maxcount=1
The name is the name of my entity search. The maxcount field will ensure only one row is returned.
Condition “[[$Settings.PhoneCallBatchMode]g]”==”true”
The purpose of this condition is to ensure that the search is only executed when working in batch mode. As it will be possible to load one phone call after another. Or one at once.

Action Two – Pop phone call found with search

When the search returns a phone call I will want to open it. This action will pop up the phone call.

Being an “Open_CRM_Page” action from the “My Work” tab is important! As I already have a window navigation rule that will create a session for any phone call loaded from the “My Work” tab.

The table below give details of each field in this action;

Field Details
Name My Work – Open CRM Page (Popup Phonecall, Batchmode)
Order 30
The order is significant. (It should make sense later in this post! When I describe which toolbar buttons / events will include these actions.)In this case the order of 30 is used so that this action happens after the entity search.
Hosted Control My Work
Action Open_CRM_Page
Data LogicalName=phonecall
id=[[MyPhoneCallsBatchMode.activityid]g]
Logical name is for the phone call entity. The ID field is the GUID for the phone call returned by the entity search.
Condition “[[$Settings.PhoneCallBatchMode]+g]”==”true” && “[[$Return.CRM Global Manager – Do Search (MyPhoneCallsBatchMode)]+g]”==”1”
The purpose of this condition is to only try to load the CRM page if we are working in batch mode and also a record has been returned by the entity search.

Action Three – Display message when batch is complete

Next I needed an action that will display a message if the search returns no results. This could happen in two circumstances! Either the last phone call has been made or someone tries to start a batch and no phone calls exist.

The table below give details of each field in this action;

Field Details
Name CRM Global Manager – Display Message (BatchMyPhoneCalls, Batch End)
Order 30


The order is significant. (It should make sense later in this post! When I describe which toolbar buttons / events will include these actions.)In this case the order of 30 is used so that this action happens after the entity search.

Hosted Control CRM Global Manager
Action DisplayMessage
Data text=All phone calls have been processed
caption=PHONE CALLS COMPLETE
Condition “[[$Settings.PhoneCallBatchMode]+g]”==”true” && “[[$Return.CRM Global Manager – Do Search (MyPhoneCallsBatchMode)]+g]”==”0”
The purpose of this condition is to only display the message if we are working in batch mode and also no records have been returned by the entity search.

My display message action has a sub action. You get to sub actions from the navigation bar. (As shown below.)

Below you can see that the display message action has a sub action called “CRM Global Manager – Save Setting (PhoneCallBatchMode, false)”. This action is used to ensure batch mode is cancelled if no more phone call records exist. I haven’t yet described how top create this action! So we’ll look at that next!!

Action Four – Set Batch Mode, False

The next action is used to save a user setting that batch mode is not active. I use user settings as these are global and not linked to any specific session.

The table below give details of each field in this action;

Field Details
Name CRM Global Manager – Save Setting (PhoneCallBatchMode, false)
Order 10


The order is significant. (It should make sense later in this post! When I describe which toolbar buttons / events will include these actions.)

Hosted Control CRM Global Manager
Action SaveSetting
Data name=PhoneCallBatchMode
value=false
Condition N/A

Action Five – Set Batch Mode, True

The previous action was used to cancel the batch mode, so this action is the reverse as it will be used to flag that batch mode is active.

The table below give details of each field in this action;

Field Details
Name CRM Global Manager – Save Setting (PhoneCallBatchMode, true)
Order 10


The order is significant. (It should make sense later in this post! When I describe which toolbar buttons / events will include these actions.)

Hosted Control CRM Global Manager
Action SaveSetting
Data name=PhoneCallBatchMode
value=true
Condition N/A

Action Six – Refresh my work tab

I have described that I already have a “My Work” tab that contains a list of phone calls. When in batch mode I still show this tab. As each call is completed I will want to refresh the tab to ensure the latest information is shown.

The table below give details of each field in this action;

Field Details
Name My Work – Refresh (Conditional, BatchMyPhoneCalls)
Order 40


The order is significant. (It should make sense later in this post! When I describe which toolbar buttons / events will include these actions.)

Hosted Control My Work
Action Refresh
Data N/A
Condition “[[$Settings.PhoneCallBatchMode]g]”==”true”
This condition ensures that the “My Work” tab is only refreshed when we are in batch mode.

Action Seven – Close My Work Tab

This is a simple action, it is used to close the my work tab when we exit batch mode.

The table below give details of each field in this action;

Field Details
Name My Work – Close
Order N/A
Hosted Control My Work
Action Close
Data N/A
Condition N/A

Action Eight – My work find

I actually already had this action! It is used to display the list of “My Phone Calls” in the “My Work” tab. But as I use it in toolbar buttons in this alteration I have included it for completeness.

The table below give details of each field in this action;

Field Details
Name My Work – Find (Phonecall)
Order N/A
Hosted Control My Work
Action Find
Data phonecall
Condition N/A

Toolbar buttons

Below I describe the toolbar buttons required. You will probably locate these on different toolbars to me! But regardless of the position you use the logic of the buttons is what matters.

Tip:
I actually repeated some of my buttons, as I have given the user the ability to stop batch mode from multiple positions in my interface.

Below you can see that I have three buttons. One which simply opens the My Work tab “normally”, so not in batch more. The second starts batch mode. And the third allows the user to stop batch mode. (Maybe when they need to take a break!) In the following sections I will describe all three of these buttons.

Toolbar Button One – My Phone Calls List

My first toolbar button simply opens the “My Phone Calls” view in the “My Work” tab. I had this button originally but needed to make one change, as I wanted to ensure batch mode wasn’t active.

This toolbar button basically triggers two actions;

  • CRM Global Manager – Save Setting (PhoneCallBatchMode, false)
  • My Work – Find (Phonecall)

Toolbar Button Two – Start Batch Mode

The Start Batch Mode button included five actions (with the order being significant!);

  • CRM Global Manager – SaveSetting (PhoneCallBatchMode, True)
  • CRM Global Manager – Do Search (MyPhoneCallsBatchMode)
  • My Work – Find (Phonecall)
  • CRM Global Manager – Display Message (BatchMyPhoneCalls, Batch End)

Notice that I added an image. Mine was called “neil_play”, yours would have a different name. Maybe “new_play” if you are using the default publisher. Adding the icon is optional, if you want to include an icon you’ll simply need to import a suitable image file as a webresource in customizations.

The condition is important, as I didn’t want the “start batch mode” option to be available if the batch mode was already active.

“[[$Settings.PhoneCallBatchMode]g]”==”false”

Toolbar Button Three – End Batch Mode

The end batch mode button simply contains two actions. One will close the “My Work” tab and the other changes the user setting so that batch more is no longer active.

The effect of this means that when the user closes the current session the we will no longer try to open a new session. The actions are therefore;

  • My Work – Close
  • CRM Global Manager – Save Setting (PhoneCallBatchMode, false)

Again I added an image to this button, which is optional.

Notice that I have a condition so this button is only enabled when in batch mode.

“[[$Settings.PhoneCallBatchMode]g]”==”true”

Events

Event One – DeskTopReady

I needed to add actions to just two events. Firstly on DeskTopReady of CRMN Global Manager (so the load of USD), I wanted to ensure that batch mode wasn’t enabled. This was to avoid any issues of batch mode being active previously when USD had been closed. I simply added one action to my DeskTopReady event “CRM Global Manager – Save Settiing (PhoneCallBatchMode, false)”.

Event Two – SessionClosed

The next event I change swas my “SessionClosed” event on the session tabs. As when in batch mode I wanted the close of a session to trigger a search and potentially start a new session as required.

Below you can see that I added the following actions to my SessionClosed event;

  • CRM Global Manager – Do Search (MyPhoneCallsBatchMode)
  • CRM Global Manager – Display Message (BatchMyPhoneCalls, Batch End)
  • My Work – Open CRM Page(Popup Phonecall, Batchmode)
  • My Work – Refresh (Conditional, BatchMyPhoneCalls)

The result being a search is preformed, if no results are found a message is given. If a record is found a new session is started containing that phone call. Then the refresh command will ensure the “My Work” tab is kept current.

This is a complicated change! I have documented it not thinking you will follow it exactly. The idea was really to give an outline of how I have implemented this feature and therefore allow you to “steal” the design concept and adapt for your own purposes. Hopefully this approach will have shown some inventive ways to use user settings, entity searches etc. Enjoy.


Filed under: USD - Configuration Tagged: Unified Service Desk

USD – Configuration Migration (From V9.0 Onwards)

$
0
0

With Unified Service Desk for Microsoft Dynamics 365 you will want to migrate your configuration from say development to production. Recently there have been some changes in this area, so in this post I will describe the process and offer some tips along the way.

Tip: If you would like to skip to what has changed, just read the prerequisites section of this post!

The concept of moving “software” from one server (or in our case Dynamics 365 organisation) is simple enough. Often you will have a three system scenario. Developers will make changes in the development server, tester (or the business) will check these changes on a user acceptance server and then finally we have the live production environment. Because of this moving the USD configuration from one environment to another is going to be an important and essential step.

Keep in mind that the USD configuration is a little different to “normal software”. As it is simply data you are moving from organisation to another. We therefore need to use the “Configuration Migration Tool” provided by Microsoft. (More on that soon!)

In this post I will explain, any prerequisites, how to export the configuration and how to import it. Additionally I will mention a few tips along the way. (Some things I have found from experience that are worth watching out for.)

Prerequisites

Note: If you have previously been migrating your configuration from organisation to organisation without any issue and suddenly you can’t the reason might be that you need to download a new version of the configuration migration tool. I will explain the revised process for this below.

Before you can export or import your USD configuration you will need to download the configuration migration tool. Recently Microsoft made some changes to the authentication process, meaning if you have an old copy of this tool you will find it no longer connects to newer V9.0 Dynamics 365 instances. (Basically the October 2017 release onwards.)

You will find the migration tool in the Developer Guide (formerly known as Dynamics 365 SDK.). Recently the approach to the SDK has also been changed! No longer do we download the entire SDK. Instead it is accessed online as the Developer Guide. You will find the Developers Guide at this location (As a Dynamics 365 developer you may want this in your favourites!) ;

https://docs.microsoft.com/en-gb/dynamics365/customer-engagement/developer/developer-guide

Within the Developer Guide you will find a really useful section on Unified Service Desk. (Something else I suggest you add to your favourites!) The link to access that directly is shown below;

https://docs.microsoft.com/en-gb/dynamics365/customer-engagement/unified-service-desk/unified-service-desk

Before we start we need the migration tool. In the Developer Guide you will find a section called “Additional resources” and within that you’ll find an option headed “Tools on NuGet”. You can access this page directly here.

The tools available include;

  • Code generation tool
  • Configuration migration tool
  • Package deployer
  • Plug-in registration tool
  • SolutionPackager tool

Right now we are only interested in the migration tool but you might as well download all of the tools. You might need them later!

The new process to extract the tools is documented on the “Download tools from NuGet” page. It is simply a case of loading PowerShell, changing directory to the target location and then running the script provided. (Just copy and paste it into PowerShell!)

In my case I wanted the tools in my documents directory, so you can see below that I have loaded PowerShell and typed “cd c:\users\neilp\documents”.

Having done this I pasted in the script provided and pressed enter. A few seconds later a directory called “tools” was created. You will find the configuration migration tool in this directory.

Export Configuration

Now you have the migration tool you will need the default XML schema definition for the entities that make up your USD configuration (USDDefaultSchema.xml).

Microsoft’s guide on exporting the USD configuration can be found here.

The process to find the schema file is to download the SDK!! You can find that page here. When you run the download you will only need the “MicrosoftDynamicsCRM2016UII.exe” file.

Once downloaded extract the contents. You will then find the “USDDeafultSchema.XML” in a folder called “USD Develeoper Assets\USD Configuration Tool Schema”

Before we start …. You may need to be aware that the Schema does not include the notes entity. The reason being that the migration tool does not filter the data exported! Meaning if it tried to export notes all the notes in your entire organisation would be exported. Why do I mention this? It is important because if you use customization.zip files in your configuration these are actually stored as attachments on notes. So they aren’t going to get exported. You will need to migrate these manually.

The process to use the schema and migration tool is documented below;

Step One: Load the migration tool. Simply open the Configuration Migration tool, locate the “DataMigrationUtilty” application and run it.

Step Two: Select the export option and click continue.

Step Three: Login

Tip: A useful tip at this stage is to ALWAYS select the “Display list of available organizations”. If you don’t your default organization will be selected. That is typically going to mean your production environment and may not be the one you want!!

Step Four: If you ticketed the display available organizations option, pick your organization.

Step Five: Enter Schema and data file names.

Select the USDDefaultSchema.xml file you downloaded and define the name of the data file to export. (The default is data.zip!) When ready click “Export Data”.

Step Six: Wait for the export to run!

There will now be a pause whilst your configuration is exported to the data file. Once completed you can click Exit.

Your data.zip file will now be ready to import into another organisation. See details below.

Import Configuration

Before I describe the import process it might be worth considering what the migration tool will actually do! It is “simply” exporting data from one organisation and importing into another. If you think about that, it implies it will only insert or update data records. No data is removed.

The fact that data isn’t removed actually presents a challenge. Say you want to delete a load of actions that are no longer required, the migration tool will not do this.

Additionally when it updates a record it will need to uniquely find the record to update. This seems to be typically done using a combination of “order” and “name”. You need to be aware of this as changing the order or name of things can result in unexpected duplicates.

For this reason I often delete the existing configuration before I import a new one. You can simply do this by selecting all of your hosted controls (etc) and clicking delete. I will often open and delete everything from each USD option in turn, so hosted controls, actions, scriplets etc etc.

Tip: For hopefully obvious reasons, it is a good practice to export a copy of your existing configuration before you remove it!

The one I often skip is the configuration option. As removing that will remove the configuration from all the associated users. I typically don’t want to do that!

Tip: If you take this approach, be aware that “agent script answers” and “toolbar buttons” are two entities that won’t get cleared. As far as I can tell the out of the box cascade rules do not delete these when their parent record is removed. To get round this, you can use advanced find to open these entities and remove from there.

The steps for the import are as follows;

Step One: Load the migration tool. Simply open the Configuration Migration tool, locate the “DataMigrationUtilty” application and run it.

Step Two: Select the import data option and click continue.

Step Three: Login.

Tip: A useful tip at this stage is to ALWAYS select the “Display list of available organizations”. If you don’t your default organization will be selected. That is typically going to mean your production environment and may not be the one you want!!

Step Four: If you ticketed the display available organizations option, pick your organization.

Step Five: Select the zip file you need to import. Then click import.

Step Six: Wait for the import to run! Then click Exit.

You import should now be completed and the configuration migrated. One tip I have at this point is to do something I always do! And that is to check the row count on all of my hosted controls, actions, etc. As I like to be confident the import was 100% successful. I therefore like to check the number of rows in my source organization with the row count in my target. Granted this might be unnecessary! But it does give me confidence everything is good.

Something else that might be useful to know is that the migration tool exports all of the rows in a given entity, this includes all active and inactive records. So you might want to check inactive records as well as active.

I hope this post will have helped people understand the migration process and how it has recently changed. The first time I did this the steps involved felt quite complicated. But after a few times it does become a routine and simple process.

USD – Toolbar Icons (Using Unicode or Emoji Characters)

$
0
0

This is a simple blog post but one I hope USD fans will find useful …. In this post I will explain how to show images / icons in your toolbar without needing to create a web resource.

I take no credit for this! I have recently been helping a college and fellow USD Fan learn USD. Mathew Raby from PowerObjects had used this approach in one of his first toolbars. I thought it was a simple / cool “trick”, hence this post. Thanks Mathew.

This maybe simple but if you haven’t tried this approach you might want to experiment with it. And you can use it in much more than just toolbars.

Tip: you can also copy / paste emoji characters to work in the same way!

I firmly believe having a pleasing interface matters! And making use of icons / images is an important part of that. Normally when we add an image to a toolbar button in USD we use a web resource and include it as the image on the toolbar as shown below;

Within USD my toolbar looks like this …

This approach works perfectly and allows you to include colour images etc. But is there a quicker simply way to achieve a similar effect?

There are a few sites you can find Unicode characters. The link below is the one I have used in this example. (Many others exist!)

http://jrgraphix.net/r/Unicode/2600-26FF

Simply find an icon you like and copy and paste it! Then remove your existing icon (if you have one.) See below how I changed my button.

Being simply a character I can use this in any text field. Therefore I have also added the “image” to my tooltip. I even altered my tab name.

Below you can see the result of my change. Notice that the phone “icon” is now shown as my toolbar button, tooltip and also in the tab name of my phone call.

Notice that the phone character displayed slightly differently in my application, within my browser and maybe even on this blog post you are viewing! When using USd I believe the way they show will be consistent but this might mean you need to experiment to find the best looking character to use. But I actually like the end result.

Obviously using a character as an icon has some downsides.

  1. You can’t effect the size. If generally you want roughly 16×16 icons I think the character approach should work quite well. But larger icons will require an actual image.
  2. You can’t have rich colours / shading etc. In my toolbars I like to keep things simple. I tend to favour grey / black icons. Therefore using a Unicode Character is a reasonable replacement. But if you like your icons to make use of colour then the Unicode approach might be limiting.
  3. Images are more flexible as they can be more varied.

But having said this, using Unicode characters for commonly used “icons” in your toolbar is quite a simple approach. You will find them great for things like back / forward arrows etc. And they are simple to use and I really like the idea of using them in tab names and other areas we might not commonly be able to include images.

I said this was a simple idea ….. but aren’t they sometimes the best? Thanks Mathew Raby.

USD – InternetExplorerPooling

$
0
0

Unified Service Desk (USD) version 3.2 contains a new options called “InternetExplorerPooling”. But what impact will this option make?

To enable IE Pooling you simply create a UII option called “InternetExplorerPooling” with a value of true.

The Microsoft release notes explain that we can experience enhanced performance of CRM entity page loading in Unified Service Desk with the Internet Explorer Pooling feature.

Unified Service Desk always maintains a pool of Internet Explorer instances for hosted controls to use. Opening a hosted control using a pooled Internet Explorer instance enhances the performance of the Unified Service Desk.

NOTES:

  • The Internet Explorer pooling feature supports only CRM entity pages hosted in CRM page hosted control.
  • When you enable the pooling feature and open a CRM page hosted control, you can see in Task Manager that Unified Service Desk creates a number of Internet Explorer process instances for hosted controls to use.
  • The performance of the Internet Explorer pooling feature is dependent on the resources available on the client computer.

So …. Assuming you are using IE Process hosted controls your CRM pages will load faster. “Dependent on the resources available”.

Great. BUT …..

Microsoft don’t make any comment on the possible performance gains. So I wanted to quantify an actual real-world example. Obviously every system will be different and the benefits you gain will vary. But I wanted to test in my USD instance to give a sense of the possible performance gains. I wanted to know if the performance enhancements are  significant or marginal.

In my test I started a session and then closed it again. My config is pretty complicated involving loading a contact and account record. Plus creating a phone call and opening that. I also do loads of other “stuff”! Additionally (importantly), when my sessions close I write out some audit information. This audit information contains the duration of my session. So I could use that to compare my test results.

To ensure my test was as accurate I repeated it 40 times. 20 without the new InternetExplorerPooling option and 20 with it. I then took an average timing.

Initially each test cycle took an average of 38 seconds. After adding the new parameter my average test cycle reduced to 27 seconds. Meaning I achieved a 28% speed improvement.

With this kind of performance gain I strongly recommend you try this, ASAP! Obviously the number of CRM Pages being loaded will impact your results. As will the resources available on the local client. But my results suggest you should see a tangible improvement. Enjoy.


USD and PowerApps

$
0
0

Unified Service Desk (USD) can be combined with PowerApps! But why would I want to do this and how could it be achieved?

In my opinion including PowerApps in USD can be a very useful / powerful feature.

Imagine you need a custom form within USD. You have several options, firstly you could use a “CRM” form. But a CRM form might not provide exactly the interface you require. Next we have USD forms, these can be really useful for simple notifications but adding conditional logic can be challenging. Normally when these approaches aren’t ideal your only remaining option would be to develop a custom hosted control.

Custom hosted controls have many advantages! Including the facts that they perform well and can be customized to provide exactly the experience you wish to deliver to your users. But they do need to be “developed”! Meaning someone with .net skills will need craft your solution, this development takes time.

I therefore investigated the concept of consuming PowerApps directly within Unified Service Desk, as this might provide a new alternative. One that would allow me to create a powerful interface quickly without the need for custom code.

I can think of many reasons to leverage PowerApps within USD. Some reasons include;

  1. I’ve often needed to create a custom approach to verification of a customer. Having loaded a contact we typically need to verify we are speaking to the correct customer.
  2. Agents Scripts are great but what if you needed a simple approach to achieve a more graphical / flexible layout.
  3. You might simply want to reuse existing PowerApp within USD.
  4. PowerApps have many connectors for SharePoint, Outlook, Excel, OneDrive etc etc. Being able to leverage these in USD might be very powerful.
  5. PowerApps “play nicely” with Flow. Making it easy to leverage Flow workflow capabilities directly in USD.
  6. And many more.

As an experiment / proof of concept I’ve created a simple PowerApp to help verify I’m speaking to the correct customer. In my proof of concept I presented the operator with a number of fields. The operator would be expected to tag that the customer has given the correct answer to at least three of five options. Only after selecting these three fields will a submit button become enabled. In my proof of concept, clicking submit would load the agent script. Meaning we could then continue with the call. (Alternatively, the user would enter a failure reason and clicking submit might end the session etc.)

At the end of the day PowerApps have been designed to work with a phone or tablet form factor. But as you can see below you can still display them within USD.

Above you can see that I placed my PowerApp in the RightPanel in USD. I have also experimented with using floating panels (shown below) and the LeftPanelFill. If you opt for these display panels you may need a use additional actions to size and position the screen in a pleasing way!

So how can we achieve this?

In this post I am not going to attempt to explain how to build the PowerApp! I’ll assume you have a basic understanding of PowerApps and USD. But I will show the alterations I did to my PowerApp to be able to integrate it within USD. And explain the challenges I faced.

Initially I generated a default PowerApp connected to my Dynamics 365 instance and the contact entity. I could have created App from scratch but creating a default simply gave me a template to work from. This default App provided me with three forms, a browse screen, detail screen and an edit screen. For my example, I didn’t need the edit screen. So I removed that! However keeping the browse screen was really useful. I never intended on showing the browse screen in USD but keeping it means I can test my PowerApp outside of USD. Being able to do that save me loads of development time.

Challenge One – On Start

Having the browse screen is great but this highlights my first challenge. Getting the PowerApp to start in context of the record currently selected in USD. This was essential as I wanted my PowerApp to show within a session in USD.

When my PowerApp is started from within USD I want to pass in a parameter containing the GUID of the currently selected contact. I could then use that to navigate to that contact in my PowerApp.

On the browse screen, under the actions menu you will find an “On start” option. We can use this to lookup a contact when a parameter is provided. You can see below that I added a formula to the “OnStart” of my browse screen. If formula finds a parameter it will look up the contact and navigate to my detail screen.

If(!IsBlank(Param(“ContactGUID”)),Navigate(DetailScreen1, Fade, {Item: LookUp(Contacts, contactid = Lower(Param(“ContactGUID”)))}))

Challenge Two – Keeping the Browse Screen working

As already mentioned, I wanted to keep my browse screen working. Users would never use it but having it meant I could test and develop my PowerApp outside of USD. For this I needed to make a small change to the “next” arrow on my browse screen. On start my lookup would have loaded the required row into a record called “Item”. Therefore clicking the next arrow needed to assign the correct row to the same “Item” record. I altered the “OnSelect” action of my arrow to contain the formula shown below.

Navigate(DetailScreen1, ScreenTransition.Cover, {Item: ThisItem})
 

Below you can see how I applied this formula in my PowerApp.

Challenge Three – Using my Item record in my Detail Screen

Next I built my detail form. Initially I started off with a default form but actually I re-created this pretty much from scratch. I obviously had to add multiple controls to my form and build my required logic. (None of which I will detail here!)

But it might be worth noticing how I referenced the Item record created from my Browse Screen. Below you can see one simple example, here I have a label control and the text property has been set to “Item.fullname”. I used the same approach to reference all of the fields I required. Such as “Item.birthdate” etc etc.

Challenge Four – Triggering an event in USD.

Next I wanted drive functionality ion USD when someone clicked my submit button. I opted to do this by creating a custom event in USD. An alternative approach would have been to trigger an option. I favoured the event approach as I felt it gave me more options.

Here I added a formula to the “OnSelect” action of my submit button. My formula is shown below;

If(Passed>=3,UpdateContext({Verified: "Passed"}),UpdateContext({Verified: "Failed"})); Launch("http://event/?eventname=Verified&Status=" & Verified & "&Text=" & TextInput1.Text & "&Passed=" & Passed)
 

Your formula will probably look different to this! I actually had a count of the number of options the user had selected. So the first part of my formula is a condition to decide if a pass or fail had been record. The part of the formula that actually triggers my event in USD is shown separately below. In this you can see that my event was called “Verified”. The command I used to trigger the event was a “Launch” action. This constructs a url to trigger a custom event called “Verified”. I also passed several parameters, included a status, any comments the agent had entered and a count of the number of passed items.

Launch("http://event/?eventname=Verified&Status=" & Verified & "&Text=" & TextInput1.Text & "&Passed=" & Passed)
 

And below you can see how I added this formula to my OnSelect action.

Changes needed in USD.

So I had created a PowerApp that would accept a GUID as a parameter, navigate to that record and could return an event to USD. Now I needed to make a number of changes in USD to consume this application. I am going to assume you understand USD! So here I will only explain the basic / key changes I made.

  • Step One – Create a Hosted Control
  • Step Two – Create an Event
  • Step Three – Create a Navigate Action

Step One – Create a Hosted Control

Like all good USD changes, first I needed a hosted control. This would be the tab that I wanted to hold my PowerApp.

I called my hosted control “PowerApp Contact Verification”. You could obviously use any name.

Importantly my component type is “Standard Web Application”.

Also notice that I decided to use “RightPanel” for my Display Group.

In my example “Application is Global” was left unchecked. As I want my PowerApp to load within my session. You could of course use a PowerApp as a global tab!

Step Two – Create an Event

Next I wanted a custom event that the submit button in my PowerApp would trigger. I called my event “Verified”, obviously you could use a different name. Below you can see that I simply used the “ADD NEW EVENT” button to add my event.

Tip: Having created your event you will then add one or more actions to trigger other “stuff”. In my simple example, I added one action that would load my agent script. Notice that I did add a condition which would only do this if my event contained a parameter giving me a status of passed. This is only a proof of concept. In a production version I would probably add several other actions. For example, I’d wat to consider what should happened when eth status was “Fail”. I would also probably add a CreateEntity action to log that the verification has happened.

Step Three – Create a Navigate Action

Next I created a navigate action to load my PowerApp. You’ll need to add this action to the BrowserDocumentComplete event on your contact or possibly in your window navigation rule used to create a contact session.

My action looked like this;

This action is simply navigates to the url used to load your PowerApp. It should be easy to get this by running your PowerApp in a browser and copying the URL. I did however add a couple of things!

url=https://web.powerapps.com/apps/392be483-9d46-471a-96d2-a3eb46bacd11?ContactGUID=[[Contact.Id]+]&HideNavBar=True
 

Notice that I have added ?ContactGUID=[[Contact.Id]+] in my url. This passed the GUID for the current contact to my PowerApp as a parameter. The PowerApp will that use that in its start-up action.

I also added &HideNavBar=True, this was used to remove the navigation bar from my PowerApp. (I did this simply to make the screen look a little better.)

Hopefully the ideas I have explained in this post will inspire you to try using PowerApps with your Unified Service Desk application. Enjoy.

USD – LeftPanelFill Height

$
0
0

I do love the fresh we’ve had with V9.0 of Dynamics 365, the forms are clearer and the views are easier to read.

Except this readability has a trade off that some items now occupy slightly more screen real-estate. Generally this is a happy trade off that causes no issues. But I have seen a challenge when we display associated views in the left panel of Unified Service Desk.

Below you can see that in my application I display is list of associated cases in my left panel. (Actually this “space” is called LeftPanelFill.) The problem here is that my case view doesn’t fit nicely. Depending on your expected resolution and the length of your agent scripts you may find you have some “spare” unused space below the associated views. In this post I will show you a simple, yet hopefully useful, approach to quickly alter the height of these panels to use the full space available.

To do this I need to create a simple action call. The one I created is below.

The details of this action are as follows;

Field Details
Name Main Layout – Set Visual Property (LeftPanelFill, Height)
Order I don’t care! So left blank.
Hosted Control Main Layout

Your control may have a different name! This is my hosted control that has the component type of “Panel Layout”. Yours maybe called “Custom Layout” or something similar.

Action SetVisualProperty

This action allows me to dynamically set visual (UIElement) properties, including height, width, visibility etc.

Data elementname=LeftPanelFill

propertyname=Height

value=450

The details in the data field allow me to define that it is the LeftPanelFill I want to alter, that it is the “Height” I want to change and then its value.

Now, the value you pick is going to change dependant on the screen resolution you want to work with and the available space. Your agent scripts expand and shrink! So I have picked my longest script and picked a value that uses the remaining space. For me that is 450, your value might need to be slightly higher or lower.

Having created my action I needed to decide when to trigger it. I simply added the action to the BrowserDocumentComplete event of my associated cases hosted control. Meaning that whenever my cases associated view was loaded it would have an appropriate height.

Below you can see my improved layout. For me this not only looked better but meant my agents could see more recent cases without needing to scroll. Meaning this change also gave a more functional UI.

I know this is a simple change, but hopefully you will find seeing this useful. Enjoy!
😄

USD – Best Practice Analyzer

$
0
0

Unified Service Desk (USD) 3.3 has recently been released, one of its great new features is the best practice analyzer. In this post I will explore this new feature and hopefully show why you should immediately try this!

The Problem

Often in USD projects I have faced challenges with reliability or performance. Typically these issues can be connected with various aspects of the user’s desktop or maybe the USD configuration. Collectively these issues can result in poor performance or an unreliable experience. Some examples of potential areas include;

  1. Incorrectly set IE options can lead to several issues, including things that can make USD unreliable.
  2. Insufficient memory on the client machines could be a cause of slow performance.
  3. Poorly thought out configurations can slow the load of USD, start of sessions etc.
  4. And much more!

Until now diagnosing some of these issues has been a lengthy task. Or worse still, if you are unfamiliar with some of the issues they may simply remain unresolved. Not addressing them could ultimately result in an unresponsive or unreliable application that in turn will lead to unhappy agents in your contact centre.

Additionally I have often seen that a number of small issues exist which collectively work together to impact the users experience. This reality means diagnosing performance issues can be a challenge as normally you aren’t looking for one silver bullet but a number of minor “tweaks” that collectively can have a big impact.

The Solution

The newly released best practice analyser allows us to quickly find actual and potential problems. Using it is super simple, just click the analyse button. Having waited about 20 seconds you’ll be presented with a set of results. Some may show an error status but others will just be warnings.

Obviously I doubt the best practice analyser can, will or even should spot everything! But still I think running this tool is simply a no brainier. Why wouldn’t you want to confirm your application is following a basic set of best practices? Therefore I refer to my opening statement …. you should try this immediately.

Below you can see what happens the first time you run the best practice analyser. Simply click “Start Analysis” and wait just a few seconds.

After a few seconds you will see a result something like the one I’ve shown below. You can clearly see any errors and warnings.

Should you have any errors you can usefully expand each one to see some additional details. I haven’t got client caching configured, below you can see that the analyzer not only tells me what the problem is but also explains how to resolve the issue.

Tip:
You can get this same information for warnings and passed (green) items. Actually reviewing the green items might also be a benefit, as it will highlight some great best practice tips.

You may have noticed the downloads url. Navigating to this directory will usefully give you access to the report. Maybe you can get a user to run and email the results to your support team!

Setup (USD 3.3)

To enable the best practice analyser (manually) you will need to make a few changes to your USD configuration. The steps involved are these;

  1. Install USD 3.3 Client
  2. Create a hosted control
  3. Create an action
  4. Add to a toolbar button

Note:
I have opted for a manual install as I am not working with the Microsoft sample web package for USD. If you are, I guess, it may be easier to run the package deployer. Details can be found here.

Step One – Install the USD 3.3 Client

Download and install the USD 3.3 client. (or later)

Note:
Support is available for earlier versions of USD. (from 2.2 to 3.2) You can find details of this and Microsoft’s install instructions here. However, if you are using an earlier version I would suggest step one of following best practice might be to upgrade to the latest version.

Step Two – Create a hosted control

Below you can see my hosted control.

The details for my hosted control are as follows;

Field Details
Name Best Practice Analyzer
Display Name Best Practice Analyzer
USD Component Type USD Hosted Control
Application is Global Selected (Application is global)
Display Panel MainPanel
Application is Dynamic Yes
User Can Close Selected (Users can close)
Assembly URI Microsoft.Crm.UnifiedServiceDesk.BestPracticesAnalyser
Assembly Type Microsoft.Crm.UnifiedServiceDesk.BestPracticesAnalyser.BestPracticesAnalyserControl

Step Three – Create an action

Next we will need an action to load the Best Practice Analyser hosted control created in the previous step. This is a simple action that simply triggers the default action.

So the hosted control is “Best Practice Analyzer and the action is “default”.

Step Four – Add to a toolbar button

Finally you will need to create a toolbar button that will trigger the action. I decided to add mine to my existing about toolbar. (But you could add it anywhere.) So I simply created the toolbar button shown below;

Notice that my show tab is my Best Practice Analyzer hosted control. Also that I have added the action created earlier to the button.

I also (optionally) added the msdyusd_settings16 icon. You could skip this or use another image.

At runtime my toolbar looked like this;

Hopefully you will agree that using the Best Practice Analyzer is simple and something that you should routinely do. Enjoy.

USD – UCI and RunXrmCommand

$
0
0

Version 3.3 of Unified Service Desk (USD) has introduced a new hosted control component type of “Unified Interface Page“, which supports the new Unified Client Interface (UCI). These have several differences to the “CRM Page” hosted controls we have traditionally used with the standard web client. In this post I will explore just one of these differences, RunXrmCommands.

I’ll begin by reminding us of the existing concept of a RunXrmCommand. Below you can see a simple example of a RunXrmCommand that would work with a “CRM Page” hosted control. The command simply runs some JavaScript directly on the form. In my example below the code sets the accounts website field to a replacement parameter and then saves the account. Pretty simple stuff.

However, this approach will no longer work with the “Unified Interface Page” hosted controls. I hope you know “Xrm.Page” does not work with the UCI. (And that Xrm.Page has been deprecated so will be removed from Dynamics 365 at some point.)

Instead of using Xrm.Page our code must be aware of the context within which it is running. The problem is that with the old approach to RunXrmCommands we don’t have a method of passing the context.

Additionally notice that my code used replacement parameters directly in the function. I’ll come back to this in a second, as we also have a new approach to handling replacement parameters.

As an example, let’s look at how I need to change this action to work with the Unified Client Interface.

Step One – Create a Web resource.

The first thing we do is create a web resource in the customizations area of Dynamics 365.

My web resource was simply a small piece of JavaScript, I have shown it below.

My code is shown below. The important things to note are the parameters on the function. The first is “context”, and the second will contain the contents of a replacement parameter. I’ll show you how to pass that into this function in second!

Unified Service Desk will only substitute my replacement parameters directly in the actions being run. Meaning I can no longer directly use replacement parameter in my JavaScript but I can pass them in as parameters.

Also notice that instead of using “Xrm.Page” I have used “context”.

function UpdateWebsite(context, param1) {
  var url = param1;
  if (url !="" && url != null) {
    context.getAttribute("websiteurl").setValue(url);
    context.data.entity.save();
  }
}

Step Two – Change my Action

If your hosted control is of type “Unified Interface Page” then RunXrmCommands can be used to call a function held in a web resource.

You can see below how my action changes when using the Unified Interface.

webResourceName=neil_Account_RunXrmCommands
functionName=UpdateWebsite
'[[Account Website.url]+]'

Notice the data field, it no longer contains the actual JavaScript I am going to run. Instead it has three lines.

The first line defines the name of the web resource. “webResourceName=xyz”

The second line gives the function name. “functionName=xyz”

The third line is optional. This is the replacement parameter I want to pass into my function.

Tip: If you have more parameters you’d like to pass simply list them, one on each line.

I hope you can see that this new approach is quite simple to adopt. I guess it may seem long winded if you only have a single line of code to execute! But I actually think it will lead to a more structured coding approach. I have found that currently this style of RunXrmCommand only works with the “Unified Interface Page” hosted controls.

USD – Switch Agent Scripts

$
0
0

I recently received a great question about agents scripts and I love answering Unified Service Desk questions! This time the question was about a requirement to switch agents scripts. Here is my answer.

The question I received is shown below;

So essentially this person has multiple agent scripts and as tabs are selected wants to automatically show the agent script that relates to the selected tab. This seemed quite a logical thing to want to achieve, when looking at my case I’d like to see the agent script that relates to answers associated to the case. But if I also had an opportunity open then the agent script should automatically switch to be focused on opportunity when the user clicks on the opportunity tab.

I did manage to achieve this effect, although there were a couple of minor things to be aware of. In the rest of this post I will explain how I answered this problem;

The simple steps involved are;

  1. Create a SelectedAppChanged event, if you don’t already have one.
  2. Create some Agent Script GotoTask actions.
  3. Associate the GotoTask actions with SelectedAppChanged event.

Step One – Create a SelectedAppChanged event

You will have a hosted control of type “PanelLayout”. Mine is called “Main Layout”. Other common names might be “Custom Panel Layout” etc.

Find your panel layout hosted control and open its associated events view. You need to check you have an event called “SelectedAppChanged”. If you do great. If you don’t simple click “ADD NEW EVENT” and create one.

Step Two – Create some Agent Script GotoTask actions

Next you will need an action to load each of the agent scripts you want to enable this automatic switching feature on. You can see below that I decided to apply this logic to four of my tabs. Account, Contact, Case and Opportunity.

You will no doubt have a different naming convention to me, so may need to take that into account.

My hosted control for accounts is called “Account”, cases is called “Cases” etc. (Fairly typical.)

My agent script for accounts is called “Account – Agent Script”, cases is called “Case – Agent Script” etc.

Knowing this let’s look at one of my actions in a little more detail. I will use my action for the account hosted control as an example, I hope you can see how these might vary for each tab.

Field Details
Name Agent Scripting – Goto Task (Account, When Selected)
Hosted Control Agent Scripting
Action GotoTask
Data Account – Agent Script

Obviously the name you have here will probably be different to mine. But this is simply the name of the script I want to show when my Account tab is selected.

Condition “[[Selection]+]”==”Account” && “[[Agent Scripting.msdyusd_name]+]”!=”Account – Agent Script”

This condition (importantly) checks two things.

  • Firstly we use the “Selection” parameter to know if the tab currently selected is the Account tab.
  • Secondly I check that the current agent script isn’t already the one the GotoTask is trying to load. This second check is actually really important! As without this I found that Unified Service Desk was actually crashing as my tabs loaded!

Step Three – Associate the GotoTask actions with SelectedAppChanged event

The final step was to simply add my actions to the SelectedAppChanges event. You can see below that I added all four of my actions.

Hopefully I have managed to answer the question and maybe given you an idea on how to enhance your agent scripts.

Viewing all 109 articles
Browse latest View live