How to Add a Gift Message to Shopify Order Confirmation Email

2026-10-12 · support

Why Add a Gift Message to Your Shopify Order Confirmation Email?

When a customer buys a gift on your Shopify store, they're often buying from a different address than the recipient and want a note included. If that note never makes it to the recipient, you get two disappointed people and a support ticket. Adding a gift message field to your order confirmation email solves this cleanly: the buyer writes the message at checkout, and it lands in the confirmation email that ships with the order details.

There's a practical side too. Order confirmation emails have some of the highest open rates of any email you'll send — customers open them to verify what they bought. That makes them an ideal place to surface gift information, delivery instructions, or a "this is a gift, no prices included" reminder. If you're running a store where gifting is a meaningful share of orders (jewelry, candles, coffee, baby goods, corporate gifting), this is a small change with an outsized effect on repeat purchases.

This guide walks through the exact steps to add a gift message to your Shopify order confirmation email using Liquid, plus how to test it and when it's worth paying for an app instead.

Before You Start: Accessing Shopify Notification Templates

Shopify's transactional emails live under Settings → Notifications. From there:

A few things to know before editing:

Step 1: Locate the Order Confirmation Template

In Settings → Notifications → Order confirmation, scroll to the section where the order summary and customer info appear. You're looking for a spot after the greeting (Hi {{ customer.first_name }}) and before or after the item list, depending on how prominent you want the message.

A good placement is right after the order summary table and before the shipping address block. That way the buyer sees what they ordered, then immediately sees the gift note they wrote, then the delivery details.

If you're using a cart attribute to capture the gift message, the variable will look something like {{ attributes['Gift message'] }}. If you're using a line item property, it will appear inside the line item loop as {{ line_item.properties['Gift message'] }}. Check how your theme or app names the field — the label must match exactly, including capitalization and spacing.

Step 2: Insert the Gift Message Code (Liquid Variables)

Once you've confirmed the attribute name, wrap the output in a conditional so the block only renders when a message exists. Otherwise every non-gift order shows an empty box.

Here's a working pattern for a cart attribute:

{% if attributes['Gift message'] %}
  <table class="gift-message" style="margin-top: 20px; border-collapse: collapse;">
    <tr>
      <td style="padding: 12px; border: 1px solid #e5e5e5; background-color: #fafafa;">
        <strong>Gift message:</strong><br>
        {{ attributes['Gift message'] }}
      </td>
    </tr>
  </table>
{% endif %}

For a line item property, place this inside the {% for line in line_items %} loop:

{% if line.properties['Gift message'] %}
  <p><em>Gift message: {{ line.properties['Gift message'] }}</em></p>
{% endif %}

Two details that matter:

Choosing between cart attributes and line item properties

Method Where it's set Best for Renders in email as
Cart attribute Cart page or checkout via cart note/attribute One message per order {{ attributes['Gift message'] }}
Line item property Product page or cart line Different message per item {{ line.properties['Gift message'] }}
Order note Checkout note field Buyer instructions to you, not the recipient {{ note }}

If you sell gift baskets with multiple recipients in one order, use line item properties. For a single gift message per order, cart attributes are simpler.

Step 3: Test Your Gift Message Setup

Never ship this without testing. Here's the sequence:

  1. Place a test order on your live store using a real payment method (Shopify's Bogus Gateway works if you have it enabled, or use a 100% off discount code with a real card on file).
  2. Fill in the gift message field with something distinctive like "TEST GIFT MESSAGE 123."
  3. Check the confirmation email in the inbox tied to that test customer account.
  4. Verify the block appears with your message, and that the styling looks right on mobile. Gmail and Apple Mail render tables differently — check both if you can.
  5. Place a second test order without a gift message and confirm the block does not appear at all.
  6. Refund or cancel the test orders so they don't pollute your reports.

If you have Shopify's Preview button in the notification editor, use it — but note that previews don't include real order attributes, so the conditional block will typically render as hidden. The live test order is the only reliable check.

Troubleshooting Common Issues with Gift Messages in Shopify Emails

Best Practices for Gift Messaging (and When to Use an App)

A few habits that keep this feature useful rather than noisy:

When to skip the custom code and use an app: if you need gift wrapping options, scheduled delivery, gift receipts, or per-item messages across a large catalog, a dedicated app is faster than maintaining Liquid. Options in the Shopify App Store include Gift Box, Giftnote, and Gift Wrap. Features and pricing change, so check current pricing and reviews on the App Store listing before installing. For a single store with one gift message field, the code above is free and takes about 15 minutes.

A quick comparison

Approach Setup time Cost Best for
Custom Liquid in notification template 15–30 min Free Single gift message field, simple stores
Cart attribute + theme snippet 1–2 hours Free Stores comfortable editing theme code
Gift app 30 min Varies — check current pricing Gift wrapping, gift receipts, multi-item gifts

Conclusion

Adding a gift message to your Shopify order confirmation email is a small Liquid change that prevents a common customer service headache and makes gift orders feel considered. Set up your capture field, drop the conditional block into the template, and test with two live orders before you call it done. If gifting is a core part of your business, a dedicated app will save you maintenance time — but for most small stores, the code above is all you need.

FAQ

Will the gift message show on the packing slip too? Not automatically. The packing slip is a separate template under Settings → Notifications → Packing slips. Copy the same conditional block into that template if you want it printed.

Can customers edit the gift message after ordering? No — once the order is placed, the attribute is locked. If a customer emails you a correction, edit the order in Shopify admin and update the note or attribute manually before fulfilling.

Does this work with Shopify's new checkout extensibility? Yes, as long as your gift message field is captured as a cart attribute or line item property. Checkout UI extensions can write to cart attributes, and the email template reads them the same way.