CxScript elements are the instructions you use to fill documents and e-mails with up to date information from your Carerix database. Elements look like:

<cx:write value="Hello World"></cx:write>

Opening and closing tags

An element consists of an opening and closing tag, like:

<cx:elementname attribute1="value1" attribute2="value2">

Between the opening- and clossing tags you place any content, which could contain other CxScript elements.

For situations wherein there is nothing to place between the opening and closing tags the following shortcut notation is available:

<cx:elementname attribute1="value1" attribute2="value2"/>

So, with an element without content a closing tag is not necessary as long as you place a / at the end of the opening tag.


All that is enclosed by the opening and closing tag is named the content of the element. If there no closing tag (short notation,) then the element does not have a content.


As previous examples show every tag starts with < and ends with >. After the element name in the opening tag these hooks enclose the element attributes. Such an element attribute looks like:


An attribute is assigned a value by using a constant, like:

<cx:let name="s" value="This is a text.">

The value of the attribute value in previous example is: "This is a text.". An attribute could also be assigned a value by using a variable, like in:

<cx:let name="s" value="$">

The value of the attribute value in previous example equals to the name of the particular candidate.

Starting elements

CxScript codes are commonly used to get values from the Carerix system. To archieve this, Carerix provides the following starting points:


The variable $activity points to the activity of processing the template. Depending on the context, $activity "knows" the following objects:

$activity.toEmployeeThe candidate this template is about$activity.toMatchThe match (only for match- stage- or placement templates)$activity.toVacancyThe job order$activity.toContactThe contact person$activity.toCompanyThe company$activity.ownerThe person using the template

Multi record

A multi-record template is about a selection of objects. To process each of these, use the following construction:

<cx:foreach item="record" list="$activity.selectedItems">
...`$record` will point to each object in the list in turn

Multi-record templates are found as action "send list..." below the lists


  • Do not forget the dollar sign $. When you use a variable to assign a value to an element attribute do not forget to let a dollar sign precede the variable name.
  • Inbetween element attributes any number of spaces, tabs and/or newlines can be placed without influencing the working of the template.
  • The element attribute values itself can contain newlines. In the value of a condition attribute of a cx:fetch element this will not change the working of the condition However, in the value of the attribute value of a cx:write element these newlines will become part of what is written.
Did this answer your question?