We’ve developed some resources to help you work effectively from home during COVID-19 Click to learn more

CS Parser code, where ?


Trying to make some reply templates i CS 7.5, but where can I find the parser code/template variables description ?

Looked in SDK and Help, but can't find what is available.

RE: CS Parser code, where ?

Is this what you're after, Rune?



Av: Simen Mostuen Iversen 13. jan 2015

RE: CS Parser code, where ?

Hi Simen

That was fast response.. :-)

Yes that is some of them, missing the one in the "System template - weekly statistics"

like this paser code : %weekStat.lastMonthAvgClose%


Av: Rune Næss Elleskov 13. jan 2015

RE: CS Parser code, where ?

I don't think that these are documentet. But, I guess I'm not the correct person to ask. =)

Av: Simen Mostuen Iversen 13. jan 2015

RE: CS Parser code, where ?

Yes, these are not documented, unfortunately. Use [[PARSER_TREE]] to at least get a list of them all.


Av: Sverre Hjelm 15. jan 2015

RE: CS Parser code, where ?

Is it possible to get the Company url from S&M and use it as a URL in System Design->Web panels ?

Av: Johnny Jensen 15. maj 2015

RE: CS Parser code, where ?


noob question ....

how does this parser tree work... where to enter this to get a list?


Kind regards,



Av: Jan Willem Steenbergen 6. jan 2020

RE: CS Parser code, where ?

Hi Jan-Willem,


The easiest way is to add this variable to a reply template.

By using the template in a request, you will get all possible variables, as well as example data from the request.



Av: Niels van Broekhoven 6. jan 2020

RE: CS Parser code, where ?

Just to create some more background on this:

The Parser-class is a template-substitution system. It will be populated with lots of variables, and then it can process a text and substitute e.g. "%ticket.id%" with "42". Originally, it started with % around the parsable variables, but to make it work well with CKEditor, we change "[[" and "]]" to "%" before parsing. That means you can use "[[ticket.id]]" as well. 

There is no documentation on which variables it contains, because that varies depending on where the class is used. For instance, when importing an email and creating a ticket, it will be filled with relevant info for that process before being used to parse the response email. In the customer center when viewing the list of requests, it will contain other variables (including multi-value variables that can be iterated using ROWSTART/ROWEND).

To get a dump of all the variables and values it contains, you can use the "magic" variable %PARSER_TREE%. It will be substituted with a line-separated list of the Parser's contents. The output will be right there where you put that code, for instance in an email, a customer center template, etc. For instance, you can place that inside a HTML-comment (<!--) in the customer center, so that you have to do View source to see the contents (and not make the customer center look cluttered with jibberish :-)).



Av: Sverre Hjelm 7. jan 2020