USD – Create an agent script

In an earlier post I explained what agents scripts are and how they might be useful, now I’d like to build on that logic and describe how to actually create an agent script.

Agent scripts are useful to prompt the operators presenting options at each stage of the business process for possible answers (actions) to take. For example creating a new case from a contact.

The steps involved in creating an agent script include;

  1. Create a hosted control for the agent scripts.
  2. Create the agent script.
  3. Create the answers and associated actions for the script.
  4. Associate the script with the correct hosted control.

Sorry, as again I will be using fishing as a basis for my examples. Feel free to use accounts, contacts and such like in your applications!!!

Step One – Create a hosted control for the agent scripts.
This control essentially is the “container” for the scripts. The controls main purpose gives the location the scripts should be displayed in. This could be anywhere (in theory) but scripts are typically displayed in the left panel.

Agent Script - Hosted Control

Note that the USD component type is “Agent Scripting” and that the Display Group is “WorkflowPanel”.

The “WorkflowPanel” is actually in the left panel, below the session overview!

Step Two – Create the agent script.
Next you’ll need to create an agent script that will later be associated with a tab. (hosted control) To do this you’ll need to navigate to the agent scripting area of the Unified Service  Desk under settings.

Field Comments
Name Obviously this names your agent script but think about the name carefully as this is the name that will be presented to the agent.
Script Text This contains the opening text for the script. Notice that you can insert contextual information here. Such as [[contact.fullname]] or whatever attributes make “sense” in your application.
Instructions Below the script text the instructions will appear, the entry of this information works in the same manner as the script text. So again you can add attributes if required.

Agent Script - Script example

Step Three – Create the answers and associated actions for the script.
The next step will be to create the answers and optionally associate actions to those answers. (Note: screen shot shown in step two  was actually taken after I’d added some answers!)

Having saved your agent script you can add a number of answers (tasks) that can be completed by the agent.  In the example below notice how the showtab field has been populated, this forces that tab to have focus if that answer is selected.

Agent Script - Answers1

In my example I am creating an answer which lets the operator view “lakes” associated with  a fishing location. You could show cases associated with an account etc!

Having created the answer you can associate any suitable action with the script. It is worth noting that the actions are optional! You could have an answer which simply acts as a reminder to the operator to ask a particular question or give a certain piece of information. In my example I added an existing action to show the associated view of lakes.

Agent Script - Answers2

Step Four – Associate the script with the correct tab (hosted control)
Having created your agent script you will need to add it to a tab to make it “fire” when a particular tab is displayed. In my example when a fishing location is loaded. Typically you might expect the script to be associated with account, contact or case entities!

To do this navigate to the required hosted control and locate the “BrowserContactComplete” event. From hear you will then need to add a new action to load (fire) your agent script.

Agent Script - hostedcontrol1

The action you add will look something like the one below. Notice how the hosted control is “Agent Scripting”, this you created in step one. And that the action is “GotoTask”. Importantly the data value is the name of the script to be associated with tab. (Again : This is the full “English name” visible to the operators.)

Agent Script - hostedcontrol2

I hope this has given you an insight on how to start creating an agent script, in future posts I will build on this concept and show how to create entities from scripts etc.

9 thoughts on “USD – Create an agent script

  1. Pingback: USD – Agent Script to create an entity | NEIL PARKHURST

  2. Pingback: Learning USD | My experiences with Microsoft Dynamics CRM

  3. Pingback: Learning USD - Microsoft Dynamics CRM Community

  4. Pingback: Agent Scripts – Different for each user | Microsoft Dynamics CRM and Unified Service Desk

  5. Pingback: Agent Scripts – Start Tasks Explained | Microsoft Dynamics CRM and Unified Service Desk

  6. Pingback: Agent Scripts – Start Tasks Explained - Microsoft Dynamics CRM Community

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

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

  9. 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 )

Google+ photo

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

Connecting to %s