USD – Agent Script Conditions

I have previously created several posts about agent scripts within Unified Service Desk (USD) for Microsoft Dynamics CRM. I wanted to complete this “series” by mentioning conditions.

Conditions on agent scripts can be very useful as you may only want certain options to display in certain situations. For example, a script answer to give out information on a case maybe only needed if the case subject is “Information”.

You can see below that I have added an enable and visible condition to my agent script. I have opted for a simple approach of just setting both conditions to the same. But you could have different conditions Maybe you’d like the option to be visible but only enable in some circumstances!

The condition I used is;

"[[$Context.InitialEntity]]"=="incident" && "[[incident.Id]]" != "" && "[[]]"=="Information"

This is actually more complex than I really needed. But I wanted to show some possibilities.

“[[$Context.InitialEntity]]”==”incident” … This can confirm that the active session contains an incident.

“[[incident.Id]]” != “” …. This is used to ensure I have a case ID. (As I would once the incident had been saved.)

“[[]]”==”Information” …. Finally, the important check that the subject of the case if “information”

4 thoughts on “USD – Agent Script Conditions

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

  2. Hi sir,

    Can we also use Agent Script Conditions to stop agent script to get loaded for a particular type of sessions (like case session) ? If yes, then how ?


    • I have recently seen a product bug with the conditions on agent scripts! Simple conditions seem to work but proper comparisons of fields don’t work. However in the example you give I suspect you could get round this by adding the condition to the GotoTask action that triggers the agent script.


  3. 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: Logo

You are commenting using your 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