The real symptom
- Liquid works in an order confirmation or shipping notification.
- The same code outputs blank in Shopify Email.
- Variables such as
subtotal_line_itemsor order-specific totals are missing. - A Flow-triggered marketing email has different data than a transactional notification.
Likely causes
- The notification object model is not the Shopify Email object model.
- The email is sent to a customer segment, not a specific order.
- The Flow trigger supplies customer data but not order line-item data.
- A variable is available only after an event such as fulfillment or payment capture.
Fix path
- Identify where the email is being built: Notifications, Shopify Email, or Flow.
- Open the variable reference for that surface.
- Replace order-notification variables with objects available to that email type.
- For order-specific messaging, use a transactional notification or Flow triggered by an order event.
- Test with a real object that contains the data you reference.
Simple checks
- Preview data can be incomplete; test with a real order when order data matters.
- If the email is customer-segment based, do not expect line-item arrays.
- Use simple output first, then add conditions.
Useful code or DevTools check
{% if subtotal_line_items %}
{% for line in subtotal_line_items %}
{{ line.title }}
{% endfor %}
{% endif %}
This belongs in a notification context where the variable exists, not a generic marketing email.
Do not do this
Do not treat “Liquid supported” as “every Shopify Liquid object is available.” Each Shopify email surface has its own scope.

