Klaviyo Advanced: Text Variables and Dynamic Item Blocks
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:
- AfterShip Flow Metrics
- Text variables - General fields
- Text variables - Custom fields
- Items block
- OrderLineItems Configuration
- ShipmentLineItems Configuration
- ToShipItems Configuration
- OtherShipmentsInThisOrder Configuration
- AllShipmentsInThisOrder Configuration
AfterShip flow metrics
When using the AfterShip and Klaviyo integration, a set of flow metrics are automatically made available directly in your Klaviyo account. Each metric maps to a specific shipment or order event and can be used as a trigger to build automated flows in Klaviyo.
Metrics classified as Order events include Order event fields (STORE and ORDER categories). Metrics classified as Shipment events include the full range of fields, covering the COURIER and SHIPMENT categories as well. See the General fields table below for a complete breakdown of field availability.
- Pre-ship emails
Metric Name | Event Type | Description | Plan Availability |
|---|---|---|---|
AfterShip: Pre-Ship – Order Confirmation | Order | Triggered when an order is created. Notifies customers that their order has been successfully received. | Pro, Premium, Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
AfterShip: Pre-Ship – Fulfillment Stalled | Order | Triggered when an order remains unfulfilled for a configurable number of days after creation. | Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
AfterShip: Pre-Ship – Partial Fulfillment | Order | Triggered when an order is partially fulfilled. A separate notification is sent for each partial shipment. | Pro, Premium, Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
- Delivery summary emails
Metric Name | Event Type | Description | Plan Availability |
|---|---|---|---|
AfterShip: Delivery Summary – All Items Fulfilled | Order | Triggered when all shipments in an order have been shipped and the order status changes to “Fulfilled.” | Pro, Premium, Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
AfterShip: Delivery Summary – All Items Delivered | Order | Triggered when all shipments in a split order have been successfully delivered. | Pro, Premium, Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
- Delivery update emails
Metric Name | Event Type | Description | Plan Availability |
|---|---|---|---|
AfterShip: Delivery Updates – Info Received | Shipment | Triggered when shipment information is received and the package is awaiting courier pickup. | Pro, Premium, Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
AfterShip: Delivery Updates – In Transit | Shipment | Triggered when the package has been picked up and is on its way to the customer. | Pro, Premium, Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
AfterShip: Delivery Updates – Out for Delivery | Shipment | Triggered when the shipment is scheduled for delivery and is out for delivery that day. | Pro, Premium, Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
AfterShip: Delivery Updates – Available for Pickup | Shipment | Triggered when the shipment has arrived at a pickup location and is ready for collection. | Pro, Premium, Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
AfterShip: Delivery Updates – Delivered | Shipment | Triggered when the shipment has been successfully delivered. | Pro, Premium, Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
- Delivery exception emails
Metric Name | Event Type | Description | Plan Availability |
|---|---|---|---|
AfterShip: Delivery Exceptions – Exception | Shipment | Triggered when a shipment encounters an issue, such as delay, loss, customs hold, damage, or return to sender. | Pro, Premium, Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
AfterShip: Delivery Exceptions – Failed Delivery Attempt | Shipment | Triggered when a delivery attempt is unsuccessful. | Pro, Premium, Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
AfterShip: Delivery Exceptions – Shipment Stalled | Shipment | Triggered when no tracking updates are received for a configurable number of days, regardless of shipment status. | Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
- Delivery anticipation emails (EDD)
Metric Name | Event Type | Description | Plan Availability |
|---|---|---|---|
AfterShip: EDD – Delivery Anticipation | Shipment | Triggered when a shipment is expected to arrive the next day, helping set customer expectations proactively. | Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
AfterShip: EDD – EDD Revised | Shipment | Triggered when the estimated delivery date (EDD) is updated. | Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
AfterShip: EDD – EDD Missed | Shipment | Triggered when the estimated delivery date passes without successful delivery. | Enterprise Standard, Enterprise Advanced, API Standard, API Advanced |
Text variables - General fields
Field availability: COURIER and SHIPMENT category fields are exclusive to Shipment events and returnnullin Order events. STORE and ORDER category fields are available in both event types.CustomFieldsis also limited to Shipment events only.
General fields
Category | Trigger Filters & Splits | Variable | Description |
|---|---|---|---|
STORE | StoreName | | Your store's name, sourced from your platform connection, commerce API, or order CSV. |
STORE | StoreURL | | Your store's URL, sourced from your platform connection, commerce API, or order CSV. |
COURIER | CourierName | | The courier's name. |
COURIER | CourierSlug | | The courier's slug identifier. |
COURIER | CourierContact | | The courier's contact information. |
COURIER | CourierWebURL | | The courier's website URL. |
COURIER | CourierRedirectURL | | The courier's URL where customers can redirect their parcel. |
COURIER | CourierTrackingURL | | The courier's tracking page URL. |
SHIPMENT | TrackingNumber | | The shipment's tracking number. |
SHIPMENT | ShipmentTrackingURL | | The URL to your AfterShip branded tracking page, with the tracking number as a pre-set parameter. Shopify users who want to direct customers to a Proxy URL embed should enable "From notifications" under Tracking pages → Embedding → Embed on Shopify using a proxy URL. |
SHIPMENT | ShipmentCurrentStatus | | The shipment's current delivery status in AfterShip. |
SHIPMENT | ShipmentCurrentSubStatus | | The shipment's current delivery substatus in AfterShip. |
SHIPMENT | ShipmentDeliveryAddress | | The shipment's destination address. |
SHIPMENT | LatestLocation | | The shipment's most recent known location. |
SHIPMENT | LatestUpdateTime | | The time of the most recent courier update on the shipment. |
SHIPMENT | LatestCourierMessage | | The most recent checkpoint message from the courier. |
SHIPMENT | CourierEstimatedDeliveryDate | | The courier's estimated delivery date, sourced directly from AfterShip's courier tracking integrations. |
SHIPMENT | AfterShipAIEstimatedDeliveryDate | | AfterShip's AI Predicted Estimated Delivery Date (AIEDD), calculated using AI and proprietary tracking data to deliver above-industry accuracy. |
SHIPMENT | AfterShipCustomSettingEstimatedDeliveryDate | | A custom estimated delivery date configured in the AfterShip Tracking admin dashboard. Useful for merchants with their own EDD logic based on shipping type, courier, or destination. |
SHIPMENT | PromisedDeliveryDate | | A merchant-defined delivery date passed to AfterShip via the Tracking API, representing the merchant's own delivery projection. |
SHIPMENT | LatestEstimatedDeliveryDate | | The most relevant estimated delivery date, resolved in this priority order: Courier EDD → AfterShip AI EDD → Promised delivery date → Custom EDD. |
SHIPMENT | PickupLocation | | The location where the customer can pick up their package. |
SHIPMENT | SignedBy | | The recipient's information at the time of delivery. |
SHIPMENT | CourierServiceType | | The courier service type used for the shipment (e.g., UPS Express Saver®). |
SHIPMENT | Note | | Additional notes configured for the shipment in AfterShip. |
SHIPMENT | ShipmentPackageCount | | The number of packages in this shipment. |
SHIPMENT | ShipDate | | The date the shipment was shipped. |
SHIPMENT | PickupDate | | The date the shipment was picked up. |
SHIPMENT | DeliveryDate | | The date the shipment was delivered. |
SHIPMENT | DestinationCity | | The shipment's destination city. |
SHIPMENT | DestinationState | | The shipment's destination state. |
SHIPMENT | DestinationCountryIso3 | | The shipment's destination country in ISO 3 format. |
SHIPMENT | DestinationCountryName | | The shipment's destination country name. |
SHIPMENT | DestinationPostalCode | | The shipment's destination postal code. |
SHIPMENT | TransitTime | | The total transit time for this shipment so far, in days. |
SHIPMENT | OriginCity | | The shipment's origin city. |
SHIPMENT | OriginState | | The shipment's origin state. |
SHIPMENT | OriginCountryIso3 | | The shipment's origin country in ISO 3 format. |
SHIPMENT | OriginCountryName | | The shipment's origin country name. |
SHIPMENT | OriginPostalCode | | The shipment's origin postal code. |
SHIPMENT | ShipmentWeight | | The shipment's weight value. |
SHIPMENT | ShipmentWeightUnit | | The unit of measurement for the shipment's weight. |
SHIPMENT | ShipmentTitle | | The shipment's title as set in AfterShip. |
SHIPMENT | ImportSource | | The source through which the tracking was imported into AfterShip. |
SHIPMENT | Language | | The language of the notification. |
ORDER | OrderNumber | | The customer-facing order number. |
ORDER | OrderID | | The merchant's internal order ID. |
ORDER | OrderName | | The order name as displayed in your eCommerce store (e.g., #1001). |
ORDER | OrderStatus | | The order's current fulfillment status. |
ORDER | OrderDate | | The date the order was placed. |
ORDER | OrderCurrency | | The currency used for the order. |
ORDER | OrderTaxesIncluded | | Indicates whether the order total includes taxes ( |
ORDER | OrderTotal | | The order's total price, including taxes and shipping. |
ORDER | OrderSubtotal | | The order subtotal, before taxes and shipping. |
ORDER | OrderShippingTotal | | The order's total shipping cost. |
ORDER | OrderDiscountTotal | | The total discount amount applied to the order. |
ORDER | OrderTaxTotal | | The total tax amount charged for the order. |
ORDER | OrderTags | | The order's tags from your eCommerce store. |
ORDER | OrderPathURL | | The URL where customers can view their order on your eCommerce store. |
ORDER | OrderStatusPageURL | | The order status page URL on your eCommerce platform. |
ORDER | OrderTrackingURL | | The URL to your AfterShip branded tracking page, with order number and customer email/phone as pre-set parameters. Shopify users who want to direct customers to a Proxy URL embed should enable "From notifications" under Tracking pages → Embedding → Embed on Shopify using a proxy URL. |
ORDER | CustomerName | | The customer's full name. |
ORDER | CustomerFirstName | | The customer's first name. |
ORDER | CustomerEmailAddress | | The customer's email address. |
ORDER | TotalShipments | | The total number of shipments under this order. |
ORDER | ShippingAddress | | The order's formatted shipping address. |
ORDER | BillingAddress | | The order's formatted billing address. |
Text variables - Custom fields
Category | Trigger Filters & Splits | Variable | Description |
|---|---|---|---|
Custom | custom_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 Name | Details |
|---|---|
OrderLineItems | Items encapsulated within the order. |
ShipmentLineItems | Items shipped by the carrier. |
ToShipItems | An array of line items for fulfillable products not attached to any shipments—representing "yet to ship" or backordered items. |
OtherShipmentsInThisOrder | An array of other shipments in the order, and their line items. |
AllShipmentsInThisOrder | An array of all shipments in the order, and their line items. |
OrderLineItems Configuration
- Configure the data source elements using markdown:
Property | Event Variables |
|---|---|
Row collection | |
Row alias | |
- Next, leverage these variables within your dynamic table block:
Property | Event Variables |
|---|---|
Item Title | |
Item Quantity | |
Item Variant Title | |
Item URL | |
Product Image | |
Product Unit Price Amount | |
Product Unit Price Currency | |
Product Final Line Price Amount | |
Product Final Line Price Currency | |
SKU | |
Requires Shipping | |
Total Amount | |
Total Currency | |
Discount Amount (optional) | |
Discount Currency (optional) | |
Tax Amount (optional) | |
Tax Currency (optional) | |
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:
Property | Event Variables |
|---|---|
Row collection | |
Row alias | |
- Next, leverage these variables within your dynamic table block:
Property | Event Variables |
|---|---|
Item Title | |
Item Quantity | |
Item Variant Title | |
Item URL | |
Product Image | |
Product Unit Price Amount | |
Product Unit Price Currency | |
Product Final Line Price Amount | |
Product Final Line Price Currency | |
SKU | |
Requires Shipping | |
Total Amount | |
Total Currency | |
Discount Amount (optional) | |
Discount Currency (optional) | |
Tax Amount (optional) | |
Tax Currency (optional) | |
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 - Split Shipment
- Configure the data source elements using markdown:
Property | Event Variables |
|---|---|
Row collection | |
Row alias | |
- Next, leverage these variables within your dynamic table block:
Property | Event Variables |
|---|---|
Item Title | |
Item Quantity | |
Item Variant Title | |
Item URL | |
Product Image | |
Product Unit Price Amount | |
Product Unit Price Currency | |
Product Final Line Price Amount | |
Product Final Line Price Currency | |
SKU | |
Requires Shipping | |
Total Amount | |
Total Currency | |
Discount Amount (optional) | |
Discount Currency (optional) | |
Tax Amount (optional) | |
Tax Currency (optional) | |
Efficiently configure and utilize ToShipItems variables for a dynamic and enriched presentation in your Klaviyo dynamic table block.
OtherShipmentsInThisOrder Configuration - Split Shipment
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:
Property | Event Variables |
|---|---|
Row collection | |
Row alias | |
- Next, leverage these variables within your dynamic table block:
Property | Example |
|---|---|
CourierName | |
TrackingNumber | |
ShipmentCurrentStatus | |
LatestEstimatedDeliveryDate | |
DeliveryDate | |
ShipmentLineItems | The line items array for the contents of the fulfillment. |
AllShipmentsInThisOrder Configuration - Split Shipment
- Configure the data source elements using markdown:
Property | Event Variables |
|---|---|
Row collection | |
Row alias | |
- Next, leverage these variables within your dynamic table block:
Property | Example |
|---|---|
CourierName | |
TrackingNumber | |
ShipmentCurrentStatus | |
LatestEstimatedDeliveryDate | |
DeliveryDate | |
ShipmentLineItems | The 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.
Need help?
If you have any queries, feel free to connect with our support team for quick assistance.
Updated on: 23/03/2026