Agent Scripts – Different for each user

Agent Scripts in Unified Service Desk (USD) are a great feature but what if you have a complicated situation when different scripts are required for different operators.

This might be because they handle different types of cases. Or it might be because an inexperienced user should only be presented with a limited set of answers they are trained to offer.

These concepts can be implemented quite easily using user settings.

The steps involved are;

  1. Create the required scripts.
  2. Create the user settings.
  3. Create an action call to go to the script for each user settings.
  4. Add the actions to the load of a suitable hosted control.

I’m going to assume you already understand the basics of creating agent scripts. If not please refer to my earlier posts.

Step One – Create the Required Scripts.

In my example I have two agent script for handling cases. The default one that most users will follow and one that only I will be allocated.

Firstly the one for most people looks like this ….

Your agent scripts will probably look quite different! But I hope you get the point that this default script is a typical process for handling a case. Then below you can see my second script, which will be an alternative only I will get. Hopefully you get the idea that my script is very different from the default.

Step 2 – Create the user settings.

Now navigate into the Unified Service Desk settings and find the “User Settings” option. Then add a new user setting. Below you can see the one I created.

In my example I have opted to set a value. For just two scripts I didn’t need to do this but I hope you get the idea that I could add additional scripts giving each one a unique number.

To explain: In this example having a user with a setting called “CaseScript” and a value of 2 will load script 2. If no option is present or the value isn’t 2, then I will trigger the default to load.

Step 3 – Create an action call to go to the script for each user settings.

First off I created the action to call the default script. Notice the hosted control is “Agent Scripting”, my hosted control that contains my scripts. Yours might have a different name. The action is “GotoTask” and the data portion defines the name of the script I created in step 1.

The order is significant. As I have two actions and I want this one to be the second one processed.

I have also added a condition to the script, this is important!

This is saying is the CaseScript user option is not 2 then this is the script you’ll be offered. (Note: If you did have more than two options, you’ll need to tweak this condition!)

Also notice the “]+g]”, “g” means the CaseScript variable is global. And “+” handles nulls. Meaning this condition won’t start to fail if no CaseScript option exists.

Next I created another action, shown below. This time the order is 1 and the condition is slightly different. As this time I want the action to trigger when the CaseScript option is 2.

Step Four – Add the actions to the load of a suitable hosted control.

Finally I added these to actions to the hosted control I use for my case tab. To do this load the control, navigate to the events, select the BrowserDocumentComplete event and add your actions. The example I created is shown below.

Now when I create a case a different agent script will appear compared to any other users.

Hopefully you’ll find this concept useful and also see with a little alteration you could use User Settings in Unified Service Desk to control other parts of the user experience.

6 thoughts on “Agent Scripts – Different for each user

    • The user setting itself has no logic. It is a little like an option value. It is simply a value that can be set per user. So once set you need to create actions (triggered from events) that make use of these settings. Hope this makes sense. Try it, I promise it will make sense! 🙂

      Like

  1. Pingback: Learning USD | Microsoft Dynamics CRM and Unified Service Desk

  2. Pingback: USD – Agent Scripts Collection | Microsoft Dynamics CRM and Unified Service Desk

  3. Pingback: USD – Agent Scripts Collection - Microsoft Dynamics CRM Community

  4. Pingback: USD – The Book | Microsoft Dynamics CRM and Unified Service Desk

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s