How can I display an order's custom metafield in the email order confirmation to the customer?

Topic summary

Goal: include an order’s custom metafield (order.metafields.order.po_number) in the customer’s order confirmation email.

Attempt: Liquid code snippet was tried:

  • {% if metafields.order.po_number != blank %}
  • {{ metafields.order.po_number }}
  • {% endif %}

Clarification: Based on Shopify’s notification email variables documentation, custom order metafields aren’t supported in the standard order confirmation template, so this direct approach appears not possible.

Workaround: One participant suggests using an automation app (Mesa) to populate order metafields in a separate post‑purchase email (not the native confirmation), with a guide linked.

Key terms:

  • Metafields: custom data fields attached to Shopify resources (e.g., orders) for storing additional information.

Outcome/status: No native solution was provided to display the order metafield in the default confirmation email. The suggested path is sending a follow-up email via automation. Discussion remains open without an official workaround within Shopify’s built-in templates.

Summarized with AI on January 9. AI used: gpt-5.

Hello,

I have a customer order metafield called “order.metafields.order.po_number”. How can I have this displayed in the order email confirmation?

This is what I tried…

{% if metafields.order.po_number != blank %}
{{ metafields.order.po_number }}
{% endif %}

Thanks in advance!

2 Likes

Hello,

Did you find any solution to this?

I believe it’s not possible based on looking at these docs:

https://help.shopify.com/en/manual/orders/notifications/email-variables#order-fulfillment

I built out an automation workflow with our app mesa to populate order metafields into a post purchase email - this wouldn’t be the regular order confirmation email but rather a separate one.

https://www.getmesa.com/blog/send-a-post-order-notification-email-with-metafield-values/