Auto Purchase Orders logo Auto Purchase Orders
Help Center / Supplier email notification

Render address


If you want to render the PO shipping or billing address in the email notification template, you should explicitly provide each value like this:

{{ purchase_order.billing_address.address_line_1 }}
{{ purchase_order.billing_address.city }}

{{ purchase_order.shipping_address.city }}

Read about the available address variables in this guide.


Here’s a complete example of rendering the shipping address, which includes all the address fields as well as the customer’s name. Feel free to paste this code as-is into your notification template.

<p>
  <b>Shipping address:</b>
  {%- capture s_address_content %}
    {{ customer.first_name }} {{ customer.last_name }}%%%
    {{ purchase_order.shipping_address.company }}%%%
    {{ purchase_order.shipping_address.address_line_1 }} {{ purchase_order.shipping_address.address_line_2 }}%%%
    {{ purchase_order.shipping_address.city }}%%%
    {{ purchase_order.shipping_address.region }}%%%
    {{ purchase_order.shipping_address.postal_code }}%%%
    {{ purchase_order.shipping_address.country }}%%%
    {{ customer.phone }}
  {%- endcapture %}
  {% assign s_address = s_address_content | strip_newlines | split: "%%%" | compact -%}
  {%- for line_content in s_address -%}
    {%- assign line = line_content | strip -%}
    {%- if forloop.length > 0 -%}
      {%- if line == blank -%}
        {%- continue -%}
      {%- else -%}
        {{ line }}{% unless forloop.last %}, {% endunless %}
      {%- endif -%}
    {%- endif -%}
  {%- endfor %}
</p>

Auto Purchase Orders logo
Auto Purchase Orders
Designed, built, and backed by Magic Bits
Dan
Written by Dan
Published on