> ## Documentation Index
> Fetch the complete documentation index at: https://docs.converlens.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using merge variables and dynamic content

Merge variables can be used to insert dynamic content, such as names and values, into your messages. There are three primary types:

* **Message variables**: Information about the message being sent.
* **Contact variables**: Information about the recipient of the message.
* **Workspace variables**: Information about the workspace sending the message.

## How to insert merge variables

To insert a merge variable, click into a text block where you’d write content, and then wrap the variable name in double braces. So for example:

```
`Hi {{contact.display_name}},` 
`This is our latest email: "{{subject}}"`
`Contact us on {{workspace.email}} anytime!`
```

Would be converted to show in the final message:

```
Hi Jesse Bannister,
This is our latest email: "Welcome to the team"
Contact us on contactus@demo.org anytime!
```

### Using the Text Toolbar to insert variables

You can also click the `@` icon in the Text Toolbar to get shortcuts to the available variables.

## Using Liquid template content

Converlens uses a subset of [Liquidjs templates](https://liquidjs.com) to enable dynamic content. Some of the most common use cases include:

* **Default values** ([Liquid default docs](https://liquidjs.com/filters/default.html))\
  If no value is present for a variable, you can set a default as follows: `Hi {{ contact.first_name | default: “there” }}`. This would show `Hi there` as the default if no `contact.first_name` was set.
* **Conditional rendering** ([Liquid if docs](https://liquidjs.com/tags/if.html))\
  You can use `if` tags to only show sections if conditions are met (note the `{%` tags):

```
{% if contact.is_person != true %}
  This message is only for organisations.
{% endif %}
```

## Message Variables

* **context**: The viewing context for the message. Can be 'mail' or 'web'.
* **unsubscribe\_link**: A link for the contact to unsubscribe from all emails. This is an alias for `contact.unsubscribe_link`.
* **subject**: The subject line of the message.
* **broadcast\_at**: The ISO UTC datestamp the message was sent or will be sent. Displays 'now' if pre-broadcast. e.g. ‘1999-12-12T23:59:59.000Z\`
* **broadcast\_day**: The day of the month the message was broadcast.
* **broadcast\_month**: The month the message was broadcast (e.g., 'January').
* **broadcast\_year**: The year the message was broadcast (e.g., '2025').
* **url\_link**: A link to view the message online (if published).
* **dispatch\_key**: The unique identifier for this specific message dispatch to a specific contact. Not available in preview mode.

## Contact Variables

Contact variables are available in Messages, but *won’t* have any data when viewed in the published web page without a contact context.

* **contact.display\_name**: The display name of the contact. For Organisations, this is the name of the organisation, for Persons this is the combination of their first name and last name. Use this field if you’d prefer not to use conditional logic.
* **contact.email**: The email address of the contact.
* **contact.first\_name**: The first name of the contact, if available. For legacy person contacts that only have a full name, Converlens will try to use the first word as the first name.
* **contact.last\_name**: The last name of the contact, if available. For legacy person contacts that only have a full name, Converlens will try to use the remaining words as the last name.
* **contact.is\_person**: Is this contact a person (rather than a business/organisation).

All of your custom contact data fields are available too:

* **contact.fields.\$key**: The custom field key value. For example, if you had a field with the key `important`, you could access it using `{{contact.fields.important}}`.

Links can be inserted to direct contacts to their preferences and profile management pages.

* **contact.profile\_link**: The link for the contact to update their profile details.
* **contact.preferences\_link**: The link for the contact to manage their preferences.
* **contact.unsubscribe\_link**: The link for the contact to unsubscribe from all emails.

## Workspace Variables

These are utility variables specific to your workspace:

* **workspace.key**: The unique URL slug key for your workspace.
* **workspace.hub\_link**: A link to the public workspace home page on Converlens.
* **workspace.email**: The public email of the workspace, which can be used in the footer of messages.
* **workspace.name**: Your business or organisation name to use in email footers. Defaults to the name of your workspace.
* **workspace.phone**: Your business or organisation phone number to use in email footers
* **workspace.website\_link**: The main business website of the workspace.

Workspace address variables will default to the Converlens address if you haven’t specified an address.

* **workspace.address**: The workspace address in a single line format (e.g. “1 Indigo Lane, Sydney, NSW, 2000, Australia”)
* **workspace.address\_street**: Your street address (e.g. “1 Indigo Lane”)
* **workspace.address\_city**: Your city (e.g. “Sydney”)
* **workspace.address\_state**: Your state or province (e.g. “NSW”)
* **workspace.address\_zip**:  Zip code or postal code (e.g. “2000”).
* **workspace.address\_country**: Your country (e.g. “Australia”).
