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;
[[contact.name]] [[contact.Id]+] [[account.websiteurl]u] [[contact.telephone1]x]
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.
- 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.
- 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.