Skip to main content
Skip table of contents

Personalization options in Klaviyo

Before Getting Started:

When using the Malomo Shopify/Klaviyo integration, the following personalized data points can be used in the body of shipment-related emails that you send to your customers:

 

CUSTOMER INFORMATION

INFORMATION

EXAMPLE OUTPUT

EVENT VARIABLE

First Name

CODE
Mister
CODE
{{ event.extra.order.meta.shopify_order.customer.first_name }}

Last Name

CODE
Rogers
CODE
{{ event.extra.order.meta.shopify_order.customer.last_name }}

Email

CODE
misterrogers@pbs.com
CODE
{{ event.extra.order.meta.shopify_order.customer.email }}

Phone Number

CODE
123-456-7890
CODE
{{ event.extra.order.meta.shopify_order.customer.phone }}

 

DELIVERY INFORMATION

INFORMATION

EXAMPLE OUTPUT 

EVENT VARIABLE

Estimated Delivery Date

CODE
September 19, 2021, 9PM
CODE
{{ event.estimated_delivery_date }}

Actual Delivery Date

CODE
September 19, 2020 10 PM 
*(only available when delivered)
CODE
{{ event.delivered_at }}

 

SHIPPING ADDRESS

INFORMATION

EXAMPLE OUTPUT 

EVENT VARIABLE

Ship First Name

CODE
Mister
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.first_name }}

Ship Last Name

CODE
Rogers
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.last_name }}

Ship Company

CODE
Malomo
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.company }}

Ship Phone

CODE
123-456-7890
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.phone }}

Ship Address Line 1

CODE
123 Rogers Lane
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.address1 }}

Ship Address Line 2

CODE
Apt. 305
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.address2 }}

Ship City

CODE
Pittsburgh
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.city }}

Ship Province

CODE
Pennsylvania
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.province }}

Ship Province Code

CODE
PA
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.province_code }}

Ship Zip

CODE
46205
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.zip }}

Ship Country Code

CODE
US
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.country_code }}

Ship Country

CODE
United States
CODE
{{ event.extra.order.meta.shopify_order.shipping_address.country }}

 

SHIPPING INFORMATION

INFORMATION

EXAMPLE OUTPUT 

EVENT VARIABLE

Carrier Service

CODE
FedEx
CODE
{{ event.carrier_name }}

Tracking Number

CODE
99812911999333
CODE
{{ event.tracking_code }}

Tracking Link

CODE
"Track Package" button
CODE
{{ event.extra.order.url }}

 

ORDER DETAILS

INFORMATION

EXAMPLE OUTPUT 

EVENT VARIABLE

Order Number

CODE
1012
CODE
{{ event.extra.order.number }}

Order Name

CODE
#1012
CODE
{{ event.extra.order.meta.shopify_order.name }}

Order Created at Date

CODE
July 2, 2019 5:16 PM
CODE
{{ event.extra.order.meta.shopify_order.created_at }}

Order Note

CODE
This is a note from the 
Shopify order notes section.
CODE
{{ event.extra.order.meta.shopify_order.note }}

Discount Codes

CODE
THANKYOU10
CODE
{{ event.extra.order.meta.shopify_order.discount_codes }}

Total Discount

CODE
0.00
CODE
{{ event.extra.order.meta.shopify_order.total_discounts }}

Subtotal Price

CODE
102.00
CODE
{{ event.extra.order.meta.shopify_order.subtotal_price }}

Tax Price

CODE
7.14
CODE
{{ event.extra.order.meta.shopify_order.tax_price }}

Shipping Price

CODE
2.13
CODE
{{ event.extra.order.meta.shopify_order.shipping_price }}

Total Price

CODE
109.14
CODE
{{ event.extra.order.meta.shopify_order.total_price }}

Financial Status

CODE
PAID
CODE
{{ event.extra.order.meta.shopify_order.financial_status }}

Total Paid

CODE
109.14
CODE
{{ event.extra.order.meta.shopify_order.total_price }}

Cancelled on Date

CODE
July 1, 2019 11:03 PM
CODE
{{ event.extra.order.meta.shopify_order.cancelled_at }}

Cancellation Reason

CODE
Refund
CODE
{{ event.extra.order.meta.shopify_order.cancel_reason }}

Total Refunded

CODE
56.76
CODE
{{ event.extra.order.meta.shopify_order.total_refunded_amount }}

 

LINE ITEMS

Each line item represents a product purchased by the customer who is receiving the email. You can choose to show either all the products a customer ordered or all the products for an individual shipment.

 

LINE ITEMS IN ORDER

We recommend using a dynamic table block in Klaviyo to show all products a customer ordered. To do this, configure the data source elements as: 

CODE
Row collection: event.extra.order.meta.shopify_order.line_items

Row alias: line_item

 

Next, you'll use these variables within your dynamic table block: 

INFORMATION

EXAMPLE OUTPUT 

EVENT VARIABLE

Item Title

CODE
Red Sweater
CODE
{{ line_item.title }}

Item Quantity

CODE
1
CODE
{{ line_item.quantity }}

Item Variant Title:

CODE
Long Sleeve
CODE
{{ line_item.variant.title }}

Item Image

CODE
Shows image of product
CODE
{{ line_item.image.src }}

Item Link

CODE
URL for PDP
CODE
{{ line_item.product.url }}

Item Final Line Price

CODE
$102.00
CODE
{{ line_item.final_line_price }}

 

LINE ITEMS IN FULFILLMENT

We recommend using a static table block in Klaviyo to show all products in a customer's shipment. To do this, add the following code before the static product block:

CODE
{% with fulfillment=event.extra.order.meta.shopify_order.fulfillments|lookup:event.tracking_code %} {% for i in fulfillment.fulfillment_line_items %}

And add the following code after the static product block: 

CODE
{% endfor %}{% endwith %}

 

Next, you'll use these variables within your static table block: 

INFORMATION

EXAMPLE OUTPUT 

EVENT VARIABLE

Item Title

CODE
Red Sweater
CODE
{{ i.line_item.title }}

Item Quantity

CODE
1
CODE
{{ i.line_item.quantity }}

Item Variant Title:

CODE
Long Sleeve
CODE
{{ i.line_item.variant.title }}

Item Image

CODE
Shows image of product
CODE
{{ i.line_item.image.src }}

Item Link

CODE
URL for PDP
CODE
{{ i.line_item.product.url }}

Item Final Line Price

CODE
$102.00
CODE
{{ i.line_item.final_line_price }}

 

View our complete list of Klaviyo variables here. 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.