Shortcodes are used to inject data from the quote into the email and PDF templates. You can view all available shortcodes by selecting the Short Codes button on any of the template pages.
Quick Navigation
- Order
- Customer
- Shipping Lines
- Line Items
- Line Item Properties
- Shipping Address
- Billing Address
- Discount Codes
- Fulfillments
- Note Attributes
- Refunds
- Refund Line Items
- History
- Metafields
Order
-
{{order_number}}
The order's position in the shop's count of orders.
-
{{name}}
property with the order prefix and suffix
-
{{created_at}}
The autogenerated date and time (ISO 8601 format) when the order was created in Shopify
-
{{updated_at}}
The date and time ( ISO 8601 format) when the order was last modified.
-
{{closed_at}}
The date and time (ISO 8601 format) when the order was closed. Returns null if the order isn't closed.
-
{{currency}}
The three-letter code (ISO 4217 format) for the shop currency.
-
{{fulfillment_status}}
The order's status in terms of fulfilled line items (fulfilled, null, partial, restocked)
-
{{w3_order_status}}
The current custom order status set by the order status app
-
{{w3_order_status_name}}
The name of the current custom order status
-
{{w3_order_status_description}}
The description of the current order status
-
{{w3_order_status_updated}}
The date and time when the custom order status was last updated
-
{{w3_order_status_updated_by}}
The name of the user or service that set the current custom order status
-
{{w3_public_notes}}
Public notes set by the order status app
-
{{w3_private_notes}}
Private notes set by the order status app
-
{{w3_due_date}}
Date time field set by the order status app
-
{{financial_status}}
The status of payments associated with the order. (pending, authorized, partially_paid, paid, partially_refunded, refunded, voided)
-
{{confirmed}}
Whether inventory has been reserved for the order.
-
{{cancel_reason}}
The reason why the order was canceled.(customer, fraud, inventory, declined, other)
-
{{note}}
An optional note that a shop owner can attach to the order.
-
{{tags}}
Tags attached to the order, formatted as a string of comma-separated values.
-
{{email}}
Customer email address used when checking out
-
{{subtotal_price}}
The price of the order in the shop currency after discounts but before shipping, duties, taxes, and tips.
-
{{current_subtotal_price}}
The sum of the prices for all line items after discounts and returns in the shop currency.
-
{{total_discounts}}
The total discounts applied to the price of the order in the shop currency.
-
{{current_total_discounts}}
The current total discounts on the order in the shop currency. The value of this field reflects order edits, returns, and refunds.
-
{{total_line_items_price}}
The sum of all line item prices in the shop currency.
-
{{total_price}}
The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency.
-
{{current_total_price}}
The current total price of the order in the shop currency. The value of this field reflects order edits, returns, and refunds.
-
{{total_tax}}
The sum of the prices for all tax lines applied to the order in the shop currency, including refunded and removed tax lines.
-
{{current_total_tax}}
The sum of the prices for all tax lines applied to the order in the shop currency, excluding refunded and removed tax lines.
-
{{total_weight}}
The sum of all line item weights in grams. The sum is not adjusted as items are removed from the order.
-
{{order_status_url}}
The URL pointing to the order status web page, if applicable.
-
{{customer}}
Information about the customer. The order might not have a customer and apps should not depend on the existence of a customer object. This value might be null if the order was created through Shopify POS. See the Customer details below.
-
{{shipping_lines}}
An array of objects, each of which details a shipping method used. See the Shipping Lines details below.
-
{{line_items}}
A list of line item objects, each containing information about an item in the order. See the Line Items details below.
-
{{billing_address}}
The mailing address associated with the payment method. This address is an optional field that won't be available on orders that do not require a payment method. See the Address details below.
-
{{shipping_address}}
The mailing address to where the order will be shipped. This address is optional and will not be available on orders that do not require shipping. See the Address details below.
-
{{discount_codes}}
A list of discounts applied to the order.
-
{{fulfillments}}
An array of fulfillments associated with the order. See the Fulfillment details below.
-
{{note_attributes}}
Extra information that is added to the order. Appears in the Additional details section of an order details page. See the Note Attributes details below.
-
{{refunds}}
A list of refunds applied to the order. See the Refunds details below.
-
{{history}}
The history of all custom status changes. See the History details below.
-
{{metafields}}
A list of all metafields associated with the order. See the Metafield details below.
Customer
-
{{Customer.email}}
The unique email address of the customer.
-
{{Customer.first_name}}
The customer's first name.
-
{{Customer.last_name}}
The customer's last name.
-
{{Customer.metafields}}
A list of all metafields associated with the customer. See the Metafield details below.
Shipping Lines
{% for shipping_line in shipping_lines %}
--- loop through shipping line items here ---
{% endfor %}
-
{{shipping_line.title}}
The title of the shipping method.
-
{{shipping_line.price}}
The price of this shipping method in the shop currency.
-
{{shipping_line.code}}
A reference to the shipping method.
-
{{shipping_line.source}}
The source of the shipping method.
Line Items
{% for line_item in line_items %}
--- loop through line items here ---
{% endfor %}
-
{{line_item.variant_id}}
The ID of the product variant.
-
{{line_item.product_id}}
The ID of the product that the line item belongs to. Can be null if the original product associated with the order is deleted at a later date.
-
{{line_item.title}}
The title of the product.
-
{{line_item.variant_title}}
The title of the product variant.
-
{{line_item.quantity}}
The number of items that were purchased.
-
{{line_item.current_quantity}}
The line item's quantity, minus the removed quantity.
-
{{line_item.name}}
The name of the product variant.
-
{{line_item.image}}
the URL of the variant image, or the default product image if the variant isn't assigned an image. Append "&width=100" to resize the image.
-
{{line_item.sku}}
The item's SKU (stock keeping unit).
-
{{line_item.price}}
The price of the item before discounts have been applied in the shop currency.
-
{{line_item.grams}}
The weight of the item in grams.
-
{{line_item.vendor}}
The name of the item's supplier.
-
{{line_item.total_discount}}
The total amount of the discount allocated to the line item in the shop currency.
-
{{line_item.gift_card}}
Whether the item is a gift card.
-
{{line_item.fulfillable_quantity}}
The amount available to fulfill
-
{{line_item.fulfillment_status}}
How far along an order is in terms line items fulfilled. (null, fulfilled, partial, not_eligible)
-
{{line_item.properties}}
An array of custom information for the item that has been added to the cart. See the Line Item Properties details below.
Line Item Properties
{% for prop in line_item.properties %}
--- loop through line item properties here ---
{% endfor %}
{{prop.name}}
{{prop.value}}
Shipping Address
-
{{shipping_address.name}}
The full name of the person associated with the payment method.
-
{{shipping_address.first_name}}
The first name of the person associated with the shipping address.
-
{{shipping_address.last_name}}
The last name of the person associated with the shipping address.
-
{{shipping_address.company}}
The company of the person associated with the shipping address.
-
{{shipping_address.phone}}
The phone number at the shipping address.
-
{{shipping_address.address1}}
The street address of the shipping address.
-
{{shipping_address.address2}}
An optional additional field for the street address of the shipping address.
-
{{shipping_address.city}}
The city, town, or village of the shipping address.
-
{{shipping_address.province}}
The name of the region (for example, province, state, or prefecture) of the shipping address.
-
{{shipping_address.province_code}}
The alphanumeric abbreviation of the region of the shipping address.
-
{{shipping_address.zip}}
The postal code (for example, zip, postcode, or Eircode) of the shipping address.
-
{{shipping_address.country}}
The name of the country of the shipping address.
-
{{shipping_address.country_code}}
The two-letter code (ISO 3166-1 format) for the country of the shipping address.
-
{{shipping_address.longitude}}
The longitude of the shipping address.
-
{{shipping_address.latitude}}
The latitude of the shipping address.
Billing Address
-
{{billing_address.name}}
The full name of the person associated with the payment method.
-
{{billing_address.first_name}}
The first name of the person associated with the payment method.
-
{{billing_address.last_name}}
The last name of the person associated with the payment method.
-
{{billing_address.company}}
The company of the person associated with the billing address.
-
{{billing_address.phone}}
The phone number at the billing address.
-
{{billing_address.address1}}
The street address of the billing address.
-
{{billing_address.address2}}
An optional additional field for the street address of the billing address.
-
{{billing_address.city}}
The city, town, or village of the billing address.
-
{{billing_address.province}}
The name of the region (for example, province, state, or prefecture) of the billing address.
-
{{billing_address.province_code}}
The alphanumeric abbreviation of the region of the billing address.
-
{{billing_address.zip}}
The postal code (for example, zip, postcode, or Eircode) of the billing address.
-
{{billing_address.country}}
The name of the country of the billing address.
-
{{billing_address.country_code}}
The two-letter code (ISO 3166-1 format) for the country of the billing address.
-
{{billing_address.longitude}}
The longitude of the billing address.
-
{{billing_address.latitude}}
The latitude of the billing address.
Discount Codes
{% for discount in discount_codes %}
--- loop through discounts here ---
{% endfor %}
-
{{discount.amount}}
The amount that's deducted from the order total. When you create an order, this value is the percentage or monetary amount to deduct. After the order is created, this property returns the calculated amount.
-
{{discount.code}}
When the associated discount application is of type code, this property returns the discount code that was entered at checkout. Otherwise this property returns the title of the discount that was applied.
-
{{discount.type}}
The type of discount (fixed_amount, percentage, shipping)
Fulfillments
{% for fulfillment in fulfillments %}
--- loop through fulfillment here ---
{% endfor %}
-
{{fulfillment.created_at}}
The date and time when the fulfillment was created.
-
{{fulfillment.order_id}}
The unique numeric identifier for the order.
-
{{fulfillment.status}}
The status of the fulfillment (pending, open, success, cancelled, error, failure)
-
{{fulfillment.tracking_company}}
The name of the tracking company.
-
{{fulfillment.tracking_number}}
A tracking number provided by the shipping company.
-
{{fulfillment.tracking_url}}
The URL to track the fulfillment.
-
{{fulfillment.updated_at}}
The date and time (ISO 8601 format) when the fulfillment was last modified.
Note Attributes
{% for attribute in note_attributes %}
--- loop through note attributes here ---
{% endfor %}
{{attribute.key}}
{{attribute.value}}
Refunds
{% for refund in refunds %}
--- loop throughrefunds here ---
{% endfor %}
-
{{refund.id}}
The unique identifier for the refund.
-
{{refund.restock}}
Whether to add any of the line items back to the store's inventory
-
{{refund.refund_line_items}}
A list of refunded line items. See the Refunded Line Items details below.
Refund Line Items
{% for refund_item in refund_line_items %}
--- loop through refund line items here ---
{% endfor %}
-
{{refund_item.id}}
The unique identifier of the line item in the refund.
-
{{refund_item.line_item_id}}
The ID of the related line item in the order.
-
{{refund_item.quantity}}
The refunded quantity of the associated line item.
-
{{refund_item.restock_type}}
How this refund line item affects inventory levels. (no_restock, cancel, return, legacy_restock)
-
{{refund_item.subtotal}}
The subtotal of the refund line item.
-
{{refund_item.total_tax}}
The total tax on the refund line item.
-
{{refund_item.line_item}}
A line item being refunded. See the Line Item details above.
History
{% for history_item in history %}
--- loop through history items here ---
{% endfor %}
-
{{history_item.status_name}}
The name of the status
-
{{history_item.status_name_public}}
the public name of the status.
-
{{history_item.status_changed}}
the date and time the status was set.
-
{{history_item.customer_emails_sent}}
Whether the app sent emails to the customer when the status was set (true, false)
-
{{history_item.customer_emails}}
The list of customer email addresses that emails were sent to.
-
{{history_item.additional_emails_sent}}
Whether the app sent emails to additional emails when the status was set (true, false)
-
{{history_item.additional_emails}}
The list of additional email addresses that emails were sent to.
-
{{history_item.due_date}}
The due date that was set at the time the status was set.
Metafields
{% for metafield in metafields %}
--- loop through meta fields here ---
{% endfor %}
-
{{metafield.namespace}}
The container for a group of metafields that the metafield is or will be associated with.
-
{{metafield.key}}
The unique identifier for a metafield within its namespace.
-
{{metafield.value}}
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
-
{{metafield.type}}
The type of data that is stored in the metafield
-
{{metafield.file_url}}
If the meta field type is "file," this property will return the URL to the file.
Some of the metafield values returned by Shopify are JSON strings. For these values, you can use the "to_object" filter to convert the strings into objects to display selected values easily. For example, the "money" metafield type returns values like this.
{ "amount": "5.99", "currency_code": "CAD" }
Using the "to_object" filter, you can display the "amount" using the following code.
{{metafield.value | to_object: "amount" }}