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

# Merge Tags

> Reference for Brew merge tags, covering syntax, fallbacks, which contact and trigger fields resolve, and what renders when one doesn't.

Merge tags pull contact and trigger data into an email at send time. This page is the reference for the syntax and for which fields resolve.

## Syntax

A merge tag is a field name inside double braces.

| Form     | Example                    | Renders                          |
| -------- | -------------------------- | -------------------------------- |
| Plain    | `{{ firstName }}`          | `Alex`                           |
| Fallback | `{{ firstName \| there }}` | `there`, when the field is empty |

Write the spaced form, `{{ firstName }}`. It is the form used throughout Brew and across these docs.

<Warning>
  Variable names are case-sensitive. `{{ firstName }}` matches a field named `firstName`, not `firstname`. Triple braces (`{{{firstName}}}`) are not recognized and ship as literal text in the email.
</Warning>

## Where They Work

* Email body
* Subject line
* Preview text

In the [TypeScript SDK](/sdks/typescript/resources), the `subject` and `previewText` on a `sendEmail` node take the same syntax. They are evaluated against the trigger payload at fire time.

## What You Can Reference

### Contact Properties

Every contact carries three default properties that resolve as merge tags.

| Merge tag         | Example           |
| ----------------- | ----------------- |
| `{{ email }}`     | `philip@brew.new` |
| `{{ firstName }}` | `Philip`          |
| `{{ lastName }}`  | `Sørensen`        |

`subscribed`, `created_at`, and `updated_at` are filter and sort fields rather than merge tags. Brew keeps them out of the variable picker because they are bookkeeping. If you want a date in email copy, store it as a custom property.

[Manage Contacts](/audience/manage-contacts) owns the full contact field list and the reserved names you can't use for custom properties.

### Custom Properties

Any custom property resolves by its name, so a property named `plan` is `{{ plan }}`. Custom properties are the way to personalize on anything Brew doesn't track by default.

### Trigger Payload Fields

In an automation, every field declared on the trigger event resolves by name. An event carrying `orderId` gives you `{{ orderId }}`.

Keep payloads flat. Nested objects are harder to reference in email content, which is why [Build an Automation](/create-emails/build-an-automation) recommends a flat schema.

<Note>
  Connected sources declare their own payload fields, and each integration page lists what its events carry. See [Stripe](/integrations/import/stripe), [Clerk](/integrations/import/clerk), [Shopify](/integrations/import/shopify), [Stytch](/integrations/import/stytch), [Supabase](/integrations/import/supabase), [WorkOS](/integrations/import/workos), and [RevenueCat](/integrations/import/revenuecat).
</Note>

## When a Tag Does Not Resolve

An unresolved tag renders as empty rather than as an error, and the email still sends. That makes a typo silent, so it's worth checking a tag before a large send.

Three things cause this:

<AccordionGroup>
  <Accordion title="The name does not match" icon="font">
    Names are case-sensitive and must match the declared field exactly. `{{ firstname }}` does not match a field named `firstName`.
  </Accordion>

  <Accordion title="The field is not declared on the event" icon="list-check">
    Some fields exist only on certain events from a provider. Stripe's `invoiceNumber`, for example, is declared on `invoice.created`, `invoice.paid`, and `invoice.payment_failed`, but not on `invoice.upcoming`.
  </Accordion>

  <Accordion title="The field is internal" icon="eye-slash">
    Brew strips some provider fields before an automation sees them, so they never resolve even though the provider sends them. Stripe's opaque object IDs work this way. The Stripe customer ID still reaches the contact as the `stripe_customer_id` custom field, so filter on it there.
  </Accordion>
</AccordionGroup>

Use a fallback wherever an empty value would read badly. `Hi {{ firstName }},` becomes `Hi ,` for a contact with no name. `Hi {{ firstName | there }},` reads correctly either way.

## Check Before You Send

Send yourself a test and confirm each tag resolves, and that the fallback reads naturally when it does not. [QA an Email Before a Big Send](/recipes/qa-before-a-big-send) covers the wider pre-send routine.

## Need Help?

Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:

<Tabs>
  <Tab title="Self-Service Tools">
    <CardGroup cols="2">
      <Card title="Search Documentation" icon="magnifying-glass" color="#c44925">
        Type in the "Ask any question" search bar at the top left to instantly find relevant documentation pages.
      </Card>

      <Card title="ChatGPT/Claude Integration" icon="robot" color="#c44925">
        Click "Open in ChatGPT" at the top right of any page to explore it further with ChatGPT or Claude.
      </Card>
    </CardGroup>
  </Tab>

  <Tab title="Talk to Our Team">
    <CardGroup cols="2">
      <Card title="Schedule a Call" icon="calendar" color="#c44925" href="https://calendar.google.com/calendar/u/0/appointments/schedules/AcZssZ1iYoRUG1J792XQpbuQLjSRRDupr7MwraFK-HQRCtTYdBmrQi8nZu2qXfzKQigb8gbKJK3KN3-R">
        Book time with our founders for personalized guidance on strategy, best practices, or complex implementation questions.
      </Card>

      <Card title="Call Us Directly" icon="phone" color="#c44925">
        Need immediate assistance? Reach us at **+1-(332)-203-2145** for urgent issues or time-sensitive questions.
      </Card>

      <Card title="Slack Channel" icon="slack" color="#c44925">
        Our preferred support channel. You'll receive an invite after signup for direct founder support and fast responses.
      </Card>

      <Card title="Email Support" icon="envelope" color="#c44925" href="mailto:support@brew.new">
        Contact us at **[support@brew.new](mailto:support@brew.new)** for detailed inquiries or if you prefer not to use Slack.
      </Card>
    </CardGroup>
  </Tab>
</Tabs>
