Carrot Templates

When creating Templates for custom documents like compensation letters, custom content in ChartHop profiles, or sending custom messages using ChartHop Actions, you can use Carrot Templates to customize the content.

Carrot Templates are very similar to Shopify's Liquid Templates, but are built on top of CQL so you can query for any information in ChartHop. For more information on CQL, check out What is CQL.

Carrot Templates use Markdown formatting for styling and formatting.

substitutions

You can use {{curlyBraces}} to substitute any CQL expression in the body of your template. For example:

Markdown

if condition

To conditionally display a piece of content, use the if tag.

{% if expression %} conditional content {% endif %}

Example:

Markdown

if... elseif / else

You can use elsif or else to add additional conditions to an if block.

Example:

Markdown

for loops (iterations)

You can iterate through a series of objects using the for tag.

Example:

Markdown