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

# Dynamic content

> Show a block only to the contacts it fits, using their language, location, lists, score tier, purchases or custom fields.

**Dynamic content** lets one email carry blocks meant for different people. You give a block a **Show to** rule, and each recipient gets that block only when the rule fits them. Everyone else gets the email without it.

Some examples:

* A paragraph in French, shown to contacts whose language is `fr`.
* A VIP banner, shown to contacts in the Champion score tier.
* A win-back offer, shown to contacts whose last purchase was 90 or more days ago.
* A store-opening notice, shown to contacts in one city.

A block without a rule goes to everyone, as before.

## Add a rule to a block

1. Open the template in the email builder and select the block.
2. In the settings panel, open **Show to** and choose **Only when…**.
3. Pick a field, a condition and a value. For example, **Language** · **is** · `fr`.
4. Choose **Add rule** for more rules, then set **Match** to **all of the rules** or **any of the rules**.

To send the block to everyone again, choose **Everyone**.

Any block can carry a rule, including a container or a columns block. A rule on a container applies to everything inside it.

On the canvas, a block with a rule shows a badge that describes the rule. The canvas still shows every block so you can edit them. Turn on **Dim conditional blocks** to fade the blocks that have a rule and see what everyone receives.

## The fields you can use

| Field | Examples |
| - | - |
| Email, first name, last name, company, job title | Company **is** `Acme` |
| Language, country, state, city | Country **is one of** `FR, BE, CH` |
| List | **Is one of** VIP, Early access; **is none of** Staff |
| Score tier | **Is** Champion, **is one of** At risk, Dormant. See [Predictive scores](https://docs.instantcampaign.ai/guides/audience-and-campaigns/predictive-scores.md) |
| Lifetime value | **Is at least** 500, in whole units of your workspace currency |
| Purchases | **Is at least** 2 |
| Days since last purchase | **Is less than** 30 |
| Custom fields | Any field from your workspace's custom fields, including multi-select fields |

Text fields offer **is**, **is not**, **contains**, **does not contain**, **is one of**, **is none of**, **is set** and **is empty**. Number fields offer **is at least**, **is less than**, **is set** and **is empty**. For **is one of**, separate the values with commas.

**Contains** finds the text anywhere in the value: city **contains** `York` matches both "New York" and "Yorkshire". Use **is** or **is one of** when you want an exact match.

Lifetime value, purchases and days since last purchase come from purchase goals. See [Events and goals](https://docs.instantcampaign.ai/guides/audience-and-campaigns/events-and-goals.md).

If you know Liquid, open **Advanced** and write your own condition in **Liquid expression**, for example `contact.city != "Paris"`. Write the expression only, without `{% %}` or `{{ }}`. It is combined with the rules above, so the block shows only when both hold.

## Add the opposite

You often want one block for some contacts and another block for everyone else, such as a French paragraph and an English one. Select the block with the rule and choose **Add the opposite**. The builder adds a copy of the block below it with the reversed rule. Edit the copy's content, and every recipient gets exactly one of the two. **Add the opposite** is not offered when the rule includes your own Liquid expression, because the builder cannot reverse it safely.

## Alternatives and a default

Sometimes you have more than two versions of a block: one for French speakers, one for Champions, and one for everyone else. Link the blocks into a group and each recipient gets exactly one of them.

1. Select the first block and give it a rule, for example **Language** · **is** · `fr`.
2. Choose **Add an alternative**. The builder adds a copy below in the same group, with no rule yet. Give it its own rule, for example **Score tier** · **is** · Champion.
3. Choose **Add a default**. The builder adds another copy below, set to **Otherwise (default for its group)**.
4. Edit the content of each copy.

At send time, InstantCampaign checks the blocks in a group from top to bottom and shows the first one whose rule fits the recipient. A French-speaking Champion gets the French block, because it comes first. The default block goes to everyone who matched none of the others. The settings panel shows where a block sits, for example "Variant 2 of 3".

You can also turn any block into its group's default: open **Show to** and choose **Otherwise (default for its group)**. A group can have only one default.

In a columns block, InstantCampaign checks the whole left column before the right one. Keep the blocks of one group in the same column, or in the same container, so the order is easy to follow.

**Add the opposite** also puts the two blocks in one group.

If a group has no default, a recipient who matches none of its rules gets none of its blocks. The campaign plan page warns you about this before you approve the send.

## Preview as a contact

The builder canvas does not apply rules. To see what one person will receive, choose **Preview as…** in the toolbar and pick a contact. Blocks whose rule does not fit that contact disappear from the preview. **Send test with this preview context** sends that same version to your inbox. See [Previews and test sends](https://docs.instantcampaign.ai/guides/email-and-templates/testing-and-previews.md#preview-as-a-contact).

A plain test send has no real contact behind it, so blocks whose rule needs contact data are left out.

## When a field is empty

A contact with an empty field does not match a rule that compares that field. A contact with no city does not match city **is** `Paris`. A contact who has never bought does not match days since last purchase **is less than** 30. Rules with **is not**, **is none of** and **does not contain** do match an empty field: a contact with no city matches city **is not** `Paris`.

Use **is empty** to target contacts with an empty field, for example to show a "Tell us where you live" block.

If a rule cannot be read, for example because it uses a custom field that was deleted, the block is hidden from everyone. The email still sends. The campaign plan page shows a warning so you can fix the rule before you approve the send.

## Where rules apply

Rules apply to campaign sends, journey emails, transactional emails sent through the API with a builder template, the view-in-browser copy, and **Preview as…**. Emails already sent do not change.

Rules travel with the block. A block inside a [synced block](https://docs.instantcampaign.ai/guides/email-and-templates/synced-blocks.md) keeps its rule in every template that uses it. A [translation](https://docs.instantcampaign.ai/guides/email-and-templates/translations.md) has its own copy of the blocks, so check its rules after you add one to the default language.

## Limits

* Rules can use lists but not segments.
* The builder does not show how many recipients will see a block.
* Rules work in emails only. Landing pages ignore them.
* Lifetime value is in your workspace currency. Purchases in other currencies are not converted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.