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  “[[incident.subjectid.name]]”==”Information”, the quotes around the replacement parameter are required!

 

8 responses to “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.

    Like

  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 🙂

    Like

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

    i.e.

    Try using
    “[[incident.subjectid.name]]” == “Information”

    instead of

    [[incident.subjectid.name]] == “Information”

    I hope this helps.

    Like

    1. Hi Prometheus,

      Thanks for this comment. You are right, I’d already found this mistake but hadn’t updated my blog post. I will correct.

      Many Thanks

      Neil.

      Like

  4. 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” && “[[incident.subjectid.name]]”==”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?

    Thanks,
    Akhil J

    Like

    1. Thanks, your condition looks correct. I’m not sure what you are trying in the debugger exactly but could it suggest a timing issue? Is the incident already loaded when your agent script starts? Hard to be sure! But it doesn’t look like you condition is the problem.

      Like

    2. USD – Agent Script Conditions

      Please check out this link. I re-read my post on agent script articles and decided I didn’t like it! It had several incorrect points. I have quickly completed a new post and tried to include your something close to your condition in the example I have given.

      Like

Leave a comment

Trending

Website Powered by WordPress.com.