Skip to content
shopemail
All guides

Personalization

Personal emails without broken variables.

Use fields, fallbacks and block rules without hard-coding your preview data.

Keep real content separate from sample data

The editor’s Data library contains available fields, managed metafields and sample values. Shared sample defaults let you test a whole theme consistently. An override for the current email lets you explore a specific situation without changing the others.

Sample data is for previews. Exported templates keep their live variable expressions; they do not embed the customer name or order shown in your preview. Use fictional values rather than real customer information.

Insert a field where it belongs

Select a text block and choose Insert variable. Pick an available scalar field and add a fallback for cases where the value is missing. The variable appears as a chip in the text editor. Data → Fields → Used fields shows where authored bindings and rules use a field.

Shopify notification data depends on the notification and event. A documented variable can still be absent when a notification is sent. Product and variant fields inside a line-item loop also need that repeated-item context.

Shopify’s notification variable reference

Add a rule to a block

Select any block and open Rules. Leave Always show selected for unconditional content. For conditional content, choose the supported field, a compatible comparison and a value. Combine conditions with All or Any and use the sample scenarios to inspect the outcome.

Keep order information present where customers need it. An essential block hidden by a rule creates an export warning. Read that warning and test the condition before installing the template.

Register metafields deliberately

Add the resource, namespace, key and scalar type in the Data library. Registration describes a field for the editor; it does not create a Shopify metafield or prove that Shopify exposes it in that notification. Verify availability with a Shopify test notification.

Object, collection and repeated-item values need a suitable rendering context. They are not interchangeable with a single text value. The editor restricts unsupported combinations rather than generating a broken expression.

Ask Claude to audit your assumptions

Open the rendered preview afterward and test both present and missing values. The best fallback is usually a natural sentence, not an exposed field name.

A PROMPT TO START WITH
Inspect the supported fields for my order confirmation.
Suggest a customer greeting with a safe fallback.
List any missing or context-dependent data.
Do not invent metafields or change essential transaction content.
Dry-run supported edits before applying them.