Agent Scripts – Conditions

I have completed a few posts recently on the use of agent scripts within Unified Service Desk (USD) for Microsoft Dynamics CRM, I wanted to finish this “series” by mentioning conditions.

Below you can see an example answer I have created on an agent script for cases. In this example I called the answer “Give out some information”. The result of this is that the answer does not appear in the agent script until we have a case number. As we can’t give out information until the case is logged!

I have used this logic several times when creating new cases, as I wanted to suppress options like sending an email or adding notes until we had a case number. Meaning I can reference the case in the email (etc) but also meaning the options can’t even be seen until the case is saved.


The syntax I have used below works on conditions for actions and fails on conditions for agent scripts. (With USD 1.0) The correct syntax that works in all situations and in USD 2.0 is  “[[]]”==”Information”, the quotes around the replacement parameter are required!


8 thoughts on “Agent Scripts – Conditions

  1. There are certain more problem with this product, which I had experience; I can’t say whether that was a bug or not. But I have tried “KPI” functionality of the USD by adding the related hosted control & Action call which is given as a “Sample” under the CRM 2013 with product update package but couldn’t find it working.


  2. Hi sir,

    Other than that, with due respect I want to ask you one question Which is “I want the “User Notes” functionality inside the Leftpanel of USD (Which I have Implemented) but want it (“User Notes”) always be there on Left Panel as soon as “Desktop Gets Ready”. So can I do this just by adding the Action call in the “Desktop Get Ready” event under “active action” ?

    Because I have tried this but didn’t get the desired result, I hope, I made my point🙂


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

  4. Neil,
    I’ve successfully used both “Enable” and “Visible” conditions similar to what your article mentions. You’re missing the double quotes around the replacement parameters that converts the params to String and allows for comparison. This will evaluate correctly.


    Try using
    “[[]]” == “Information”

    instead of

    [[]] == “Information”

    I hope this helps.


  5. Hi Sir,

    I was trying to display the call scripts based on condition, but it didn’t work.

    My requirement is to show a particular call script based on the subject selected. I provided the condition
    “[[$Context.InitialEntity]]”==”incident” && “[[]]”==”Delivery” in the action call it is not working.I am getting a blank section in the workflow panel. When I triggered the same from the debugger, it shows the call scripts and loads the Call script.. I am not sure if I missed any step, can you please help me?

    Akhil J


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