AutoPrintEmail
    How It WorksTeamsPricingDownloadHelp
    Sign InGet Started Free
    1. Help
    2. Print Metafields on a Shopify Packing Slip
    On this page
    What You Can ReadAdd It to the TemplateVariant First, Product as FallbackNumbers, True or False, and ListsThe Preview Shows a SampleNeed Help?
    Shopify

    Print Metafields on a Shopify Packing Slip

    4 min read

    The packing slip lists the jacket. It does not say the jacket takes two weeks to arrive. That detail lives in a metafield on the variant, and the person packing the box never sees it.

    Put it on the slip. A packing slip template can read your product and variant metafields, the same way a Shopify theme does. Paste a few lines, save, done.

    Table of Contents

    • What You Can Read
    • Add It to the Template
    • Variant First, Product as Fallback
    • Numbers, True or False, and Lists
    • The Preview Shows a Sample
    • Need Help?

    What You Can Read

    Inside the line item loop of the packing slip template, each item has two new things:

    • item.variant.metafields.<namespace>.<key> for a metafield on the variant.
    • item.product.metafields.<namespace>.<key> for a metafield on the product.

    The namespace and key are the ones Shopify shows under Settings, then Custom data. A metafield called custom.lead_time is item.variant.metafields.custom.lead_time.

    Nothing changes in what AutoPrintEmail can access. It still only reads your store.

    Add It to the Template

    1. In the AutoPrintEmail app, open Templates and pick Order packing slip.
    2. Switch to Code.
    3. Find the line item loop. It starts with {% for item in order.lineItems %}.
    4. Paste this where the text should appear, for example under the item title:
    {% if item.variant.metafields.custom.lead_time != blank %}
    <div class="meta">Lead time: {{ item.variant.metafields.custom.lead_time }}</div>
    {% endif %}
    {% if item.variant.metafields.custom.lead_time != blank %}
    <div class="meta">Lead time: {{ item.variant.metafields.custom.lead_time }}</div>
    {% endif %}
    1. Change custom.lead_time to your own namespace and key.
    2. Click Save and print a sample.

    Variant First, Product as Fallback

    Some shops set the value on the product and only override it on a few variants. This prints the variant's value when there is one, and the product's when there is not:

    {% assign lead = item.variant.metafields.custom.lead_time %}
    {% if lead == blank %}
    {% assign lead = item.product.metafields.custom.lead_time %}
    {% endif %}
    {% if lead != blank %}
    <div class="meta">Lead time: {{ lead }}</div>
    {% endif %}
    {% assign lead = item.variant.metafields.custom.lead_time %}
    {% if lead == blank %}
    {% assign lead = item.product.metafields.custom.lead_time %}
    {% endif %}
    {% if lead != blank %}
    <div class="meta">Lead time: {{ lead }}</div>
    {% endif %}

    Numbers, True or False, and Lists

    Printed on its own, a metafield gives its text. Add .value when you need the real type:

    • A number you want to do maths with: {{ item.variant.metafields.custom.days.value | plus: 1 }}
    • A true or false: {% if item.product.metafields.custom.fragile.value %}FRAGILE{% endif %}
    • A list: {{ item.product.metafields.custom.materials.value | join: ", " }}

    The Preview Shows a Sample

    The preview and the sample print use a made-up order, so there is no real product behind them. A metafield shows as a stand-in such as "Sample lead time". That is there so you can see where it lands on the page.

    Real orders print the real value.

    Need Help?

    It prints blank on a real order? Check these in order:

    • The namespace and key match Shopify exactly. lead_time and leadtime are different keys.
    • The metafield is on the right thing. A value saved on the product is read with item.product, not item.variant.
    • That variant actually has a value. An empty metafield prints nothing, which is what the != blank check is for.
    • The line is a real product. A custom line added by hand to an order has no variant, so it has no metafields.

    Still stuck? Message us with the order number and the metafield name and we will look at it with you.

    AutoPrintEmail

    The desktop app that sends emails directly to your printer. Reduce screen time without missing important communications.

    Quick Links

    • Automated Email Printing Guide
    • Benefits
    • How It Works
    • For Teams
    • Testimonials
    • Reviews on Trustpilot
    • FAQ
    • Privacy Policy
    • Terms of Service
    • Blog
    • About

    Download

    Get started with AutoPrintEmail today and receive a 3-day free trial.

    Get Started Free

    Email Printing

    • Automatically Print Email Attachments (PDF, Word, Excel)
    • Auto-Print Email Invoices & Receipts | Automatic Business Printing
    • Auto-Print Gmail Emails (2026 Guide) | Automatic Gmail Printing
    • Auto-Print Outlook & Office 365 Emails: No Plugin, 24/7
    • Email Printing Automation for Business Operations | Secure & Reliable
    • Click-and-Collect for Small Shops: The Complete Weekend Recipe
    • Email to Print Software: Auto-Print Emails & Attachments to Any Printer

    Compare

    • AutoPrintEmail vs ItJustPrints - Desktop or Mobile Print Station?

    Integrations

    • Auto-Print Gmail Attachments & Emails - Set It and Forget It
    • Auto-Print Outlook Emails Without a Plugin | Standalone Desktop App
    • Auto-Print Office 365 Emails: No Plugin Required
    • Auto-print Shopify inventory transfers, orders, and labels
    • Auto-Print Etsy Orders & Packing Slips - Handmade Seller Automation
    • Auto-Print IMAP/POP3 Emails - Works with Any Email Provider
    • Auto-Print Square Orders - Kitchen Tickets & Receipts
    • Auto-Print Toast POS Orders - Kitchen Ticket Printing
    • Auto-Print ShipStation Orders - Packing Slips & Shipping Labels
    • Print From Zapier Automatically - Orders, Forms and Alerts on Paper
    • Print API - Send Print Jobs to Any Printer With One HTTP Request

    Solutions

    • Email to Print - Auto-Print Emails to Any Printer
    • Auto-Print Invoices from Email: AP & AR Automation
    • Stop Manually Printing E-commerce Invoices - Automate in 2 Minutes
    • Restaurant Order Printing Automation - Auto-Print Delivery Orders
    • Legal & Real Estate Document Printing Automation
    • Logistics Waybill & Shipping Label Automation
    • Healthcare Document Printing Automation - HIPAA-Compliant Local Processing
    • Pharmacy Email Printing Software - Auto-Print Wholesaler Invoices, PBM Notices, and Compliance Docs
    • Accounting Firm Document Automation - Auto-Print Tax Docs & Client Files
    • Auto Shop Document Automation - Print Work Orders & Estimates Automatically
    • Insurance Agency Document Automation - Auto-Print Policies, COIs & Claims
    • Auto-Print Faxes From Email, Without a Fax Machine

    © 2026 AutoPrintEmail. All rights reserved.

    Privacy PolicyTerms of ServiceSecurity