You will learn
This guide refers to the AfterShip v1 integration, which was built by Klaviyo and is no longer allowing new installations. New customers should use the new AfterShip Tracking integration, built by AfterShip. Learn how to integrate with AfterShip Tracking.
Learn about data synced from Klaviyo's v1 AfterShip integration. You can personalize and target emails based on the shipping events and status of orders tracked by AfterShip. Synced data includes shipment tracking numbers and order IDs, and when a shipment is marked as shipped or delivered.
View synced dataView synced data
To view your synced data:
- Click the Analytics dropdown and select Metrics.
- Select one of the AfterShip metrics — for instance, Received Delivery — and click on the Activity Feed icon. You can filter metrics by AfterShip, and all AfterShip metrics will have an AfterShip icon.
- If your integration has begun syncing data, you'll start to see Received Delivery events being added to this Activity Feed. When your AfterShip integration has a green bar in your account's Enabled Integrations list (found under Account Name > Integrations), your historic data sync is complete.
- If you aren't seeing data, make sure the All events setting is enabled in the Notifications > Webhooks section of your AfterShip account.
AfterShip metrics
AfterShip syncs the following metrics to Klaviyo:
- Delivery Exception
- Failed Delivery Attempt
- In Transit
- Out for Delivery
- Received Delivery
- Shipped Package
Delivery Exception
This metric is recorded each time a delivery is assigned one of the following statuses: custom hold, undelivered, returned shipment to sender, or any shipping exceptions.
Failed Delivery AttemptFailed Delivery Attempt
This metric is recorded when a carrier attempted to deliver the package but failed. The carrier will usually leave a notice and will try to deliver again.
In TransitIn Transit
This metric is recorded when a carrier has either accepted the shipment or picked up a shipment from a shipper. The shipment is on the way to its destination.
Out for DeliveryOut for Delivery
This metric is recorded when a carrier is about to deliver the shipment or the shipment is ready to pick up.
Received DeliveryReceived Delivery
This metric is recorded every time a delivery is marked as received inside of AfterShip, and includes information about an order's tracking number and order ID.
With this metric, you can filter product review flows to send only to people who have received a delivery. You can also trigger a flow when a delivery is received, letting customers know when their packages arrive.
Shipped PackageShipped Package
This metric is recorded every time an order is marked as shipped in AfterShip, and includes information about an order's tracking number and order ID.
With this metric, you can trigger flows to send messages confirming that a package has been shipped to a customer and provide them the tracking number to track their shipment.
Use AfterShip v1 data in KlaviyoUse AfterShip v1 data in Klaviyo
Each of the metrics above are associated with additional data, also known as metadata. For example, the Out For Delivery metric tracks the package’s CurrentStatus, which includes the following possibilities: AttemptFail, Delivered, Exception, InfoReceived InTransit, OutForDelivery. This data can be used to create and trigger flows based on a shipment’s status.
Out for Delivery flowOut for Delivery flow
Let your customers know that their order is out for delivery by using AfterShip metrics and metadata, and populate your flow email with dynamic order information.
- Trigger: People enter this flow when an Out for Delivery event occurs
Notice that the flow email references dynamic customer order data (i.e., {{ event.extra.Title }}); when the message is sent, the dynamic placeholder will be replaced with the customer’s order number.
Add tracking information to emailsAdd tracking information to emails
You can also use AfterShip data in direct interactions with your customers; for instance, auto filling their tracking information into a shipping notification email.
This method can only be used in flows with the AfterShip trigger Shipped Package.
- First, in AfterShip, click on Tracking pages.
- Select the tracking page you’d like to add to your email template and copy the following from the provided URL: klaviyo1m.aftership.com
- In Klaviyo, navigate to Flows. If you have previously set up an AfterShip flow, you can add the following to that flow. Otherwise, click Create Flow and filter by AfterShip.
- In this example, we’ll add the tracking number to the Order In Transit flow. Click on the Order In Transit flow.
- Select the email block and then click Edit.
- Click Edit Content and select the main text box of the email. In this example template, the text box is set up with two columns, so select Column 2.
- Select the placeholder text next to Tracking Number and click the link button.
- In the link menu, change the Protocol to https:// and paste your tracking URL, adding the following to the end:
/{{ event.extra|lookup:'Tracking Number' }}
- Click OK. Then, save your changes to the block by clicking Save.
- You can preview your email by clicking the Preview button on the left hand side of the screen. Select an event to preview the email with, and then choose Show directly in Klaviyo to view the email in your browser. Click Preview Now to view the email and verify your link works.
- Once you’re happy with the way your email template looks, click Save & Return to Templates.