Articles on: Integrations

Klaviyo Advanced: Text Variables and Dynamic Item Blocks

Plans: Enterprise Standard, Enterprise Advanced, API users Platforms: All platforms

Overview



Explore our extensive list of variables for Klaviyo Emails and SMS triggered by AfterShip metrics. Tailor your communication with precision and elevate your customer engagement using text variables and dynamic item blocks.

What you’ll learn



In this tutorial, we’ll discuss:

Text variables - General fields
Text variables - Custom fields
Items block
OrderLineItems Configuration
ShipmentLineItems Configuration
ToShipItems Configuration
OtherShipmentsInThisOrder Configuration
AllShipmentsInThisOrder Configuration

Text variables - General fields



CategoryTrigger Filters & SplitsDescription
STOREStoreNameThe name of your store.
STOREStoreURLThe URL of your store that is sourced from the AfterShip organization setting.
COURIERCourierNameThe name of the carrier.
COURIERCourierSlugThe name of the carrier slug.
COURIERCourierContactContact information of the carrier.
COURIERCourierWebURLThe carrier’s website.
COURIERCourierRedirectURLURL where the customer can redirect their parcel.
COURIERCourierTrackingURLThe carrier's tracking page URL.
SHIPMENTTrackingNumberThe shipment's tracking number.
SHIPMENTShipmentTrackingURLURL to your AfterShip branded tracking page with “tracking number” as a pre-set parameter.
SHIPMENTShipmentCurrentStatusCurrent delivery status of the AfterShip shipment.
SHIPMENTShipmentCurrentSubStatusCurrent sub-status of the AfterShip shipment.
SHIPMENTShipmentDeliveryAddressDestination address of the shipment
SHIPMENTLatestLocationLatest location of the shipment.
SHIPMENTLatestUpdateTimeLatest update time on the shipment from the carrier.
SHIPMENTLatestCourierMessageLatest checkpoint message from the carrier.
SHIPMENTCourierEstimatedDeliveryDateThe estimated delivery date is provided by the carrier and sourced directly through AfterShip’s integration with carrier tracking services. This represents the courier’s most accurate estimate of when the shipment is expected to be delivered.
SHIPMENTAfterShipAIEstimatedDeliveryDateAfterShip leverages AI and proprietary tracking data to provide the AfterShip AI Predicted Estimated Delivery Date (AIEDD). AIEDD proactively engages with your customers and provides EDDs with higher than industry-level accuracy.
SHIPMENTAfterShipCustomSettingEstimatedDeliveryDateThe Custom estimated delivery date is a configurable setting within AfterShip Tracking’s admin dashboard. It is used in cases where merchants already have a mechanism to calculate the estimated delivery date based on the shipping type, carrier, and destination.
SHIPMENTPromisedDeliveryDateThe Promised delivery date is a date that is passed to AfterShip Tracking via Tracking API. It is used in cases where the merchants have their own projections of when their shipments will arrive.
SHIPMENTLatestEstimatedDeliveryDateThe Latest Estimated Delivery Date is determined based on the following priority order: Carrier estimated delivery date > AfterShip AI predicted estimated delivery date > Promised delivery date > Custom estimated delivery date.
SHIPMENTPickupLocationThe location from where the customer can pick up their package.
SHIPMENTSignedByThe package receiver's information.
SHIPMENTCourierServiceTypeDisplays shipment's carrier service type (e.g., UPS Express Saver®).
SHIPMENTNoteDisplays additional notes configured in AfterShip.
SHIPMENTShipmentPackageCountThe number of packages under this shipment.
SHIPMENTShipDateThe ship date of the shipment.
SHIPMENTPickupDateThe pickup date of the shipment.
SHIPMENTDeliveryDateThe delivery date of the shipment.
SHIPMENTDestinationCityThe destination city of the shipment.
SHIPMENTDestinationStateThe destination state of the shipment.
SHIPMENTDestinationCountrylso3The destination country of the shipment in Iso3 format.
SHIPMENTDestinationCountryNameThe destination country name of the shipment.
SHIPMENTDestinationPostalCodeThe destination postal code of the shipment.
SHIPMENTTransitTimeThe total time spent on this shipment so far.
SHIPMENTOriginCityThe origin city of the shipment.
SHIPMENTOriginStateThe origin state of the shipment.
SHIPMENTOriginCountrylso3The origin country of the shipment in Iso3 format.
SHIPMENTOriginCountryNameThe origin country name of the shipment.
SHIPMENTOriginPostalCodeThe origin postal code of the shipment.
SHIPMENTShipmentWeightThe weight value of the shipment.
SHIPMENTShipmentWeightUnitThe unit of weight value of the shipment.
SHIPMENTShipmentTitleDisplays the title of the shipment from AfterShip.
SHIPMENTImportSourceThe Import source of AfterShip tracking.
ORDEROrderNumberThe customer-faced number identifying a purchase or order placed by a customer.
ORDEROrderIDThe merchant internal-faced number identifying a purchase or order placed by a customer.
ORDEROrderTagsThe tag of the order from your eCommerce store.
ORDEROrderPathURLThe URL that customers can click to view their order on your eCommerce store.
ORDEROrderTrackingURLThe URL to your AfterShip branded tracking page with “order number” and “customer email address/phone number” as pre-set parameters.


CategoryTrigger Filters & SplitsDescription
ORDEROrderStatusPageURLThe order status page of an eCommerce platform.
ORDEROrderDateThe date when the order is placed.
ORDERCustomerNameThe customer's name to the delivery notification.
ORDERCustomerFirstNameThe customer's first name to the delivery notification.
ORDERCustomerEmailAddressThe customer's email address to the delivery notification.
ORDERTotalShipmentsThe number of shipments under the order.
ORDEROrderTagsThe order tag of the order.


Text variables - Custom fields



CategoryTrigger Filters & SplitsDescription
Customcustom_fields_{your custom field key}User-described fields created via AfterShip Tracking API, CSV, or in the Admin. For example, if you created “store_name” as a custom field, use it to set up your flow triggers.

If you have any queries, feel free to connect with our support team for quick assistance.

Items block



If your AfterShip organization is seamlessly linked to an eCommerce store or if you are importing shipments via Commerce API or order CSV, the dynamic items block in your Klaviyo account becomes your powerhouse.

Event Data Property NameDetails
OrderLineItemsItems encapsulated within the order.
ShipmentLineItemsItems shipped by the carrier.
ToShipItemsAn array of line items for fulfillable products not attached to any shipments—representing "yet to ship" or backordered items.
OtherShipmentsInThisOrderAn array of other shipments in the order, and their line items.
AllShipmentsInThisOrderAn array of all shipments in the order, and their line items.

OrderLineItems Configuration



Configure the data source elements using markdown:
PropertyEvent Variables
Row collectionevent.OrderLineItems
Row aliasline_item

Next, leverage these variables within your dynamic table block:

PropertyEvent Variables
Item Title{{ line_item.ItemTitle }}
Item Quantity{{ line_item.ItemQuantity }}
Item Variant Title{{ line_item.ItemVariantTitle }}
Item URL{{ line_item.ItemURL }}
Product Image{{ line_item.ItemImages }}
Product Unit Price Amount{{ line_item.ItemtUnitPrice.amount }}
Product Unit Price Currency{{ line_item.ItemtUnitPrice.currency }}
Product Final Line Price Amount{{ line_item.ItemFinalPrice.amount }}
Product Final Line Price Currency{{ line_item.ItemFinalPrice.currency }}

Efficiently configure and utilize OrderLineItems variables for a dynamic and enriched presentation in your Klaviyo dynamic table block.

ShipmentLineItems Configuration



Configure the data source elements using markdown:
PropertyEvent Variables
Row collectionevent.ShipmentLineItems
Row aliasline_item

Next, leverage these variables within your dynamic table block:
PropertyEvent Variables
Item Title{{ line_item.ItemTitle }}
Item Quantity{{ line_item.ItemQuantity }}
Item Variant Title{{ line_item.ItemVariantTitle }}
Item URL{{ line_item.ItemURL }}
Product Image{{ line_item.ItemImages }}
Product Unit Price Amount{{ line_item.ItemtUnitPrice.amount }}
Product Unit Price Currency{{ line_item.ItemtUnitPrice.currency }}
Product Final Line Price Amount{{ line_item.ItemFinalPrice.amount }}
Product Final Line Price Currency{{ line_item.ItemFinalPrice.currency }}

Additionally, the following JSX example showcases how to use these variables:

{{ line_item.ItemTitle }}
{{ line_item.ItemVariantTitle }}*{{ line_item.ItemQuantity }}
{{ line_item.ItemFinalPrice.amount }} {{ line_item.ItemFinalPrice.currency }}

Efficiently configure and utilize ShipmentLineItems variables for a dynamic and enriched presentation in your Klaviyo dynamic table block.

ToShipItems Configuration



Configure the data source elements using markdown:
PropertyEvent Variables
Row collectionevent.ToShipItems
Row aliasline_item

Next, leverage these variables within your dynamic table block:
PropertyEvent Variables
Item Title{{ line_item.ItemTitle }}
Item Quantity{{ line_item.ItemQuantity }}
Item Variant Title{{ line_item.ItemVariantTitle }}
Item URL{{ line_item.ItemURL }}
Product Image{{ line_item.ItemImages }}
Product Unit Price Amount{{ line_item.ItemtUnitPrice.amount }}
Product Unit Price Currency{{ line_item.ItemtUnitPrice.currency }}
Product Final Line Price Amount{{ line_item.ItemFinalPrice.amount }}
Product Final Line Price Currency{{ line_item.ItemFinalPrice.currency }}

Efficiently configure and utilize ToShipItems variables for a dynamic and enriched presentation in your Klaviyo dynamic table block.

OtherShipmentsInThisOrder Configuration



This section details related shipments using a nested loop to display their contents and status. It's a complex block requiring technical support. If you lack resources, contact your customer success manager for assistance; AfterShip Support can provide the code for you to integrate into your email content.
Configure the data source elements using markdown:
PropertyEvent Variables
Row collectionevent.OtherShipmentsInThisOrder
Row aliasline_item

Next, leverage these variables within your dynamic table block:
PropertyExample
CourierName{{ line_item.CourierName }}
TrackingNumber{{ line_item.TrackingNumber }}
ShipmentCurrentStatus{{ line_item.ShipmentCurrentStatus }}
LatestEstimatedDeliveryDate{{ line_item.LatestEstimatedDeliveryDate }}
DeliveryDate{{ line_item.DeliveryDate }}
ShipmentLineItemsThe line items array for the contents of the fulfillment.


AllShipmentsInThisOrder Configuration



Configure the data source elements using markdown:

PropertyEvent Variables
Row collectionevent.AllShipmentsInThisOrder
Row aliasline_item

Next, leverage these variables within your dynamic table block:

PropertyExample
CourierName{{ line_item.CourierName }}
TrackingNumber{{ line_item.TrackingNumber }}
ShipmentCurrentStatus{{ line_item.ShipmentCurrentStatus }}
LatestEstimatedDeliveryDate{{ line_item.LatestEstimatedDeliveryDate }}
DeliveryDate{{ line_item.DeliveryDate }}
ShipmentLineItemsThe line items array for the contents of the fulfillment.

This section details related shipments using a complex nested loop for displaying contents and status. For technical support, contact your customer success manager; AfterShip Support can share the code for your email content integration.

If you have any queries, feel free to connect with our support team for quick assistance.

Updated on: 17/07/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!