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

# Personalizing an email

> How copy fields and merge fields fit together, how to fall back when a value is missing, and who an email comes from.

Personalization lets each recipient see their own name and details. It rests on one idea: an email's design is full of placeholders, and each placeholder gets filled from a known source. This page explains the sources, how to handle a missing value, and who the email comes from. For the full list of fields, see the [Merge field reference](https://docs.allgoodhq.com/mk/content/email/emails/merge-field-reference.md).

## How the pieces fit together

An email's design holds placeholders in double curly braces. They use a templating language called Liquid. The first word of each placeholder says where the value comes from.

```mermaid theme={null}
flowchart LR
  A["Copy schema<br/>the list of fields"] --> B["Copy<br/>the words you write"]
  B --> C["Design<br/>placeholders in the layout"]
  D["Recipient, sender,<br/>and send details"] --> C
  C --> E["The email one<br/>recipient receives"]
```

| Starts with | Where the value comes from | Filled in | Closest Marketo idea |
| - | - | - | - |
| `person` | The recipient's record | When the email sends | `{{lead.*}}` |
| `asset.copy` | A field in this email's copy | When the email is made | `{{my.*}}` tokens |
| `sender` | Your sending domain's settings | When the email sends | `{{sender.*}}` |
| `send` | This one send, including the unsubscribe link | When the email sends | `{{system.*}}` |

Two differences from Marketo are worth knowing. A copy field is created by the template's [copy schema](https://docs.allgoodhq.com/mk/content/email/templates/writing-the-copy-schema.md), not by you creating a token. And a copy field belongs to one email's copy. It doesn't inherit from a program or folder.

### One field, four places

Follow the `headline` field through an email.

```json 1. Copy schema theme={null}
{
  "headline": { "type": "string", "title": "Headline" },
  "ctaLabel": { "type": "string", "title": "Button text" }
}
```

```text 2. Your copy theme={null}
Headline:    Your pipeline report is ready
Button text: See the report
```

```xml 3. The design theme={null}
<mj-text>{{ asset.copy.content.headline.value }}</mj-text>
<mj-text>Hi {{ person.firstName | default: 'there' }},</mj-text>
<mj-button>{{ asset.copy.content.ctaLabel.value }}</mj-button>
```

```text 4. What Ana receives theme={null}
Your pipeline report is ready
Hi Ana,
[ See the report ]
```

The schema names the fields. You write the words into those fields. The design points at each field by name, and allGood fills the rest in for each recipient. allGood usually writes the schema and the placeholders for you, so you mostly read them and edit the words.

## When a value is missing

If a recipient has no value for a field, it shows as blank. It never causes an error, which is why a missing first name reads `Hi ,` and not a failed send.

Add a fallback with the `default` filter:

```liquid theme={null}
Hi {{ person.firstName | default: 'there' }},
```

Recipients with a first name see it. Everyone else sees `Hi there,`.

> [!WARNING]
>
> Nothing checks that a field name exists or is spelled correctly. `{{ person.frstName }}` and `{{ send.unsubscribe_url }}` both show as blank, with no warning. Preview as a real person before you publish. See [Previewing and testing an email](https://docs.allgoodhq.com/mk/content/email/emails/previewing-and-testing-an-email.md).

## Who the email comes from

Every email sends from your verified sending domain. The From name, From address, reply-to, and postal address come from that domain's settings, and a send is stopped if the domain isn't set up. See [Set up an email domain](https://docs.allgoodhq.com/mk/settings/email/domains-setup.md).

An individual email can override three things: the From name, the part of the From address before the `@`, and the reply-to. There's no screen for this. An AI assistant or a developer sets it in the email's files. The part after the `@` and the postal address always come from the domain.

If a field doesn't behave the way this page describes, contact [support@allgoodhq.com](mailto:support@allgoodhq.com).

## Related articles

* [Merge field reference](https://docs.allgoodhq.com/mk/content/email/emails/merge-field-reference.md)
* [Liquid recipes for emails](https://docs.allgoodhq.com/mk/content/email/emails/liquid-recipes.md)
* [Show content conditionally and repeat a list](https://docs.allgoodhq.com/mk/content/email/emails/conditional-content-and-lists.md)
* [Previewing and testing an email](https://docs.allgoodhq.com/mk/content/email/emails/previewing-and-testing-an-email.md)
* [Before an email can send](https://docs.allgoodhq.com/mk/content/email/emails/before-an-email-can-send.md)
* [Coming from Marketo or HubSpot](https://docs.allgoodhq.com/mk/content/email/coming-from-marketo-hubspot.md)


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