PO number invoice

Add a PO number to a Shopify invoice

Generate starter Liquid for showing PO numbers, company fields, payment terms, and B2B notes on Shopify Order Printer invoices.

Quick answer

Add a PO number to a Shopify invoice for Shopify Order Printer

Generate a PO-number-style metafield block and add fallback text. Start in a duplicate Shopify Order Printer template, paste the Liquid in the right placement area, and preview with real orders before saving.

  1. Confirm where the PO number is stored in Shopify.
  2. Check whether Order Printer exposes order.po_number for the B2B order before choosing a metafield fallback.
  3. Generate a block for order metafields when the PO belongs to one order.

Copy-ready example

Starter Liquid pattern

Use this as a visible pattern, then use the generator below to adjust the exact field, fallback text, layout, and test notes.

{% assign opk_po_number = order.po_number | default: order.metafields.custom.po_number.value %}
{% if opk_po_number != blank %}
  <p><strong>PO number:</strong> {{ opk_po_number }}</p>
{% endif %}

PO number invoice

Add a PO number to a Shopify invoice

Generate a PO-number-style metafield block and add fallback text.

The snippet checks order.po_number, order/customer metafields, and PO-like note attributes.
Standard order with one clear product row.
Need a PO number inserted into a B2B invoice?

The fix checks order, customer, and note-attribute sources before printing a clean fallback.

Add PO number to my invoice

Paid feature signals

Generated Liquid

Copy-paste code

{% assign opk_po_number = order.po_number | default: order.metafields.custom.po_number.value | default: customer.metafields.custom.po_number.value %}

{% if opk_po_number == blank %}
  {% for attribute in note_attributes %}
    {% assign attribute_name = attribute.first | downcase %}
    {% if attribute_name contains "po" or attribute_name contains "purchase order" %}
      {% assign opk_po_number = attribute.last %}
    {% endif %}
  {% endfor %}
{% endif %}

<p class="opk-po-number">
  <strong>PO number:</strong>
  {% if opk_po_number != blank %}
    {{ opk_po_number }}
  {% else %}
    Not provided
  {% endif %}
</p>

Install wizard

Place the snippet before testing output.

1
Template area

Invoice header or payment terms

2
Paste target

Paste near invoice number, billing details, or payment terms on B2B invoice templates.

3
Test order

B2B order with PO plus regular order without PO

Paste location

Paste near invoice number, billing details, or payment terms on B2B invoice templates.

Test checklist

  • Duplicate the Shopify Order Printer template before editing the live one.
  • Preview with the regular order.
  • Preview both a matching B2B order and a regular consumer order.
  • Print or save one test preview before using the template in production.

Common failure

  • The PO number is collected as a note attribute, but the template uses a metafield path.
  • The field is only present on B2B orders, so consumer test orders look blank.
  • Payment terms need separate handling from the PO number itself.

Mock preview

#1048Standard order with one clear product row.

PO number: PO-4832

Use case

When to use this tool

Best for B2B and wholesale merchants who need purchase order numbers visible on customer-facing invoices.

Targets a specific B2B invoice pain point.

Works with order metafields, customer metafields, or order note workflows.

Checks Shopify's order.po_number before falling back to order/customer metafields and PO-like note attributes.

Separates purchase order number placement from payment terms, company profile, and wholesale account fields.

Covers both order-level PO numbers and customer-level default PO references.

Pairs naturally with VAT and wholesale invoice requests.

Free tool fit

Use the snippet when the edit is narrow.

Generate a PO-number-style metafield block and add fallback text.

  • You know which Shopify Order Printer template you want to edit.
  • You can test in a duplicate template before touching the live one.
  • The field or layout change maps to the Liquid objects listed on this page.

Manual fix fit

Request help when placement is risky.

Get PO number, company name, payment terms, and wholesale fields merged into your invoice.

  • Your current template already has custom loops, tables, CSS, or app-specific fields.
  • The snippet works in isolation but prints blank, repeats, or breaks layout in your real template.
  • The document is customer-facing, B2B, VAT, customs, or warehouse-critical and needs careful test notes.

Install steps

Copy into Shopify Order Printer carefully.

The preview uses sample data. Always test the template with real orders before using it for fulfillment, accounting, customs, or customer-facing documents.

  1. Step Confirm where the PO number is stored in Shopify.
  2. Step Check whether Order Printer exposes order.po_number for the B2B order before choosing a metafield fallback.
  3. Step Generate a block for order metafields when the PO belongs to one order.
  4. Step Use customer metafields only for persistent account or wholesale references that repeat across orders.
  5. Step Check note attributes when the PO number is collected by a cart field, quote app, or checkout extension.
  6. Step Place the field near invoice number, billing details, or payment terms.
  7. Step Keep payment terms, company name, and tax IDs in separate rows so blank PO numbers do not hide other B2B details.
  8. Step Preview with a B2B order that actually has a PO number and with a consumer order that does not.

FAQ

Common Shopify Order Printer issues

Where does Shopify store a PO number?

It depends on the store setup. Common places include order metafields, note attributes, customer fields, or B2B company data.

Should I use an order metafield or a customer metafield?

Use an order metafield when each purchase can have a different PO number. Use a customer metafield only for an account-level reference that should repeat.

Can this hide retail prices for wholesale orders?

That is possible in a custom template, but it needs careful conditions so customer-facing invoices stay correct.

Can this show payment terms?

Yes if the payment terms data is available to the Order Printer template.

Where should the PO number print?

Place it near invoice number, billing details, or payment terms. Do not place order-level PO output inside the product loop.

Related exact fixes

Follow the next likely Order Printer problem.

These links connect adjacent search intents, such as blank metafields, item-level customs fields, B2B invoice data, and one-off template fixes.

VAT invoice fields

Shopify VAT invoice template for Order Printer

Best for merchants who need VAT-related fields visible on printed invoices while keeping the final compliance review in-house.

Open related fix

Metafield Liquid generator

Add metafields to Shopify Order Printer

Best for merchants adding product specs, HS codes, country of origin, VAT notes, wholesale fields, or customer fields to printed documents.

Open related fix

Commercial invoice fields

Shopify commercial invoice template for Order Printer

Best for cross-border merchants preparing document templates that need item-level customs data in a printable layout.

Open related fix

Line item properties

print Shopify line item properties

Show gift options, personalization, and bundle details without private fields.

Open related fix

HS code Order Printer

add HS codes to Shopify Order Printer

Print item-level HS codes from product or variant metafields.

Open related fix

Country of origin invoice

add country of origin to Shopify invoices

Print origin beside customs description, quantity, and HS code.

Open related fix

Alternative comparison

Order Printer Pro alternative for small fixes

Compare one-off Liquid edits with full invoice automation.

Open related fix

Sufio alternative

Sufio alternative for small invoice fixes

Route full compliance automation away from simple Order Printer edits.

Open related fix

Common Order Printer fixes

Keep editing the same Shopify template.

These are the highest-signal internal paths for merchants who need template code, packing slip layout, barcodes, metafields, or 4x6 print fixes.

Template code generator

free Shopify Order Printer template code generator

Start with a printable template before adding fields.

Open tool

Packing slip template code

Shopify packing slip template code

Build the base pick-pack document for warehouse use.

Open tool

Barcode snippet generator

add a barcode to a Shopify packing slip

Print order, SKU, variant, tracking, or QR codes.

Open tool

Metafield Liquid generator

Shopify Order Printer metafields

Print product, variant, order, or customer metafields.

Open tool

4x6 packing slip starter

Shopify 4x6 packing slip template

Test thermal printer layout, margins, and item overflow.

Open tool

Liquid objects

Fields this page usually touches

  • order.po_number
  • order.metafields
  • customer.metafields
  • note_attributes
  • billing_address.company
  • payment_terms
  • customer.company

Common errors

Watch these before saving

  • The PO number is collected as a note attribute, but the template uses a metafield path.
  • The field is only present on B2B orders, so consumer test orders look blank.
  • Payment terms need separate handling from the PO number itself.
  • A customer-level PO reference is printed on every invoice even when the buyer provided a different order-specific PO.
  • The PO number is placed inside the line item loop and repeats once per product.
  • Wholesale company fields, VAT ID, and PO number are merged into one line that disappears when one value is blank.

Limits

What this does not replace

  • Shopify stores may collect PO numbers in different places.
  • Payment terms and company profiles can vary by plan and setup.
  • Complex B2B invoice layouts should be tested with real wholesale orders.
  • The generator cannot verify whether order.po_number, company data, or payment_terms are available in every store setup.
  • Purchase order wording and invoice requirements may differ by buyer or region.