USD – Replacement Parameters

This is just a quick post, partly for future reference for myself! When working with Unified Service Desk (USD), you often come across syntax like this;


When I first saw this style of notation I didn’t really understand the meaning of “]]”, “]+]”, “]u]”, “]x]” etc. On one level it didn’t matter as long as the “code” I entered worked! But knowing when you might use “[[parentcustomer.Id]+]” instead of “[[parentcustomer.Id]]” can sometimes be important.

This link to Microsoft explains the replacement parameters. It took we quite awhile before I stumbled on this. So I thought posting it might help.

Some tips;

  • If a value might return a null, use [[afield]+], as this will handle nulls correctly.
  • If you are constructing a url, use the “]u]”, as this adds %20 for spaces etc.
  • If the string might contain “special” characters such as “<“, the use “]x]” to ensure they display correctly.
  • You can combine combinations, like “[[telephone1]+x]”, for a telephone number that might be null and might contain “special” characters.

Also the link below explains how to access various system replacement parameters. Such as $User, $Session, $Global etc. Trying looking in the debugger  data parameters tab to see the contents of these.

Some examples.

  • To return the start time of a session use  [[$Session.StartTime]g]
  • Use this [[$User.fullname]g] to return the name of the current user. (Useful in agent scripts etc.)
  • This will return the number of open sessions [[$Session.Count]g], and this [[$Global.maxNumberOfSessions]] will return the maximum number of session possible.

5 thoughts on “USD – Replacement Parameters

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

  2. Pingback: Learning USD - Microsoft Dynamics CRM Community

  3. Neil, thank you for your helpful series of USD posts.
    Regarding replacement parameters, though…whenever I save a new record, its “.Id” value (e.g. [[contact.Id]] doesn’t show up in its list of replacement parameters, even after refreshing the list in the debugger. Have you run into this?


    • Thanks for your comment and responding to my blog.

      I have seen the issue you describe, once. But at the time I thought the issue was specific to the USD version I was using and only happened with CRM online.

      What version of CRM and USD are you using?


  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: 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